Skip to content

[psycopg2] Improve string_types annotations - #16652

Merged
srittau merged 1 commit into
python:mainfrom
salahadin-hassen:psycopg2-typecaster-dicts
Oct 29, 2026
Merged

srittau merged 1 commit into
python:mainfrom
salahadin-hassen:psycopg2-typecaster-dicts

Conversation

@salahadin-hassen

Copy link
Copy Markdown
Contributor

The per-cursor and per-connection string_types registers map integer PostgreSQL type OIDs to psycopg2 typecasters, like the existing module-level string_types: dict[int, _type]; the cursor register is None until a typecaster is registered on that cursor.

Upstream (psycopg2 2.9.13):

AI agent used: Claude Code (Claude Opus 5.5), which researched the psycopg2 source, implemented the change, and ran the type-checking probes and typeshed checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit be1b284 into python:main Oct 29, 2026
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants