mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.92k stars 563 forks source link

Add support for Python 3.10, drop EOL 3.5 #952

Closed hugovk closed 2 years ago

hugovk commented 3 years ago

Fixes https://github.com/mkleehammer/pyodbc/issues/954.

Python 3.10.0 final is due for release in October:

The final release candidate is now out and the Python release team has issued a call to action for community members:

We strongly encourage maintainers of third-party Python projects to prepare their projects for 3.10 compatibilities during this phase. As always, report any issues to the Python bug tracker.

https://discuss.python.org/t/python-3-10-0rc2-is-now-available/10496?u=hugovk

So let's also test and add support for 3.10.

Drops support for EOL Python 3.5.

keitherskine commented 3 years ago

@hugovk Many thanks for this PR, but could you update setup.py to reflect the addition of Python 3.9 and 3.10?

Also, the build tests are failing for Python 3.5. Rather than fix the unit tests, it seems easiest to add #954 into this PR. If you're OK with that, go ahead and comment out the relevant Python 3.5 tests in appveyor.yml, and ubuntu_build.yml, add Python 3.9 tests to appveyor.yml (3.10 is not available there), and remove the reference to Python 3.5 in setup.py. Then the build tests for both Windows and Ubuntu should pass. Many thanks!

hugovk commented 3 years ago

@hugovk Many thanks for this PR, but could you update setup.py to reflect the addition of Python 3.9 and 3.10?

I already added the 3.9 and 3.10 classifiers to setup.py 👍

Also, the build tests are failing for Python 3.5. Rather than fix the unit tests, it seems easiest to add #954 into this PR. If you're OK with that, go ahead and comment out the relevant Python 3.5 tests in appveyor.yml, and ubuntu_build.yml, add Python 3.9 tests to appveyor.yml (3.10 is not available there), and remove the reference to Python 3.5 in setup.py. Then the build tests for both Windows and Ubuntu should pass. Many thanks!

Good idea, removed 3.5!

I also added python_requires to setup.py, so pip knows which package version to install for end users.


Whilst we're at it, how about also dropping 2.7? It's been EOL for nearly two years and is little used. Dropping would further reduce the maintenance burden and allow modern features of Python to be used.

Here's the pip installs for pyodbc from PyPI for August 2021:

category percent downloads
3.7 71.38% 8,562,696
3.8 15.27% 1,831,650
3.6 6.20% 743,452
2.7 3.02% 362,048
3.5 2.73% 327,753
3.9 0.91% 109,209
null 0.49% 59,002
3.4 0.00% 576
3.10 0.00% 330
3.3 0.00% 3
2.6 0.00% 1
Total 11,996,720

Source: pip install -U pypistats && pypistats python_minor pyodbc --last-month

hugovk commented 2 years ago

Updated now Python 3.10 final is out.

https://discuss.python.org/t/python-3-10-0-is-now-available/10955

abitrolly commented 2 years ago

This is needed to fix broken builds now.

keitherskine commented 2 years ago

@hugovk AppVeyor have at last added Python 3.10 to their Windows VS2019 build. In which case, it would be great if you could add Python 3.10 to the pyodbc appveyor.yml, if you get a chance. Many thanks!

For ref: https://www.appveyor.com/docs/windows-images-software/#python

hugovk commented 2 years ago

@hugovk AppVeyor have at last added Python 3.10 to their Windows VS2019 build. In which case, it would be great if you could add Python 3.10 to the pyodbc appveyor.yml, if you get a chance. Many thanks!

For ref: appveyor.com/docs/windows-images-software/#python

Done!

hugovk commented 2 years ago

By the way, Python 3.6 is EOL in a couple of weeks :)

https://endoflife.date/python