Fixes #1361 and #1027 - update to python 3.2+ API (existing code calls removed API)#1365
Fixes #1361 and #1027 - update to python 3.2+ API (existing code calls removed API)#1365fviard merged 4 commits intos3tools:masterfrom
Conversation
Wouldn't that break Python 2.x support? I still see tons of legacy Python 2 fallback code all over the place in s3cmd's code. IMHO removing Python 2 support should be done in a more organized fashion (aka all at once, then bump the major version) rather than a tidbit here or there and breaking things for people that still expect Python 2 support to work as the documentation suggests: "S3cmd requires Python 2.6 or newer." (quote from master readme.md). [Note: I use 3.12, but I know how it is when projects/ packages break backwards compatibility for no particular reasons. ] |
I agree with you this will break code for people using python2.X though if nothing is done, it will break code for people using python3.12+ so either end it will break someone's code. So far python2.7 has been deprecated in 2008, and reached its end-of-life in 2020. I think it's time to move forward. I believe things should be done in this order:
Later on more changes could be added to remove python2 support. |
|
Thank you for your contributions. In the current case, it would be easy to fix like it is done in other files:
Would it be possible for you to fix your PR with that? Otherwise, as I know that it has been a long time, I will do it :-) |
thanks 👍 |
|
Merged, thank you very much! |
Fixes:
Should be OK to replace the removed API call, since the replacement was added in python 3.2.
https://docs.python.org/3/library/configparser.html