Checking for the -3 flag from Python code
This flag is exposed to python code as sys.flags.py3k_warning So the hack added to some of the test code that I saw go by on python-checkins isn't needed :) Cheers, Nick -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org
On Wed, Mar 19, 2008 at 6:51 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
This flag is exposed to python code as sys.flags.py3k_warning
So the hack added to some of the test code that I saw go by on python-checkins isn't needed :)
Somebody can remove TODO in Lib/test/test_py3kwarn.py.
Cheers, Nick
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/musiccomposition%40gmail.c...
On Wed, Mar 19, 2008 at 5:51 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
This flag is exposed to python code as sys.flags.py3k_warning
So the hack added to some of the test code that I saw go by on python-checkins isn't needed :)
Excellent. I asked around at the sprints and everyone thought it was unexposed. If no one else has already done it, I'll remove the hacks from test_py3kwarn and the regrtest skipping mechanism. Steve -- I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy
Steven Bethard wrote:
On Wed, Mar 19, 2008 at 5:51 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
This flag is exposed to python code as sys.flags.py3k_warning
So the hack added to some of the test code that I saw go by on python-checkins isn't needed :)
Excellent. I asked around at the sprints and everyone thought it was unexposed. If no one else has already done it, I'll remove the hacks from test_py3kwarn and the regrtest skipping mechanism.
Brett's subsequent checkin pointed out that that particular flag is exposed even more directly as sys.py3kwarning, in addition to being accessible via the general 'command line flags' object. The downside of the module level attribute is that it gives the illusion of being writable without actually having any effect when writing to it. The inconsistent spelling between sys.py3kwarning and sys.flags.py3k_warning is also a minor irritation - are we actually gaining anything by having both mechanisms for accessing the flag value? Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org
participants (3)
-
Benjamin Peterson
-
Nick Coghlan
-
Steven Bethard