- changed status to closed
Regression: Date takes no parameters
Issue #3446
resolved
In Version 0.8.3 you could format Date with storage_format
Date(storage_format="%(day)02d.%(month)02d.%(year)04d")
In 1.0.5 this is no longer possible
Column('timestamp', Date(storage_format="%(day)02d.%(month)02d.%(year)04d"), primary_key=True),
TypeError: object() takes no parameters
Comments (4)
-
repo owner -
repo owner - changed status to open
note in the 0.9 migration notes
-
repo owner - changed status to resolved
- add an 0.9 migration note regarding TypeEngine's default
constructor removal; fixes
#3446
→ <<cset a463bb31ea8a>>
-
repo owner - add an 0.9 migration note regarding TypeEngine's default
constructor removal; fixes
#3446
→ <<cset cc91a4c148c7>>
- add an 0.9 migration note regarding TypeEngine's default
constructor removal; fixes
- Log in to comment
that code doesn't work - the argument you are passing in 0.8.3 is ignored entirely. In the 0.9 series, this was fixed so as not to be misleading. If you want a sqlite date with a storage format you need to use the sqlite.DATE type. Notice below, running this script against any 0.8 version, that the storage_format under 0.8.3 is gone with a regular date:
we made the mistake here of only putting a deprecation warning on that which you can see above, which is a mistake because nobody runs Python with the -W flag, and also this wasn't mentioned in the 0.9 migration notes, because again, it was such an old and ignored thing which didn't even work that we didn't think anyone was doing it, but a bunch of people hit it. I should probably put a note in the 0.9 migration notes. thanks for reporting, we should probably reach out to folks still on 0.8 for this one.