Issue1193
Created on 2008-12-06.08:02:52 by pjenvey, last changed 2018-03-23.22:44:03 by jeff.allen.
msg3878 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2008-12-06.08:02:51 |
|
Our builtin module's __dict__s don't have what you'd expect to see in
CPython, they contain the remnants of our Java Integration:
Jython 2.5b0+ (trunk:5704:5712M, Dec 5 2008, 22:53:44)
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_07
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info > (2, 4)
True
>>> sys.__dict__['version_info'] > (2, 4)
False
>>> sys.__dict__['version_info']
<reflected field public static org.python.core.PyTuple
org.python.core.PySystemState.version_info 1>
Which makes these __dict__s fairly useless and error prone. Occasionally
there is good reason to go directly into them -- e.g. when wanting to
specify a module dict for the scope of an exec statement
On a somewhat related note, the fact that our builtin modules aren't
actual modules (assert isinstance(sys, types.ModuleType)) can also be
annoying. I only mention it here because I think that fact might want to
be considered in any fix for __dict__. It's really a different issue,
though
|
msg8556 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-05-22.02:24:52 |
|
Target beta 4, although this is not likely to be easy given that sys is not a normal module in Jython
|
msg9608 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-03-10.18:29:03 |
|
Revisit for 2.7.x, where x > 0
|
msg10790 (view) |
Author: Darjus Loktevic (darjus) |
Date: 2016-02-25.06:42:30 |
|
Found a case where this breaks pytest. Don't have a clear repro, but essentially happens around monkeypatching of sys.std[out|err].
|
|
Date |
User |
Action |
Args |
2018-03-23 22:44:03 | jeff.allen | set | milestone: Jython 2.7.2 -> |
2016-02-26 19:23:12 | zyasoft | set | milestone: Jython 2.7.2 |
2016-02-25 06:42:31 | darjus | set | nosy:
+ darjus messages:
+ msg10790 |
2015-03-10 18:29:03 | zyasoft | set | messages:
+ msg9608 |
2014-05-22 02:24:52 | zyasoft | set | resolution: accepted messages:
+ msg8556 versions:
+ Jython 2.7, - Jython 2.5 |
2013-02-25 18:47:00 | fwierzbicki | set | nosy:
+ fwierzbicki versions:
+ Jython 2.5, - 2.5.1 |
2009-03-14 14:32:17 | fwierzbicki | set | priority: normal |
2009-03-14 14:13:06 | fwierzbicki | set | versions:
+ 2.5.1 |
2008-12-30 00:08:40 | zyasoft | set | nosy:
+ zyasoft |
2008-12-06 08:02:52 | pjenvey | create | |
|