MagicStack / MagicStack/asyncpg

set value to datetime.time for TIME type is not working

Open
#920 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.