Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repy unit tests do not run correctly with python 2.7 #19

Closed
choksi81 opened this issue May 24, 2014 · 5 comments
Closed

Repy unit tests do not run correctly with python 2.7 #19

choksi81 opened this issue May 24, 2014 · 5 comments
Assignees

Comments

@choksi81
Copy link
Contributor

On Ubuntu 11.04, x86_64, Repy unit tests that pass on python2.6 fail with python2.7.1. This is true as of r4983.
Output is attached.

@choksi81 choksi81 added this to the RepyV2 milestone May 24, 2014
@choksi81 choksi81 self-assigned this May 24, 2014
@choksi81
Copy link
Contributor Author

Author: mkaplan
This does not appear to be an issue on Windows or Mac.

@choksi81
Copy link
Contributor Author

Author: mkaplan
It appears that the cause of the problem is because threading.py was modified to call hasattr, which is not allowed by repy, in _after_fork(). This is line 852 in Python2.6, and 866 in python2.7

After commenting out lines 888 and 889 from python2.7's threading.py

if hasattr(thread, '_reset_internal_locks'):
    thread._reset_internal_locks()

the code runs properly on python2.7, on linux.

@choksi81
Copy link
Contributor Author

Author: mkaplan
Fixed in r4986.

@choksi81
Copy link
Contributor Author

Author: albert
The problem exists for RepyV1 unit tests, too; the fix is the same. I'm backporting it.

@choksi81
Copy link
Contributor Author

Author: albert
Fixed in r5640 for RepyV1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant