ledger
ledger copied to clipboard
Remove Python 2 support
How do ~~we~~people feel about removing support for Python 2 to simplify the codebase a bit now that use of Python 2 has been deprecated for over two years?
Python 2.7 support ended on January 1, 2020, […] [the] final release, 2.7.18, occurred on April 20, 2020, […] [and] marked the end-of-life of Python 2.
(source Wikipedia)
Thanks for your thoughts on this, @tbm.
I think keeping Python 2 support around for another release and communicating its deprecation release and/or date in some shape or form would be appreciated by those still using Python 2 support*.
This project's versioning hasn't been strictly adhering to semver—which is perfectly alright. Yet at some point I think it would be good to get an idea / clarification about future versions, especially as bumping the major version number from 3
to 4
(e.g. when there are breaking changes and removal of Python 2 support could be considered as such) ~~likely~~potentially creates confusion with Ledger 4 an experimental implementation of ledger in Haskell that is independent of this implementation in C++.
The many changes since the last release, including the added support for gpg encrypted journal files (yay!), surely suggests bumping the minor version, yet waiting for Python 2 removal in this project another 2 years until the planned 3.4.0 release date seems ill advised.
A few (hopefully helpful) questions:
- What if the next release is the last release to include Python 2 support, but will be 3.2.2 instead of 3.3.0?
- What if the next release is the last release to include Python 2 support and is 3.3.0 as planned, but the 3.4.0 release is scheduled (much) sooner after the 3.3.0 release?
*If anyone ~~are~~ reading this is using Ledger's Python API with Python 2 I'd like to hear from you to learn more about your use-case and requirements. 🙂
I'm fine with dropping support for python2, but I agree with @tbm's comment that a deprecation notice and waiting at least one release cycle would be good.
Glad to hear you are fine with dropping support for Python 2, @jwiegley. :)
It seems we are all in agreement that the next release should continue to include support for Python 2 along with a deprecation notice. And the release after the next will remove support for Python 2.
All that seems to be left to do is (proposing responsible people in parentheses):
- [ ] Write a deprecation notice (@afh, @tbm)
- [ ] Add and deploy deprecation notice to ledger-cli.org website and this repo (README, Release Notes, CHANGELOG, etc.) (@afh)
- [ ] Announce Python 2 deprecation plans on Ledger mailing-list (@tbm)
- [ ] Decide on the versioning for the subsequent releases (see my earlier comment) (@afh, @jwiegley, @tbm)
- [ ] Release a new version of ledger (@tbm)
- [ ] Merge this PR (@afh)
Do you agree with the above proposal? Did I miss anything?
What are your thoughts on the following deprecation notice?
NOTA BENE: This is the last release that will support Python 2! With the next release ledger's' Python module will require Python 3.
The reason for removing support for Python 2 is that support for Python 2 ended on Januar 1, 2020 and the final release (2.7.18) published on April 20, 2020 marked the end-of-life for Python 2.
I'd really like to drop Python 2 support, so hopefully we can get the deprecation notice into the upcoming release, @tbm?
Honestly I'm ok with dropping Python 2 support now (sorry, I think I was the one wondering if we should wait another release; but it's 2023 now!).
But yeah if someone wants to add a deprecation notice.
Anyway, this PR no longer applies cleanly.
I'm also okay with dropping Python 2 in the coming release and not wait for another release cycle. I haven't been following the mailing list or IRC too closely; has there been some conversation around this?
Once I'm done with rebasing this PR's branch onto master and resolving the resulting merge conflicts I'll push new changes to this PR.
Odd the changes succeeded building and testing for me locally using nixpkgs; I'll investigate what is going (wr)on(g) with the checks here…
My build succeeded locally despite the compiler error as my flake.nix still declared usePython = false
🤦
ℹ️ The failing test on Linux 342 - RegressTest_786A3DD0
has been reported in #2176 and #2178 is an attempt to find the underlying cause.
ℹ️ Failing test should be resolved once #2178 is merged.
This branch cannot be rebased due to conflicts
I've merged this manually. I hope I didn't mess up anything.
Thanks for merging, @tbm 🙏
After all this time thinking I'd never see the day… Thank you, Ledger Python 2 support, for having served so well for so long 🥲