[issue18050] embedded interpreter or virtualenv fails with "ImportError: cannot import name MAXREPEAT"
Ned Deily
report at bugs.python.org
Tue Sep 17 02:29:19 CEST 2013
Ned Deily added the comment:
The patch LGTM. And I agree that the fix is not needed for 3.4. Thanks, Serhiy.
I verified that it does solve the "embedded" problem (case 1 above) when using embedded versions of all previous releases of 2.7.x (except 2.7.0) and 3.3.x.
For the record, it appears 2.7.1 introduced a separate incompatibility issue that causes a similar initialization crash with an embedded version of 2.7.0:
Traceback (most recent call last):
File "/py/test_issue18050/root/lib/python2.7/site.py", line 62, in <module>
import os
File "/py/test_issue18050/root/lib/python2.7/os.py", line 398, in <module>
import UserDict
File "/py/test_issue18050/root/lib/python2.7/UserDict.py", line 83, in <module>
import _abcoll
File "/py/test_issue18050/root/lib/python2.7/_abcoll.py", line 11, in <module>
from abc import ABCMeta, abstractmethod
File "/py/test_issue18050/root/lib/python2.7/abc.py", line 8, in <module>
from _weakrefset import WeakSet
File "/py/test_issue18050/root/lib/python2.7/_weakrefset.py", line 5, in <module>
from _weakref import ref
ImportError: No module named _weakref
Googling shows a number of reports of users who have run into that one, too, though no one seems to have opened an issue here about it. I don't think it's worth trying to fix that one at this point as there probably aren't that many instances of system executables that still have embedded static 2.7.0 interpreters anymore (I hope). Unfortunately, that's not the case for embedded static 2.7.2, e.g. vim on OS X 10.8.x.
----------
stage: patch review -> commit review
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18050>
_______________________________________
More information about the Python-bugs-list
mailing list