Bug 1294130
Summary: | pymongo.cursor.Cursor.__next__ is being replaced with the next builtin instead of def __next__() | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Randy Barlow <rbarlow> | ||||
Component: | python-pymongo | Assignee: | Randy Barlow <rbarlow> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | amcnabb, jal233 | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-01-18 21:03:28 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Randy Barlow
2015-12-25 06:24:26 UTC
Created attachment 1109336 [details]
mongoengine_test.py
I performed a test, and I believe it is the 2to3 utility that is making this change. The upstream github page states that pymongo supports Python 2.6 and 2.7, and Pythons 3.2-3.5. Their setup.py does not seem to use 2to3. I would interpret that to mean that 2to3 is not needed with current versions of pymongo, but I am not sure. Alternatively, it may be possible to exclude the fixer that is renaming next() to __next__() so that this problem goes away. I recommend investigating whether 2to3 is really needed any longer. If it is not, it would be beneficial to drop it from the spec file. The upstream release notes explicitly state not to use 2to3 with pymongo >= 3: https://api.mongodb.org/python/current/changelog.html#changes-in-version-3-0 This is certainly the issue - please fix this as pymongo does not work with Python 3 and Python 3 is the default Python implementation for Fedora >= 23. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. I believe this fix will be straightfoward, as dropping just the 2to3 line makes a package that works in Python 2 and Python 3 with the test I attached earlier. |