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

Don't use py3.10 TypeAlias in pyodbc.pyi #1191

Merged

Conversation

keitherskine
Copy link
Collaborator

Re #1186 , the typing construct TypeAlias was introduced in Python 3.10. This is causing mypy issues with people who are using older versions of Python. Hence, drop the TypeAlias references in pyodbc.pyi and just use the raw typing definition for cursor descriptions. This appears to solve the mypy issue:

(pyodbcpyi38) C:\Users\toast>mypy C:\Users\toast\Documents\GitHub\forks\pyodbc\src\pyodbc.pyi
Success: no issues found in 1 source file

Note, the Final typing references are being kept, despite them being introduced only in Python 3.8.

Copy link
Contributor

@ajnelson-nist ajnelson-nist left a comment

Choose a reason for hiding this comment

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

I've tested this, and confirm this addresses the issues I raised in #1186. Thank you!

Copy link
Collaborator

@gordthompson gordthompson left a comment

Choose a reason for hiding this comment

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

lgtm

@keitherskine keitherskine merged commit e7fefd8 into mkleehammer:master Apr 6, 2023
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.

3 participants