Eric Snow added the comment:
For the record, issue12633 has some more discussion on this.
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
Roundup Robot added the comment:
New changeset 4f8160e45cb7 by Brett Cannon in branch '3.3':
Issue #17953: document that sys.modules shouldn't be replaced (thanks
http://hg.python.org/cpython/rev/4f8160e45cb7
New changeset b60ae4ebf981 by Brett Cannon in branch 'default':
merge fix for issue
Brett Cannon added the comment:
Thanks for the patch, Yogesh, but I went with different wording that I came up
with on the train the other day while offline. But you did remind me to update
Misc/NEWS (which led to a discussion on python-committers), so thanks for that.
--
resolution:
Yogesh Chaudhari added the comment:
You are most welcome Brett. I am just starting to contribute with this doc fix.
Didn't think a small detail in it will generate such a long debate in the
python-committers mailing list.
Is there a plan in action for 'fixing' Misc/NEWS. I now realize that
R. David Murray added the comment:
I think that is a reasonable suggestion for an enhancement to patchcheck
(though I think Brett had a good reason to add a news entry in this particular
case). You could open a new issue with that suggestion. On the other hand,
patchcheck always warns about
Yogesh Chaudhari added the comment:
That sounds good. I will open up an issue (if not for anything else other than
to get more eyes on this issue)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
Yogesh Chaudhari added the comment:
Documentation added for sys.modules
--
keywords: +patch
nosy: +Yogesh.Chaudhari
Added file: http://bugs.python.org/file30305/issue17953.patch
___
Python tracker rep...@bugs.python.org
Terry J. Reedy added the comment:
sys.modules
This is a dictionary that maps module names to modules which have already
been loaded. This can be manipulated to force reloading of modules and other
tricks.
How about adding at the end
However, replacing or clearing it may cause Python to
Brett Cannon added the comment:
Sounds good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
___
Python-bugs-list mailing list
New submission from ProgVal:
In Python 3.3 (I did not test with 3.4), sys.modules cannot be reassigned
without breaking the import mechanism; while it works with Python = 3.2.
Here is how to reproduce the bug:
progval@Andromede:/tmp$ mkdir test_imports
progval@Andromede:/tmp$ echo from .
Changes by Christian Heimes li...@cheimes.de:
--
assignee: - brett.cannon
keywords: +3.3regression
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
Antoine Pitrou added the comment:
I wouldn't call it a bug personally. The modules dictionary is used in all
kinds of places in the interpreter; you can change the dictionary's contents,
but not swap it with another one.
It's just a pity that we can't forbid reassignment altogether.
Brett Cannon added the comment:
There is no good way to solve this. At the C level there interpreter struct has
two key fields, sysdict and modules. The former is sys.__dict__ and the latter
is sys.modules. But when you re-assign sys.modules you then break the
assumption that sys.modules is
13 matches
Mail list logo