Opened 10 years ago
Closed 9 years ago
#5330 closed defect (fixed)
Python 3.4.3 does not work with default values in SQLAlchemy <0.9
Reported by: | spaetz | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | python3 |
Cc: | berkerpeksag, Christopher Allan Webber | Parent Tickets: | 5017 |
Description
Trying to register on by mediagoblin (v0.8) with python3, I get the following
error: sqlalchemy.exc.StatementError: utcnow() takes no arguments (1 given) (original cause: TypeError: utcnow() takes no arguments (1 given)) 'INSERT INTO coreusers (username, email, pw_hash, created, wants_comment_notification, wants_notifications, license_preference, url, bio, uploaded, upload_limit, location, activity) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' [{'license_preference': None, 'activity': None, 'location': None, 'upload_limit': None,'pw_hash': None, 'email': 'Sebastian@…', 'bio': None, 'url': None, 'username': 'spaetz'}]
Other relevant reports: http://stackoverflow.com/questions/22481905/sqlalchemy-python-3-default-column-value and has apparently been fixed in SQLAlchemy 0.9.
As our setup.py still constraints SQLAlchemy for some unknown reason to <0.9.0, we fail on python3 setups. Removing that constraint and upgrading SQLAlchemy to the current version let mediagoblin continue without errors. I ran the test suite with the new SQLAlchemy and no new error came up.
Sebastian
Attachments (1)
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
I think we are using <0.9 because of sa-migrate. #814 is a blocker for this.
by , 9 years ago
Attachment: | 0001-Upgrade-sqlalchemy-and-sa-migrate.patch added |
---|
comment:3 by , 9 years ago
Cc: | added |
---|---|
Owner: | removed |
Status: | new → review |
comment:4 by , 9 years ago
Cc: | added; removed |
---|
comment:5 by , 9 years ago
So this commit hints as to the original reasoning for that pinning:
commit f7f38fb047059f0289060f2b87a213e2909e1a20 Author: Christopher Allan Webber <cwebber@dustycloud.org> Date: Wed Jan 1 16:42:04 2014 -0600 sqlalchemy-migrate 0.8.X doesn't get along with sqlalchemy 0.9.0
Maybe newer sqlalchemy-migrate doesn't have this restriction and it's resolvable. We're still pinned at an older sqlalchemy-migrate as well. Is that needed? I think we were stuck there because pbr broke things at one point. Maybe it doesn't break things anymore.
I'll try doing a test with the updated dependencies later today, I hope.
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | review → closed |
Annnnd it took me 3 weeks, but hey! I finally tested, and it works great, and fixes some of the last py3 issues :)
0.9.0 is a backwards incompatible release, so we need to check its release notes and update the codebase if necessary before upgrading to 9.9+.