Skip to content

Add note that csv.Dialect is usually the wrong class - #16450

Merged
srittau merged 1 commit into
python:mainfrom
Ryanakml:csv-dialect-note-14667
Sep 28, 2026
Merged

srittau merged 1 commit into
python:mainfrom
Ryanakml:csv-dialect-note-14667

Conversation

@Ryanakml

Copy link
Copy Markdown
Contributor

Fixes #14667.

Add a note to csv.Dialect pointing to _csv.Dialect, per the resolution suggested in the issue.

Upstream: https://github.com/python/cpython/blob/main/Lib/csv.py#L87 and https://github.com/python/cpython/blob/main/Modules/_csv.c (get_dialect returns _csv.Dialect, not an instance of csv.Dialect); related cpython#138352.

Assisted by opencode (Muse Spark 1.3 xhigh).

@github-actions

Copy link
Copy Markdown
Contributor

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

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau
srittau merged commit c981c92 into python:main Sep 28, 2026
88 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 different Dialect types - one in csv module and other in _csv module

2 participants