Skip to content

drop support for Py2 and Py3.4#498

Closed
Borda wants to merge 4 commits into
google:masterfrom
Borda:drop/py2+3.4
Closed

drop support for Py2 and Py3.4#498
Borda wants to merge 4 commits into
google:masterfrom
Borda:drop/py2+3.4

Conversation

@Borda

@Borda Borda commented Mar 12, 2024

Copy link
Copy Markdown
Contributor

I am trying to address #420 (comment)
cc: @hugovk if you would be so kind (as always you have been) and may help me, check I missed 🐰

@hugovk hugovk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be tidied up:

fire/__main__.py:64:   if sys.version_info.major == 3 and sys.version_info.minor < 5:
fire/__main__.py:72:   elif sys.version_info.major == 3:
fire/helptext.py:540:      if sys.version_info[0:2] >= (3, 3):
fire/helptext.py:540:      if sys.version_info[0:2] >= (3, 3):
fire/helptext_test.py:133:      sys.version_info[0:2] < (3, 5),
fire/helptext_test.py:150:      sys.version_info[0:2] < (3, 5),
fire/helptext_test.py:168:      sys.version_info[0:2] < (3, 5),
fire/helptext_test.py:186:      sys.version_info[0:2] < (3, 5),
fire/testutils.py:76:     if sys.version_info.major == 2:

universal = 1 can be removed:

setup.cfg:2:  universal = 1

Comment thread fire/inspectutils.py Outdated
Comment thread setup.py Outdated
@@ -31,7 +31,6 @@
DEPENDENCIES = [
'six',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The six dependency can be replaced and removed.

Running pyupgrade **/**.py --py3-plus can help, and also upgrade a lot of other syntax.

https://github.com/asottile/pyupgrade

Comment thread .github/scripts/requirements.txt Outdated
python-Levenshtein <0.20.9 ; python_version == '2.7'
levenshtein <=0.25.0 ; python_version >= '3.5'
levenshtein <=0.25.0
mock <6.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dependency can be removed and replaced with stdlib's unittest.mock.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the case #545

Comment thread setup.py
@hugovk

hugovk commented Mar 12, 2024

Copy link
Copy Markdown
Contributor

Why choose 3.5 as the lower bound? 3.8 is the lowest supported: https://devguide.python.org/versions/

@Borda

Borda commented Mar 12, 2024

Copy link
Copy Markdown
Contributor Author

Why choose 3.5 as the lower bound? 3.8 is the lowest supported: devguide.python.org/versions

O wpul;d do it too, but following setup.py which classifies support for 3.5, so we can do the additional bump in other/following PR if @dbieber agrees 🦩

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@a-detiste

Copy link
Copy Markdown

The Great Six Cleanser are watching you https://wiki.debian.org/Python3-six-removal :-)

@Borda

Borda commented Jul 14, 2024

Copy link
Copy Markdown
Contributor Author

cc: @dbieber

@dbieber

dbieber commented Sep 20, 2024

Copy link
Copy Markdown
Collaborator

Thanks for putting this together. I'm going to try to get the Python 2 specific stuff out of the codebase now (airplane wifi permitting!).
I'm likely going to treat the console code separately though since it's third_party code.

@Borda

Borda commented Sep 20, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for putting this together. I'm going to try to get the Python 2 specific stuff out of the codebase now (airplane wifi permitting!). I'm likely going to treat the console code separately though since its third_party code.

sure, @dbieber so shall I continue with it?

@Borda

Borda commented Feb 11, 2025

Copy link
Copy Markdown
Contributor Author

@dbieber friendly ping if we shall land it or close it? :)

@Borda Borda closed this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants