remove sqlalchemy.exceptions entirely
>>> from sqlalchemy.exceptions import OperationalError
Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: No module named exceptions
Since there is an alias for sqlalchemy.exc, I'd would expect this to work.
SQLAlchemy v0.7.5[BR] Python v2.7.2[BR] System Arch Linux[BR]
Comments (6)
-
repo owner -
Account Deleted It's not my code, that's the real problem. The code (cjklib) broke with 0.7, it worked before.[BR]
As there is an alias for the exceptions package, I would expect the import to work but it's reasonable to expect users to update their code every 3 years. :)[BR]
Feel free to close the ticket, I just didn't find a ticket about this with the official response.
-
repo owner - changed title to remove sqlalchemy.exceptions entirely
- changed milestone to 0.8.0
- marked as task
Yeah there's a note here about the sys.modules alias being removed, so I guess in 0.8 we have to remove this in hardcore mode to eliminate confusion:
http://www.sqlalchemy.org/trac/wiki/07Migration#Thesqlalchemy.exceptionsaliasinsys.modulesisremoved
-
repo owner cb15295850cd9c1e6cec3da8127ae0e3c04d858c in the 0.8 branch
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.8.0b1 (automated comment)
- Log in to comment
It's been called
sqlalchemy.exc
since version 0.5 which was first released in January, 2009. Perhaps you can correct your code to usesqlalchemy.exc
?exceptions
is there for some very old backwards compatibility concerns.