sethmlarson / truststore

Verify certificates using OS trust stores
https://truststore.readthedocs.io
MIT License
151 stars 18 forks source link

Supporting older python #107

Closed andrewleech closed 1 year ago

andrewleech commented 1 year ago

Hi, I'm generally quite in favour of keeping up with latest stable python however there are many common OS / distros which still ship with Putin 3.8 / 3.9.

Are there particular features of 3.10 that this library depends on that aren't available in older versions?

As per https://github.com/sethmlarson/truststore/issues/75 I'm interested in ways to use this everywhere by default, however the 3.10 minimum feels a bit restrictive still.

sethmlarson commented 1 year ago

Unfortunately without making truststore not pure-Python (thus disqualifying us from use by pip) we can't support older Python versions. We got the APIs we needed in 3.10: https://sethmlarson.dev/experimental-python-3.10-apis-and-trust-stores

andrewleech commented 1 year ago

Ah thanks for the reply (and blog link) that all makes very clear sense. Yep support for older versions really would not be feasible.

While I'd be curious about a separate binary version for older python it would not really be worth you or my time developing such a package - better to just encourage users to upgrade!

eli-schwartz commented 1 year ago

Unfortunately without making truststore not pure-Python (thus disqualifying us from use by pip) we can't support older Python versions.

Is it not possible to make a C extension optional for 3.10 (or even just make it <3.10 exclusive) and then just have pip only use it for 3.10 + pure-python regardless of other modes?

sethmlarson commented 1 year ago

@eli-schwartz If you'd like to contribute this feature that would be awesome, I would happily review it! :rocket: Not much time right now for open source outside of the most critical paths right now for me unfortunately :/