python-json-patch monkeypatching causes AttributeError with python-networkx

Bug #1734918 reported by volinthius
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-json-patch (Ubuntu)
Expired
Low
Unassigned

Bug Description

On Ubuntu 14.04.5 LTS with:

- python 2.7.5-5ubuntu3
- python-json-patch 1.3-4
- python-networkx 1.8.1-0ubuntu3

Error can be triggered with the following example:

---

$ cat conflict1.py
import jsonpatch
from networkx.readwrite import json_graph

$ python conflict1.py
Traceback (most recent call last):
  File "conflict1.py", line 11, in <module>
    from networkx.readwrite.json_graph.serialize import *
  File "/usr/lib/python2.7/dist-packages/networkx/readwrite/json_graph/__init__.py", line 10, in <module>
    from networkx.readwrite.json_graph.serialize import *
  File "/usr/lib/python2.7/dist-packages/networkx/readwrite/json_graph/serialize.py", line 31, in <module>
    update_wrapper(load,json.load)
  File "/usr/lib/python2.7/functools.py", line 33, in update_wrapper
    setattr(wrapper, attr, getattr(wrapped, attr))
AttributeError: 'functools.partial' object has no attribute '__module__'

---

The error is reported and fixed in upstream [0] but the commit is after Python 2.x support has been removed in commit 7079bdc7bf4be53f51fa30d790c32db83dd8c210. Please find proposed fix attached.

[0] https://github.com/stefankoegl/python-json-patch/issues/37

Tags: patch trusty
volinthius (volinthius)
description: updated
tags: added: trusty
Revision history for this message
James Page (james-page) wrote :

Marking Incomplete as patch not provided; happy to take a look if you want to attach it to this bug.

Thanks!

Changed in python-json-patch (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
volinthius (volinthius) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "jsonpatch-remove-monkeypatching.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-json-patch (Ubuntu) because there has been no activity for 60 days.]

Changed in python-json-patch (Ubuntu):
status: Incomplete → Expired
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.