tantale / deprecated

Python @deprecated decorator to deprecate old python classes, functions or methods.
MIT License
298 stars 32 forks source link

Support Python 3.11, drop older Pythons entirely #59

Closed colindean closed 1 year ago

colindean commented 1 year ago

This includes #58 and then drops Pythons older than 3.7 since they're all EOL. It also updates some GHA action versions.

colindean commented 1 year ago

https://app.travis-ci.com/github/tantale/deprecated/jobs/591380170#L212-L213 indicates that the 3.7 build needs an updated version of the import_metadata library. IIRC this necessity goes away in 3.8 or newer…

colindean commented 1 year ago

At this point, all Travis x86 jobs are completed…

colindean commented 1 year ago

Travis build failures are transient, it seems. Those failing jobs have succeeded in the past with no relevant changes in the meantime.

colindean commented 1 year ago

@tantale I'd love your feedback and to see this merged and released.

colindean commented 1 year ago

@tantale What feedback do you have?

sbor23 commented 1 year ago

Any news? I just did the same work without seeing this.

laurent-laporte-pro commented 1 year ago

Hello,

Sorry for the (very) late answer: I don’t have much time to work on this project.

Anyway, you made a good job. I agree that the dependencies and GitHub actions must be updated.

But, since the code base don’t change, there is no good reason to drop support for old Python versions: stating that Pytest can’t test Python 2.7 anymore doesn’t mean the code base is not Python 2.7 compatible. Do you understand the idea?

I will find time to review your code.

colindean commented 1 year ago

Thank you kindly, @laurent-laporte-pro.

But, since the code base don’t change, there is no good reason to drop support for old Python versions: stating that Pytest can’t test Python 2.7 anymore doesn’t mean the code base is not Python 2.7 compatible. Do you understand the idea?

I think it's matter of representing what's tested. If the project represents that it's compatible with a version, it should be tested on it, esp. automated testing. Older Deprecated library versions remain compatible; only future releases could push someone toward a non-EOL Python version, a healthy practice for the ecosystem.

I think the changes I've made should facilitate re-adding the versions dropped. I could re-add the older versions to the testing matrix, but that could use a lot of CPU time for testing for Python versions that are insecure, out-of-date, and generally unused (with the exception of 2.7, which still has holdouts).

For me, getting Python 3.11 supported and tested is a top priority.

Mariatta commented 1 year ago

Perhaps this PR can be more focused about adding tests against Python 3.11. The parts about removing older Python support can be done as a separate PR. Or is there reason that we need to do it all at once?

colindean commented 1 year ago

This PR started as "coopt the existing Python 3.11 support patch and make it work" which turned into "drop the versions with tests that don't pass because of old CI setups" and settled on "hugely revised CI setup that drops old, unsupported versions and adds the new versions".

I could re-add the older versions to CI but I really don't want to spend much time in doing so beyond adding their strings to some lists in config files. I sank an afternoon into what's here as of 450dd3c.

hugovk commented 1 year ago

GitHub Actions has also dropped support for EOL Python 3.5-3.6:

Version 3.6 with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

image

https://github.com/hugovk/deprecated/actions/runs/4480549799

tantale commented 1 year ago

Fixed in https://github.com/tantale/deprecated/releases/tag/v1.2.14

colindean commented 1 year ago

Thanks! Sorry I couldn't get around to massaging this PR to the desired state. It's been a busy few weeks.