-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: to_sql fails with datetime.time values with sqlite fallback mode #8341
Comments
@jorisvandenbossche pls move any sql issues you don't think can get to in next couple of days to 0.15.1 pls. |
push? |
@jreback I will have a look at the sql issues this evening and push if necessary |
@jorisvandenbossche gr8 thanks |
I will try to look at it this weekend |
See #8470 to fix the fact it fails silently. So now it will again just raise a |
We could provide an adapter:https://docs.python.org/2/library/sqlite3.html#registering-an-adapter-callable |
I'm proposing a solution to #8341 As @jorisvandenbossche suggested, I use a sqlite3 adapter to transform `datetime.time` objects into string (`hh:mm:ss.ffffff`, as this what sqlalchemy... I think?) I added a test in the class `_TestSQLApi`, so that the solution is tested with both sqlalchemy and the sqlite3 fallback. Thus, the result should be consistent. Author: Nicolas Bonnotte <nicolas.bonnotte@gmail.com> Closes #11547 from nbonnotte/sqlite-to_sql-time and squashes the following commits: 8d449c5 [Nicolas Bonnotte] BUG: to_sql with datetime.time values with sqlite, #8341
Closed by #11547 |
Columns of
datetime.time
were not yet supported in sqlite fallback mode (as noted in #7567, and do work for sqlalchemy), but it now seems to fail silently with master (instead of raising an error).Using:
gives:
The text was updated successfully, but these errors were encountered: