Description of problem: When I'm trying to import Declarative extension I get ImportError. Version-Release number of selected component (if applicable): python3-sqlalchemy.x86_64 0:0.8.0-1.fc19 How reproducible: Always Steps to Reproduce: 1. python3 -c 'from sqlalchemy.ext.declarative import declarative_base' Actual results: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.3/site-packages/sqlalchemy/ext/declarative/__init__.py", line 1254, in <module> from .api import declarative_base, synonym_for, comparable_using, \ File "/usr/lib/python3.3/site-packages/sqlalchemy/ext/declarative/api.py", line 10, in <module> from ...orm import synonym as _orm_synonym, mapper,\ File "/usr/lib/python3.3/site-packages/sqlalchemy/orm/__init__.py", line 16, in <module> from .mapper import ( File "/usr/lib/python3.3/site-packages/sqlalchemy/orm/mapper.py", line 20, in <module> from .collections import deque ImportError: cannot import name deque Expected results: Successful import. Additional info: Sqlaclhemy installed through pip works as expected.
Well -- this looks like 2to3 mistranslating the lib/sqlalchemy/orm/mapper.py file. That should stay "from collections import deque" instead of being changed into a relative import. If you know what pip is doing in that case, maybe I could figure out what the reason the build in he package is doing things differently.
Hmm.... and running the conversion script python3 sa2to3.py on F20 is currently not translating that line.... I wonder if it was a problem in 2to3 at the time the package was built. /me kicks off a rebuild to see.
The rebuild seems to show that running sa2to3.py doesn't change that import line either: http://kojipkgs.fedoraproject.org//work/tasks/5479/5315479/build.log Search for "--- lib/sqlalchemy/orm/mapper.py" But the rpm that is generated at the end does have the wrong import in that file. So at some point it is being changed... just not shown in the output. Also happens with 0.8.1
I think I've got a fix. It seems that calling sa2to3.py on the sources and then doing python setup.py build causes this. It's still documented that you're supposed to call sa2to3.py explicitly so this might be a bug in the documentation. (Working on fixed builds that also update to 0.8.1 right now).
python-sqlalchemy-0.8.1-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-sqlalchemy-0.8.1-1.fc19
That should fix the issue. Let me know if it doesn't.
Yes, new build fixed the issue. Thank you for fast response.
Package python-sqlalchemy-0.8.1-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-sqlalchemy-0.8.1-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-7038/python-sqlalchemy-0.8.1-1.fc19 then log in and leave karma (feedback).
python-sqlalchemy-0.8.1-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.