Skip to content

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

setup.py Outdated
A library for automatically generating command line interfaces.""".strip()

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

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
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

@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 <1324225+hugovk@users.noreply.github.com>
@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
Collaborator

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.

@Borda
Copy link
Contributor Author

Borda 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.

sure, @dbieber so shall I continue with it?

@Borda
Copy link
Contributor Author

Borda commented Feb 11, 2025

@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