python-mock tests fail with python3.4

Bug #1283742 reported by Matthias Klose
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mock (Debian)
Fix Released
Unknown
python-mock (Ubuntu)
Fix Released
High
Barry Warsaw
Trusty
Fix Released
High
Barry Warsaw
Matthias Klose (doko)
tags: added: python3.4
Revision history for this message
Michael Foord (mfoord) wrote :

Ah yes, I know the reason for that. It's due to the new signature changes in Python 3.4 - some builtin objects are now introspectable with inspect.getfullargspec but don't have the full range of "normal" attributes. The fix is just to catch the AttributeError around copying them. FWIW mock is *included* in Python 3.4 as unittest.mock, so nothing using Python 3.4 should be using the python-mock package!

Changed in python-mock (Debian):
status: Unknown → New
Revision history for this message
Barry Warsaw (barry) wrote :

TBH, I'm half tempted to just disable python3-mock. I really want to push people into using unittest.mock for Python 3.3/3.4. But I guess I won't go that radical.

Revision history for this message
Barry Warsaw (barry) wrote :

Something like this.

tags: added: patch
Revision history for this message
Barry Warsaw (barry) wrote :

Sorry Michael. I'd upstream this but Google hates me today. I'll get this patch into Debian then sync it to Ubuntu.

Barry Warsaw (barry)
Changed in python-mock (Ubuntu Trusty):
assignee: nobody → Barry Warsaw (barry)
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-mock - 1.0.1-3

---------------
python-mock (1.0.1-3) unstable; urgency=medium

  * Team upload.
  * d/patches/python3.4_compat.patch: Fix FTBFS with Python 3.4.
    (Closes: #739890) (LP: #1283742)
  * d/control: Bump Standards-Version with no other changes necessary.

 -- Barry Warsaw <email address hidden> Wed, 26 Feb 2014 15:39:36 -0500

Changed in python-mock (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Michael Foord (mfoord) wrote :

Thanks Barry. Your patch looks fine. A new release will conditionally check for the new __textsignature__ (or however it's spelt) in Python 3.4 and copy that if it exists (similar to the fix for the same problem in unittest.mock for Python 3.4). Your patch works fine though.

Changed in python-mock (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.