MagicStack / MagicStack/asyncpg
set value to datetime.time for TIME type is not working
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
column type is TIME. when set value to datetime.time, I got this exception.
asyncpg.exceptions.DataError: invalid input for query argument $10: datetime.time(0, 1, 2, tzinfo=<DstTzInfo... ('NoneType' object has no attribute 'days')
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing a PostgreSQL TIME parameter binding with Python datetime.time, including the timezone shown in the exception. Trace the value through asyncpg's parameter encoding and add or update a focused regression test; done means valid datetime.time values are accepted without the reported DataError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100