keis / base58

Base58 and Base58Check implementation compatible with what is used by the bitcoin network.
MIT License
180 stars 59 forks source link

Drop python 2.7 and 3.4 support #43

Closed hukkin closed 4 years ago

hukkin commented 4 years ago

Drop python 2.7 and 3.4 support. Both have reached their end-of-life date.

keis commented 4 years ago

Thanks for the PR @hukkinj1

I'm a bit of two minds on this one: on one hand I'm not in rush to remove 2 support just because it's now EOLd, but the cleanups do look nice.

Did you have some py3 features in mind that would require py2 support to be dropped first?

hukkin commented 4 years ago

Hey @keis ! Sure, no pressure to merge at all. We can leave this open for reference and merge when you feel like.

When it comes to py3 features, I would perhaps be interested in using https://docs.python.org/3.5/library/typing.html to type annotate the public API and expose it via PEP 561. So kind of like https://github.com/keis/base58/pull/11 but hopefully less noise. If you don't like the idea of this, would adding type data to https://github.com/python/typeshed be fine for you?

Note that merging this doesn't mean v1.0.3 and before are removed from py2 users, they'll still be there, and e.g. pip install base58 will still install latest py2 supported version if using py2 interpreter. We could also make the next release v2.0.0 and cut a v1 branch for v1 hotfixes (which I doubt there will be seeing how stable and widely used the lib has been).

hukkin commented 4 years ago

Also, using pytest as an example: pytest has officially dropped py2 support but still works fine in this project's python2 travis CI job, because the setuptools python_requires option makes us install latest py2 supported pytest.

keis commented 4 years ago

Aha, I didn't realise pip/setuptools was smart enough to not pull the new version for python2, that's good news! With that in mind I don't see a reason not to merge this, thanks again for doing the work.

I like the idea of adding typing when the py3 syntax can be used