Hello, I'm working again on the stdlib-2.7.5 branch of Pypy. I have a couple questions, but since nobody seems to be around on irc right now, I'm asking them here. :-) First, I kicked the buildbots yesterday, and there are a *lot* of errors due to tests not being able to import the MAXREPEAT constant from the _sre module. But it seems to me that it is defined in pypy/module/_sre/__init__.py... Am I missing something? Are the errors due to a build problem or something else? Second, I'm trying to reproduce some of the more interesting failures (test_multiprocessing, test_str), but when I try to run the tests on my laptop, they fail like this instead: platform darwin -- Python 2.7.5 -- pytest-2.2.4.dev2 -- /usr/bin/python collected 1 items test_str.py [snip] Traceback (application-level): File "/users/chrish/Code/pypy/pypy/tool/pytest/run-script/regrverbose.py", line 4 in <module> from test import test_support File "/users/chrish/Code/pypy/lib-python/2.7/test/test_support.py", line 21 in <module> import struct File "/users/chrish/Code/pypy/lib-python/2.7/struct.py", line 1 in <module> from _struct import * ImportError: No module named _struct FAILED I don't really see anything that could look like a module called "_struct" in the source code... Am I missing something here too? Thanks in advance, Christian
On Thu, Jan 23, 2014, at 06:40 PM, Christian Hudon wrote:
Hello,
I'm working again on the stdlib-2.7.5 branch of Pypy. I have a couple questions, but since nobody seems to be around on irc right now, I'm asking them here. :-)
Cool. Did you see lib-python/stdlib-upgrade.txt?
First, I kicked the buildbots yesterday, and there are a *lot* of errors due to tests not being able to import the MAXREPEAT constant from the _sre module. But it seems to me that it is defined in pypy/module/_sre/__init__.py... Am I missing something? Are the errors due to a build problem or something else?
Where definition of that constant is changed in CPython 2.7.5. You'll probably have to move it accordingly.
Second, I'm trying to reproduce some of the more interesting failures (test_multiprocessing, test_str), but when I try to run the tests on my laptop, they fail like this instead:
platform darwin -- Python 2.7.5 -- pytest-2.2.4.dev2 -- /usr/bin/python collected 1 items test_str.py [snip] Traceback (application-level): File "/users/chrish/Code/pypy/pypy/tool/pytest/run-script/regrverbose.py", line 4 in <module> from test import test_support File "/users/chrish/Code/pypy/lib-python/2.7/test/test_support.py", line 21 in <module> import struct File "/users/chrish/Code/pypy/lib-python/2.7/struct.py", line 1 in <module> from _struct import * ImportError: No module named _struct FAILED
I don't really see anything that could look like a module called "_struct" in the source code... Am I missing something here too?
I suspect the CPython struct.py stub is shadowing pypy's builtin struct module. Try deleting struct.py.
Hi Christian, On Fri, Jan 24, 2014 at 3:40 AM, Christian Hudon <chrish@pianocktail.org> wrote:
First, I kicked the buildbots yesterday, and there are a *lot* of errors due to tests not being able to import the MAXREPEAT constant from the _sre module. But it seems to me that it is defined in pypy/module/_sre/__init__.py... Am I missing something? Are the errors due to a build problem or something else?
This is merely a detail for a deeper an issue. CPython's "re" format changed between 2.7.3 and 2.7.5 (a potential compatibility issue). We need to do something about it, but as far as I know, what exactly to do is still not clear.
Second, I'm trying to reproduce some of the more interesting failures (test_multiprocessing, test_str), but when I try to run the tests on my laptop, they fail like this instead:
You are running "py.test test_str.py" on CPython. This is not really fully supported any more. The buildbot runs them as "pypy test_str.py", with the just-translated PyPy. The best way is to extract a part of the failing test and copy the failing few lines only into pypy/objspace/std/test/test_stringobject.py, for example, where it can be run with py.test on CPython and fixed accordingly. A bientôt, Armin.
Hi Christian, On Fri, Jan 24, 2014 at 8:54 AM, Armin Rigo <arigo@tunes.org> wrote:
pypy/module/_sre/__init__.py... Am I missing something? Are the errors due to a build problem or something else?
This is merely a detail for a deeper an issue. CPython's "re" format changed between 2.7.3 and 2.7.5 (a potential compatibility issue). We need to do something about it, but as far as I know, what exactly to do is still not clear.
I forgot that I did something on trunk some time ago about it. So I finished fixing the 2.7.5 branch; now the "own" tests at least pass. I didn't try to translate and run the CPython tests, but the MAXREPEAT name issue should not be a problem there. A bientôt, Armin.
participants (3)
-
Armin Rigo
-
Benjamin Peterson
-
Christian Hudon