-
Notifications
You must be signed in to change notification settings - Fork 3.9k
debug method #3374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug method #3374
Conversation
|
In accordance with a conversation I had with @ankith26 in discord, I modified the PR to instead display the result of |
|
Found a problem. >>> import os
>>> os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1"
>>> import pygame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\charl\AppData\Local\Programs\Python\Python39\lib\site-packages\pygame\__init__.py", line 409, in <module>
platform,
NameError: name 'platform' is not defined
>>> |
|
That's an easy fix |
|
@Starbuck5 should be fixed now |
ankith26
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! 👍
I support this change since it helps both issue reporters and issue triagers... but there is a minor downside that it makes the support prompt more verbose
src_py/__init__.py
Outdated
| print( | ||
| "pygame {} (SDL {}.{}.{}, Python {}.{}.{})".format( # pylint: disable=consider-using-f-string | ||
| ver, *get_sdl_version() + sys.version_info[0:3] | ||
| "pygame {} (SDL {}.{}.{}, Python {}.{}.{}, Architecture {})".format( # pylint: disable=consider-using-f-string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the architecture... it's a string with system OS info
|
This PR is not dead, but is awaiting a pretty significant change according to a conversation in discord |
|
OK, I will hold off on my review until the significant change has appeared (cryptic :D) |
|
Waiting for #3379 to resolve. The future of this PR is something to the effect of: |
|
@oddbookworm looks like this could be whipped into shape now that #3379 is merged. |
MyreMylar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested status:
Update this to use #3379
|
I'll work on this in the next few days or so |
|
Didn't mean to close the PR |
|
New summary: |
|
If #3567 gets merged before this PR, then I don't need the special freetype logic and it'll behave like all of the others |
|
Example test program: Example output: I like the output, should provide a useful block to copy and paste into issue reports. Should the function be called I'm concerned that Getting names right is hard. |
ankith26
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably also worth including platform.python_implementation() and probably platform.version() too in here
Cool, I think we should wait for that then before merging this one |
… name of debug to print_debug_info
|
This code needs to be resilient against crashing in different possible pygame environments, including when different modules are unavailable or fail to import. So I think this needs to handle the case of the sub modules being MissingModule, as well as printing the reason a module is missing (usually a trace back) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current output looks like this on my machine:
Platform: Windows-10-10.0.22000-SP0
System: Windows
System Version: 10.0.22000
Processor: AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
Architecture: Bits: 64bit Linkage: WindowsPE
Python: CPython
pygame version: 2.1.4.dev1
python version: 3.11.1
SDL versions: Linked: 2.24.0 Compiled: 2.24.0
SDL Mixer versions: Linked: 2.6.2 Compiled: 2.6.2
SDL Font versions: Linked: 2.20.1 Compiled: 2.20.1
SDL Image versions: Linked: 2.0.5 Compiled: 2.0.5
Freetype versions: Linked: 2.11.1 Compiled: 2.11.1
EDIT: I am on windows 11, confusingly the version number for windows 11 is still 10.0
I think this is a problem with windows 11 itself. The vast majority of programs report the OS as windows 10, so it has to be something in the OS |
|
Yes, sorry my comment was a bit confusing. The debug printout is correct,
it is just Microsoft being confusing with their versioning.
…On Sat, 24 Dec 2022, 14:57 Andrew Coffey, ***@***.***> wrote:
EDIT: I am on windows 11, confusingly the version number for windows 11 is
still 10.0
I think this is a problem with windows 11 itself. The vast majority of
programs report the OS as windows 10, so it has to be something in the OS
—
Reply to this email directly, view it on GitHub
<#3374 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGDGGVLD4ATFYJJKL3C7HDWO4FPFANCNFSM55URJXXQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I saw #2540 and figured I'd make an attempt to implement it. I tested this on Manjaro and it worked properly for me, but I don't have a pygame dev environment set up in more than one place atm, so I can't test it in other places yet.