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
sys.flags is missing bytes_warning #47039
Comments
sys.flags is missing bytes_warning: Python 2.6a2+ (trunk, May 8 2008, 12:09:50)
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sys.flags
sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0,
inspect=0, interactive=0, optimize=0, dont_write_bytecode=0,
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0,
unicode=0) This is only used from warnings.py currently: ~/pydev/trunk/ ack bytes_warning Lib/warnings.py Python/sysmodule.c (I only see an attribute error in frozen programs). The attached patch fixes it by not using the sizeof operator to compute This gives:
>>> sys.flags
sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0,
inspect=0, interactive=0, optimize=0, dont_write_bytecode=0,
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0,
unicode=0, bytes_warning=0) |
brett, I added you to the nosy list, as you seem to have committed this |
Ralf, can you do a |
sure, I even removed the whole source tree:
~/pydev/trunk/ ./python
ralf@rat64 ok
Python 2.6a3+ (trunk, May 8 2008, 21:52:39)
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sys.flags
sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0,
inspect=0, interactive=0, optimize=0, dont_write_bytecode=0,
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0,
unicode=0) You can count the entries manually if you don't believe. The given count |
Fixed in r62896. |
why not use sizeof? you'll probably run into this again.. |
btw, I guess that sentinel entry in that array could also be removed? |
I didn't use sizeof because I didn't think of it; the solution to just As for removing the array, perhaps, but I don't have time to try that out. |
ok brett, I see in IRC you're doing lot's of commits currently. sorry |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: