Summary: | dev-python/pymongo-2.9 - NameError: name 'basestring' is not defined | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Lujeni <julien> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alunduil, grozin, kripton, lssndrbarbieri, proxy-maint, python, sbraz, ultrabug |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
/var/tmp/portage/dev-python/pymongo-2.9/temp/sphinx-err-s_cbs24r.log |
Description
Juergen Rose
2015-12-17 09:48:46 UTC
Created attachment 419456 [details]
/var/tmp/portage/dev-python/pymongo-2.9/temp/sphinx-err-s_cbs24r.log
It fails with sphinx v1.2.2 as well: * python3_4: running distutils-r1_run_phase python_compile_all Running Sphinx v1.2.2 Exception occurred: File "/var/tmp/portage/dev-python/pymongo-2.9/work/pymongo-2.9-python3_4/pymongo/__init__.py", line 83, in get_version_string if isinstance(version_tuple[-1], basestring): NameError: name 'basestring' is not defined The full traceback has been saved in /var/tmp/portage/dev-python/pymongo-2.9/temp/sphinx-err-849wdgq2.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at <https://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks! * ERROR: dev-python/pymongo-2.9::gentoo failed (compile phase): 'USE=-doc emerge -v1 pymongo' works with eselected python2.7 and python3.4. Same with pymongo-2.9.3 (In reply to Andrey Grozin from comment #4) > Same with pymongo-2.9.3 Here too. Offered in OUT #irc channel, https://github.com/oxplot/fysom/issues/1 indicates in the opening line, basestring is an object, or type, not supported in the py3. vns. This requires reporting upstream and until then, consider re-setting PYTHON_COMPAT to py2.7 only. You are using version 2.9 when 3.2.2 is available for ~amd64. The issue you're referring to was fixed upstream in 3.0: https://github.com/mongodb/mongo-python-driver/commit/d494105aa4199cd5f0d9b47c7ae17e20e9175dc3#diff-f8c0b2c357efcb7a6d94aeb9e485c7f5L73 (In reply to Louis Sautier from comment #7) > You are using version 2.9 when 3.2.2 is available for ~amd64. The issue > you're referring to was fixed upstream in 3.0: > https://github.com/mongodb/mongo-python-driver/commit/ > d494105aa4199cd5f0d9b47c7ae17e20e9175dc3#diff- > f8c0b2c357efcb7a6d94aeb9e485c7f5L73 This issue is still a problem due to ipython requiring <dev-python/pymongo-3.0. If that restriction can be lifted that may alleviate this problem. Not sure why others are seeing this issue but for me it's just ipython. (In reply to Alex Brandt from comment #8) > This issue is still a problem due to ipython requiring > <dev-python/pymongo-3.0. If that restriction can be lifted that may > alleviate this problem. Not sure why others are seeing this issue but for > me it's just ipython. Same here. I don't use pymongo, it's just a dependency of ipython. I guess you have USE=doc or USE=mongodb set for ipython because otherwise, it would not try to pull pymongo (https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/ipython/ipython-4.1.1.ebuild#n23). Looking at the ipython ebuilds, the DEPEND on pymongo looks like something which was not updated since ipython/jupyter was split into different packages (http://blog.jupyter.org/2015/04/15/the-big-split/) ipython does not need pymongo, ipyparallel does (https://github.com/ipython/ipyparallel/blob/master/ipyparallel/controller/mongodb.py) and since it's not listed in setup.py, it is certainly optional. The code seems to support both old and recent pymongo versions too. I think a new bug should be opened to refactor the ipy* ebuilds. (In reply to Alex Brandt from comment #8) > (In reply to Louis Sautier from comment #7) > > You are using version 2.9 when 3.2.2 is available for ~amd64. The issue > > you're referring to was fixed upstream in 3.0: > > https://github.com/mongodb/mongo-python-driver/commit/ > > d494105aa4199cd5f0d9b47c7ae17e20e9175dc3#diff- > > f8c0b2c357efcb7a6d94aeb9e485c7f5L73 > > This issue is still a problem due to ipython requiring > <dev-python/pymongo-3.0. If that restriction can be lifted that may > alleviate this problem. Not sure why others are seeing this issue but for > me it's just ipython. Not following. This is a bug about pymongo being made to import a type not found in its modules under py3. ipython is a reverse dep. Why are you pointing at ipython when the PYTHON_COMPAT of pymongo is allowing py3. ? (In reply to Ian Delaney from comment #11) > (In reply to Alex Brandt from comment #8) > > (In reply to Louis Sautier from comment #7) > > > You are using version 2.9 when 3.2.2 is available for ~amd64. The issue > > > you're referring to was fixed upstream in 3.0: > > > https://github.com/mongodb/mongo-python-driver/commit/ > > > d494105aa4199cd5f0d9b47c7ae17e20e9175dc3#diff- > > > f8c0b2c357efcb7a6d94aeb9e485c7f5L73 > > > > This issue is still a problem due to ipython requiring > > <dev-python/pymongo-3.0. If that restriction can be lifted that may > > alleviate this problem. Not sure why others are seeing this issue but for > > me it's just ipython. > > Not following. This is a bug about pymongo being made to import a type not > found in its modules under py3. ipython is a reverse dep. Why are you > pointing at ipython when the PYTHON_COMPAT of pymongo is allowing py3. ? Ian, read the entire quote above. I was responding to Louis Sautier's question about why this version was still in use when the fix is in a newer version. I totally missed this bug. You all should ping me. =) Unlike pymongo 3.x, pymongo 2.x (including 2.9.x) has to run 2to3 during setup to translate the source for python 3. "python setup.py install" does this, and so does installing from pypi using easy_install or pip. I'm guessing something has changed in the ebuild that causes 2to3 to not be run? PyMongo 3.x supports python 2.x and 3.x single source, since we dropped support for python 2.4 and 2.5. I see. This problem is specifically about the doc use flag. The pymongo-2.9.x ebuilds seem to work fine for python 2.7 and 3.x, but enabling the doc flag causes the install to fail. Thanks to everyone for their patience, I finally took the time to look into it and Bernie is right it was about doc generation failing with python3. I've updated the ebuild to use python2 to build the docs and now all is good :) It's in tree, mirrors should have the new versions in a few. FYI - I fixed this problem in PyMongo 2.9.4. The docs build properly under python 3.x now. https://api.mongodb.com/python/2.9.4/changelog.html#changes-in-version-2-9-4 |