Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 607164 - dev-python/setuptools-34.0.2-r1 : RuntimeError: maximum recursion depth exceeded while calling a Python object
Summary: dev-python/setuptools-34.0.2-r1 : RuntimeError: maximum recursion depth excee...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 607354 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-25 10:03 UTC by Toralf Förster
Modified: 2019-04-20 20:46 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,6.03 KB, text/plain)
2017-01-25 10:03 UTC, Toralf Förster
Details
dev-python:setuptools-34.0.2-r1:20170125-095034.log (dev-python:setuptools-34.0.2-r1:20170125-095034.log,110.09 KB, text/plain)
2017-01-25 10:03 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,254.47 KB, text/plain)
2017-01-25 10:03 UTC, Toralf Förster
Details
environment (environment,108.31 KB, text/plain)
2017-01-25 10:03 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,20.53 KB, application/x-bzip)
2017-01-25 10:03 UTC, Toralf Förster
Details
qlist -CISv python (python.list,15.67 KB, text/plain)
2017-01-26 09:08 UTC, Toralf Förster
Details
No network-sandbox build.log (build.log,108.26 KB, text/x-log)
2017-01-29 07:04 UTC, Ooblick
Details
No network-sandbox emerge --info (emerge.info,5.99 KB, application/x-info)
2017-01-29 07:06 UTC, Ooblick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-01-25 10:03:16 UTC
  File "/usr/lib64/python2.7/site-packages/packaging/version.py", line 31, in parse
    return Version(version)
RuntimeError: maximum recursion depth exceeded while calling a Python object
 * ERROR: dev-python/setuptools-34.0.2-r1::gentoo failed (compile phase):
 *   (no error message)
 * 

  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named desktop-unstable_20170121-000413) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-5.4.0 *
llvm-config --version:
3.9.1
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby21 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.2.0 [icedtea-bin-8]
  -----------------------------------------------------------------
Comment 1 Toralf Förster gentoo-dev 2017-01-25 10:03:19 UTC
Created attachment 461382 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-01-25 10:03:23 UTC
Created attachment 461384 [details]
dev-python:setuptools-34.0.2-r1:20170125-095034.log
Comment 3 Toralf Förster gentoo-dev 2017-01-25 10:03:26 UTC
Created attachment 461386 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-01-25 10:03:29 UTC
Created attachment 461388 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-01-25 10:03:32 UTC
Created attachment 461390 [details]
etc.portage.tbz2
Comment 6 N. Andrew Walsh 2017-01-25 18:19:43 UTC
I get a similar error, but the message (after hundreds lines starting with "File … ") is:

 File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1994, in _by_version_descending
    return sorted(names, key=_by_version, reverse=True)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1990, in _by_version
    name, ext = os.path.splitext(name)
  File "/usr/lib64/python2.7/posixpath.py", line 98, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "/usr/lib64/python2.7/genericpath.py", line 109, in _splitext
    if p[filenameIndex] != extsep:
RuntimeError: maximum recursion depth exceeded in cmp
Comment 7 Mike Gilbert gentoo-dev 2017-01-26 03:42:02 UTC
You probably have some python package installed with broken dependencies, either via pip or via a broken ebuild.

It would be helpful to know exactly which installed python package is triggering this; I cannot reproduce the problem locally.
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-26 03:47:05 UTC
# qlist -CISv python
app-eselect/eselect-python-20160516:0
dev-lang/python-2.7.12:2.7
dev-lang/python-3.4.5:3.4
dev-lang/python-3.5.2:3.5
dev-lang/python-exec-2.4.4:2
dev-python/PyQt4-4.12:0
dev-python/PyQt5-5.7.1:0
dev-python/PySocks-1.6.5:0
dev-python/appdirs-1.4.0-r1:0
dev-python/apsw-3.15.2_p1:0
dev-python/beautifulsoup-3.2.1-r1:python-2
dev-python/bsddb3-6.2.1:0
dev-python/certifi-2016.9.26:0
dev-python/cffi-1.9.1:0
dev-python/chardet-2.3.0:0
dev-python/cryptography-1.7.1:0
dev-python/cssselect-1.0.1:0
dev-python/cssutils-1.0.1:0
dev-python/cython-0.25.2:0
dev-python/dbus-python-1.2.4:0
dev-python/dnspython-1.12.0-r200:py2
dev-python/dnspython-1.12.0-r301:py3
dev-python/docopt-0.6.2-r1:0
dev-python/docutils-0.13.1:0
dev-python/enum34-1.1.6:0
dev-python/extras-1.0.0:0
dev-python/fixtures-3.0.0:0
dev-python/fudge-1.1.0:0
dev-python/gevent-1.1.2:0
dev-python/greenlet-0.4.11:0
dev-python/html5lib-0.9999999-r1:0
dev-python/httplib2-0.9.2-r2:0
dev-python/idna-2.2:0
dev-python/iniparse-0.4-r2:0
dev-python/ipaddress-1.0.18:0
dev-python/isodate-0.5.4:0
dev-python/linecache2-1.0.0:0
dev-python/lxml-3.7.1:0
dev-python/mako-1.0.3:0
dev-python/markupsafe-0.23:0
dev-python/mechanize-0.2.5-r1:0
dev-python/mimeparse-1.6.0:0
dev-python/ndg-httpsclient-0.4.2:0
dev-python/netifaces-0.10.5:0
dev-python/numpy-1.11.2-r1:0
dev-python/packaging-16.8:0
dev-python/paramiko-2.1.1:0
dev-python/pbr-1.10.0-r1:0
dev-python/pillow-3.4.2-r1:0
dev-python/ply-3.9:0
dev-python/protobuf-python-3.1.0:0
dev-python/psutil-5.0.1:0
dev-python/py-1.4.31:0
dev-python/pyGPG-0.2:0
dev-python/pyalsa-1.0.29:0
dev-python/pyasn1-0.1.9:0
dev-python/pycairo-1.10.0-r5:0
dev-python/pycparser-2.17:0
dev-python/pycrypto-2.6.1-r2:0
dev-python/pycups-1.9.73-r1:0
dev-python/pycurl-7.43.0:0
dev-python/pygments-2.1.3:0
dev-python/pygobject-2.28.6-r55:2
dev-python/pygobject-3.22.0:3
dev-python/pygtk-2.24.0-r4:2
dev-python/pyinotify-0.9.6:0
dev-python/pyopenssl-16.2.0:0
dev-python/pyparsing-2.1.10:0
dev-python/pyrsistent-0.12.0:0
dev-python/python-dateutil-2.6.0:0
dev-python/pyxattr-0.5.5:0
dev-python/pyxdg-0.25-r1:0
dev-python/pyxml-0.8.4-r3:0
dev-python/pyzmq-15.2.0:0
dev-python/qscintilla-python-2.9.4-r1:0
dev-python/rdflib-4.2.1:0
dev-python/reportlab-3.3.0-r1:0
dev-python/requests-2.12.5:0
dev-python/send2trash-1.3.0:0
dev-python/setuptools-33.1.1:0
dev-python/simplejson-3.10.0:0
dev-python/sip-4.19:0
dev-python/six-1.10.0:0
dev-python/soundcloud-python-0.5.0:0
dev-python/sqlalchemy-1.1.5:0
dev-python/ssl-fetch-0.4:0
dev-python/subunit-1.2.0-r1:0
dev-python/termcolor-1.1.0-r1:0
dev-python/testtools-2.2.0:0
dev-python/traceback2-1.4.0:0
dev-python/unittest2-1.1.0:0
dev-python/urllib3-1.20:0
dev-python/wget-3.2:0
virtual/python-dnspython-1:0
virtual/python-greenlet-1.0:0
virtual/python-ipaddress-1.0-r1:0
Comment 9 Mike Gilbert gentoo-dev 2017-01-26 03:54:31 UTC
I asked upstream for assistance.

https://github.com/pypa/setuptools/issues/946
Comment 10 Marek Bartosiewicz 2017-01-26 08:53:55 UTC
Same here. Can't upgrade setuptools.
Happened after I decided to build TensorFlow locally. It required some packages that I installed via pip, not checking portage first.

qlist -CISv python

app-admin/python-updater-0.14:0
app-eselect/eselect-python-20160516:0
dev-lang/python-2.7.12:2.7
dev-lang/python-3.5.2:3.5
dev-lang/python-exec-2.4.4:2
dev-python/appdirs-1.4.0-r1:0
dev-python/bottleneck-1.0.0:0
dev-python/certifi-2016.9.26:0
dev-python/cffi-1.9.1:0
dev-python/chardet-2.3.0:0
dev-python/coverage-4.2:0
dev-python/cryptography-1.7.1:0
dev-python/cycler-0.10.0:0
dev-python/cython-0.25.2:0
dev-python/dbus-python-1.2.4:0
dev-python/decorator-4.0.11:0
dev-python/enum34-1.1.6:0
dev-python/extras-1.0.0:0
dev-python/fixtures-3.0.0:0
dev-python/funcsigs-1.0.2-r1:0
dev-python/functools32-3.2.3:0
dev-python/idna-2.2:0
dev-python/ipaddr-2.1.11-r1:0
dev-python/ipaddress-1.0.18:0
dev-python/joblib-0.10.0:0
dev-python/jsonschema-2.5.1-r2:0
dev-python/libvirt-python-3.0.0:0
dev-python/linecache2-1.0.0:0
dev-python/m2crypto-0.25.1-r2:0
dev-python/mako-1.0.3:0
dev-python/markupsafe-0.23:0
dev-python/matplotlib-1.5.3:0
dev-python/mimeparse-1.6.0:0
dev-python/mock-2.0.0:0
dev-python/ndg-httpsclient-0.4.2:0
dev-python/networkx-1.11:0
dev-python/nose-1.3.7-r3:0
dev-python/numexpr-2.6.1:0
dev-python/numpy-1.11.2-r1:0
dev-python/packaging-16.8:0
dev-python/pandas-0.19.1:0
dev-python/pbr-1.10.0-r1:0
dev-python/pillow-3.4.2-r1:0
dev-python/pip-9.0.1-r1:0
dev-python/ply-3.9:0
dev-python/py-1.4.31:0
dev-python/pyasn1-0.1.9:0
dev-python/pyatspi-2.20.3:0
dev-python/pycairo-1.10.0-r5:0
dev-python/pycparser-2.17:0
dev-python/pycuda-2016.1.2:0
dev-python/pycups-1.9.73-r1:0
dev-python/pycurl-7.43.0:0
dev-python/pygobject-2.28.6-r55:2
dev-python/pygobject-3.22.0:3
dev-python/pygtk-2.24.0-r4:2
dev-python/pygtksourceview-2.10.1-r1:2
dev-python/pyopenssl-16.2.0:0
dev-python/pyparsing-2.1.10:0
dev-python/PyQt5-5.7.1:0
dev-python/pyrsistent-0.12.0:0
dev-python/PySocks-1.6.5:0
dev-python/python-dateutil-2.6.0:0
dev-python/pytools-2016.2.6:0
dev-python/pytz-2016.10:0
dev-python/pyxattr-0.5.5:0
dev-python/pyxdg-0.25-r1:0
dev-python/requests-2.12.5:0
dev-python/rfc3986-0.4.1:0
dev-python/setuptools-33.1.1:0
dev-python/sip-4.19:0
dev-python/six-1.10.0:0
dev-python/strict-rfc3339-0.7:0
dev-python/subunit-1.2.0-r1:0
dev-python/testtools-2.2.0:0
dev-python/traceback2-1.4.0:0
dev-python/typing-3.5.3.0:0
dev-python/unittest2-1.1.0:0
dev-python/urllib3-1.20:0
dev-python/vcversioner-2.16.0.0:0
dev-python/versioneer-0.16:0
dev-python/webcolors-1.5:0
dev-python/wheel-0.29.0:0
virtual/python-funcsigs-1:0
virtual/python-ipaddress-1.0-r1:0


some of my zsh history (not all command were succesful):

: 1481958786:0;pip install dbus-python
: 1481958821:0;pip install pydbus
: 1481958894:0;pip install python2-dbus
: 1481958961:0;pip install python-systemd-dbus
: 1483610316:0;pip install --upgrade pip
: 1483730799:0;pip
: 1483730807:0;pip install --user wheel
: 1483730904:0;pip install --user setuptools
: 1483730967:0;pip install --user wheel
: 1483730971:0;pip install wheel
Comment 11 Toralf Förster gentoo-dev 2017-01-26 09:08:55 UTC
Created attachment 461498 [details]
qlist -CISv python

(In reply to Mike Gilbert from comment #7)
no (manual call of pip) - this is the thinderbox

qlist is attached
Comment 12 Adrian Bassett 2017-01-26 16:55:11 UTC
(In reply to Toralf Förster from comment #11)
> Created attachment 461498 [details]
> qlist -CISv python
> 
> (In reply to Mike Gilbert from comment #7)
> no (manual call of pip) - this is the thinderbox
> 
> qlist is attached

FWIW I am seeing similar recursion-related install problems as a a result of the setuptools bump.  Yesterday setuptools was bumped to 34.0.2 and as a result many subsequent dev-python/ emerges failed.  Downgrading to setuptools-33.1.1 today allowed these to succeed but trying to re-emerge setuptools to the bumped 34.0.2-r1 now itself fails.

This is on an ~amd64 system with some python based ebuilds in a local overlay and some dimly-remembered use of pip.  I am particularly ignorant when it comes to python, etc., and the portage/non-portage interaction of python applications, so probably can't contribute further.
Comment 13 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-27 01:47:27 UTC
*** Bug 607354 has been marked as a duplicate of this bug. ***
Comment 14 Oleh 2017-01-27 06:20:57 UTC
i can confirm this failure with fresh stage3 buids. previosuly i had stage3 failure due circular dep between appdirs and setuptools due to careless bump. Now i going mask this release back down to setuptools-33 which doesn't require appdirs and seems less broken.
Comment 15 Mike Gilbert gentoo-dev 2017-01-29 03:02:45 UTC
Can someone experiencing the issue try this with FEATURES="-network-sandbox"? That may cause some more useful message to appear in the log.
Comment 16 Ooblick 2017-01-29 07:04:00 UTC
Created attachment 461800 [details]
No network-sandbox build.log

Build log without network-sandbox in FEATURES.
Comment 17 Ooblick 2017-01-29 07:06:30 UTC
Created attachment 461802 [details]
No network-sandbox emerge --info

Output of "'=dev-emerge --info '=dev-python/setuptools-34.0.2-r1::gentoo' without FEATURES="network-sandbox"

Unfortunately this error occurs without network-sandbox.
Comment 18 Ooblick 2017-01-29 11:11:11 UTC
Rebuilding appdir and packaging has fixed this for me:

emerge -1 dev-python/appdirs dev-python/packaging dev-python/setuptools

This is an ~amd64 system so the versions built are:

[ebuild   R    ] dev-python/appdirs-1.4.0-r1 
[ebuild   R    ] dev-python/packaging-16.8 
[ebuild   R    ] dev-python/setuptools-34.0.2-r1
Comment 19 Adrian Bassett 2017-01-29 13:56:15 UTC
(In reply to Ooblick from comment #18)
> Rebuilding appdir and packaging has fixed this for me:
> 
> emerge -1 dev-python/appdirs dev-python/packaging dev-python/setuptools
> 
> This is an ~amd64 system so the versions built are:
> 
> [ebuild   R    ] dev-python/appdirs-1.4.0-r1 
> [ebuild   R    ] dev-python/packaging-16.8 
> [ebuild   R    ] dev-python/setuptools-34.0.2-r1

Confirmed on ~amd64 with same package versions.  After these three, all of the other previously-failing packages with 'maximum recursion depth exceeded' messages in the log files re-emerged without problem.
Comment 20 Mike Gilbert gentoo-dev 2017-01-29 15:58:41 UTC
Debug request from upstream: Could someone add the following to an affected ebuild, and report back?

(remove the leading > characters)

> python_compile() {
> 	"${PYTHON}" -c "import pkg_resources; print(pkg_resources.require('setuptools'))"
> 	distutils-r1_python_compile
> }
Comment 21 Oleg Korsak 2017-01-30 13:05:02 UTC
Rebuilding appdir and packaging has fixed this for me too
Comment 22 Jeff Kowalczyk 2017-02-04 17:50:27 UTC
Additional data point: following the advice of comments here, I unmerged:

dev-python/pyparsing
dev-python/packaging
dev-python/appdirs

But did not unmerge dev-python/setuptools-34.0.2-r1. Next I emerged setuptools, which pulled in:

dev-python/pyparsing-2.1.10
dev-python/appdirs-1.4.0-r1
dev-python/packaging-16.8
dev-python/setuptools-34.0.2-r1

However, appdirs initially failed to emerge due to file collision:

/usr/lib64/python3.5/site-packages/appdirs-1.4.0-py3.5.egg-info
/usr/lib64/python2.7/site-packages/appdirs-1.4.0-py2.7.egg-info

After removing those files, appdirs, packaging and setuptools emerged successfully.
Comment 23 Markus Walter 2017-02-06 23:19:45 UTC
(In reply to Ooblick from comment #18)
> Rebuilding appdir and packaging has fixed this for me:
> 
> emerge -1 dev-python/appdirs dev-python/packaging dev-python/setuptools

This worked for me too (same situation, that is ~amd64).
Comment 24 Thomas Mueller 2017-05-17 10:45:17 UTC
(In reply to Ooblick from comment #18)
> Rebuilding appdir and packaging has fixed this for me:
> 
> emerge -1 dev-python/appdirs dev-python/packaging dev-python/setuptools
> 
> This is an ~amd64 system so the versions built are:
> 
> [ebuild   R    ] dev-python/appdirs-1.4.0-r1 
> [ebuild   R    ] dev-python/packaging-16.8 
> [ebuild   R    ] dev-python/setuptools-34.0.2-r1

This worked for me once I added the following package to the list:
dev-python/six-1.10.0

Before rebuilding this package I tried unmerging the packages (as to comment 22), the file collision did not occur but it also didn't help out. HTH
Comment 25 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-20 20:46:40 UTC
According to upstream bug report, this should be fixed with >=setuptools-36