Ticket #1039 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Repy unit tests do not run correctly with python 2.7

Reported by: mkaplan Owned by: mkaplan
Priority: major Milestone: RepyV2
Component: repyV2 Version: 0.1t
Severity: Medium Keywords:
Cc: Blocking:
Blocked By:

Description

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.

Attachments

failed_tests.log Download (13.1 KB) - added by mkaplan 7 years ago.
Failing unit tests with python2.7, from running "python utf.py -m repyv2api"
fix_for_python27.diff Download (445 bytes) - added by mkaplan 7 years ago.
Fix to run with python 2.7 on ubuntu

Change History

Changed 7 years ago by mkaplan

Failing unit tests with python2.7, from running "python utf.py -m repyv2api"

Changed 7 years ago by mkaplan

  • owner changed from monzum to mkaplan
  • status changed from new to assigned

Changed 7 years ago by mkaplan

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

Changed 7 years ago by mkaplan

  • status changed from assigned to accepted

Changed 7 years ago by 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.

Changed 7 years ago by mkaplan

Fix to run with python 2.7 on ubuntu

Changed 7 years ago by mkaplan

  • status changed from accepted to closed
  • resolution set to fixed

Fixed in r4986.

Changed 7 years ago by albert

  • status changed from closed to reopened
  • resolution fixed deleted

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

Changed 7 years ago by albert

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in r5640 for RepyV1.

Note: See TracTickets for help on using tickets.