-
Notifications
You must be signed in to change notification settings - Fork 564
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
typing.TypeAlias
causing type-review issues in Ubuntu 20.04 LTS
#1186
Comments
typing.TypeAlias
causing issues in Ubuntu 20.04 LTStyping.TypeAlias
causing type-review issues in Ubuntu 20.04 LTS
Could you do
to install the code just before #1134 was merged? |
I should have remarked - I'm doing this tracking as a submodule, because My testing runs $ python3.8 -m venv venv
$ source venv/bin/activate
$ (venv) pip install mypy
$ (venv) pip install pyodbc
# or
pip install git+https://github.com/mkleehammer/pyodbc@589fefc7962093c4ae85b36e87503a38455b2879
$ (venv) mypy src/ tests/ # This fails for both 'or' branches above
$ (venv) mypy src/ tests/ dependencies/pyodbc/src/pyodbc.pyi # This works for both 'or' branches above So, something about how the package is built now does not actually install pyodbc.pyi into the right spot. I currently see it showing up here: $ find venv -name pyodbc.pyi
venv/pyodbc.pyi That's a bit out of scope of my original issue request, though, so if we need to revisit this in a separate issue, I can move text around as you need. Against the current |
Sorry about the delay in responding to this, @ajnelson-nist . Point taken, I've raised PR #1191 to remove the use of |
Hello,
PR 1134 included this remark:
I'm unfortunately late in arriving to this change, and found that it does entail a slight operational complexity.
The Microsoft "Quick start" documentation for SQL Server on Ubuntu still uses Ubuntu 20.04. (Documentation is here). That edition of Ubuntu defaults to Python 3.8, has 3.9 available, and doesn't officially provide 3.10 or 3.11 (per Ubuntu package search results, as well as
apt
being unable to locatepython3.10
). So, the population of users that follow SQL Server on Ubuntu documentation are adversely effected byTypeAlias
from PR 1134.Further, Python 3.8 has a scheduled end of support in October of 2024 (per, among other sources, the Python.org downloads page).
I happen to be working on an application that needs to do some steps in Python 3.8, using SQL Server in environments including Ubuntu 20.04. Part of its testing workflow is relying on type checkers to ensure, for example, that I didn't introduce a feature in my own programming only available in a newer version of Python.
Is it possible to revert the changes in PR 1134 that are not compatible with Python 3.8? The key incompatibility I'm hitting is this, reported by
mypy
(notmypy --strict
):Somewhat as an aside - I see in the workflow file
codeql-analysis.yml
there is some static analysis being done on this repository. For what versions of Python does that run? Today's/setup.py
declares support for Python versions going back to end-of-lifed versions. If that analysis was testing each not-end-of-life Python version, I thought this issue would have raised itself from a GitHub Action. But it seems there is not a testmatrix
across this project's supported Python versions, unless I'm missing something in the YAML.Environment
To diagnose, we usually need to know the following, including version numbers. On Windows, be
sure to specify 32-bit Python or 64-bit:
4829107
mypy --version
:1.1.1
Issue
Expected behavior:
mypy src/pyodbc.pyi
exits successfully.Observed behavior:
The text was updated successfully, but these errors were encountered: