Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop support for Py2 and Py3.4 #498

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

Borda
Copy link
Contributor

@Borda Borda commented Mar 12, 2024

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 🐰

Copy link
Contributor

@hugovk hugovk left a comment

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

fire/inspectutils.py Outdated Show resolved Hide resolved
@@ -31,7 +31,6 @@
DEPENDENCIES = [
'six',
Copy link
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

pylint <2.15.10
pytest <=8.1.1
pytest-pylint <=1.1.2
pytest-runner <7.0.0
termcolor <2.5.0
hypothesis <6.100.0
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
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
Member

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

setup.py Show resolved Hide resolved
@hugovk
Copy link
Contributor

hugovk commented Mar 12, 2024

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

@Borda
Copy link
Contributor Author

Borda commented Mar 12, 2024

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 <[email protected]>
@a-detiste
Copy link

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

@Borda
Copy link
Contributor Author

Borda commented Jul 14, 2024

cc: @dbieber

@dbieber
Copy link
Member

dbieber commented Sep 20, 2024

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.

@dbieber
Copy link
Member

dbieber commented Sep 20, 2024

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.

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