[issue2790] sys.flags is missing bytes_warning
New submission from Ralf Schmitt [EMAIL PROTECTED]: 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 311:bytes_warning = sys.flags.bytes_warning 312:if bytes_warning 1: 314:elif bytes_warning: Python/sysmodule.c 1172: {bytes_warning, -b}, (I only see an attribute error in frozen programs). The attached patch fixes it by not using the sizeof operator to compute the size of the array. 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) -- files: bytes_warning.patch keywords: patch messages: 66411 nosy: schmir severity: normal status: open title: sys.flags is missing bytes_warning type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10220/bytes_warning.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Ralf Schmitt [EMAIL PROTECTED] added the comment: brett, I added you to the nosy list, as you seem to have committed this in r62303 (http://hgpy.de/py/trunk/rev/ac1ae32a476c) -- nosy: +brett.cannon __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Changes by Christian Heimes [EMAIL PROTECTED]: -- assignee: - christian.heimes nosy: +christian.heimes priority: - high __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Brett Cannon [EMAIL PROTECTED] added the comment: Ralf, can you do a ``make clean`` and then try again? I had this happen to me with an old checkout until I did that and then everything worked fine. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Ralf Schmitt [EMAIL PROTECTED] added the comment: sure, I even removed the whole source tree: ~/pydev/trunk/ ./python [EMAIL PROTECTED] 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 is off by one. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Brett Cannon [EMAIL PROTECTED] added the comment: Fixed in r62896. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Ralf Schmitt [EMAIL PROTECTED] added the comment: why not use sizeof? you'll probably run into this again.. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Ralf Schmitt [EMAIL PROTECTED] added the comment: btw, I guess that sentinel entry in that array could also be removed? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Brett Cannon [EMAIL PROTECTED] added the comment: I didn't use sizeof because I didn't think of it; the solution to just change the numbers was right in front of me and I am swamped with other work so I went with what I knew would work. As for removing the array, perhaps, but I don't have time to try that out. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2790] sys.flags is missing bytes_warning
Ralf Schmitt [EMAIL PROTECTED] added the comment: ok brett, I see in IRC you're doing lot's of commits currently. sorry for bothering you. I'll maybe try myself, it's a minor issue anyway... __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2790 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com