Skip to content
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

Fix positional-only differences in sqlite3 #7222

Merged
merged 4 commits into from
Feb 15, 2022

Conversation

AlexWaygood
Copy link
Member

No description provided.

@github-actions

This comment has been minimized.

stdlib/sqlite3/dbapi2.pyi Outdated Show resolved Hide resolved
def __getitem__(self, index): ...
def __gt__(self, other): ...
def __eq__(self, __other): ...
def __ge__(self, __other): ...
Copy link
Member

Choose a reason for hiding this comment

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

Arguably this shouldn't exist. The type defines the tp_richcompare slot, which I believe automatically gets mapped to all six Python-level dunders, but it always returns NotImplemented for anything other than EQ and NE. As a result, sorted(list[Row]) doesn't work, but a type checker will allow it. Anyway, that's a problem for another day.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

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

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