[Bug 1734918] Re: python-json-patch monkeypatching causes AttributeError with python-networkx
Ubuntu Foundations Team Bug Bot
1734918 at bugs.launchpad.net
Sat Dec 16 12:24:09 UTC 2017
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
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-json-patch in Ubuntu.
https://bugs.launchpad.net/bugs/1734918
Title:
python-json-patch monkeypatching causes AttributeError with python-
networkx
Status in python-json-patch package in Ubuntu:
Incomplete
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-json-patch/+bug/1734918/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list