Skip to content

Remove unnecessary numeric indexes in format strings#71

Merged
kjd merged 3 commits intokjd:py3-onlyfrom
jdufresne:fmt-index
Feb 17, 2020
Merged

Remove unnecessary numeric indexes in format strings#71
kjd merged 3 commits intokjd:py3-onlyfrom
jdufresne:fmt-index

Conversation

@jdufresne
Copy link
Copy Markdown
Collaborator

Unnecessary since Python 2.7. Found using pyupgrade.

https://github.com/asottile/pyupgrade

@jribbens
Copy link
Copy Markdown
Collaborator

jribbens commented Apr 7, 2019

This would break Python 2.6 compatibility for no benefit.

@jdufresne
Copy link
Copy Markdown
Collaborator Author

According to setup.py, Python 2.6 isn't supported:

idna/setup.py

Lines 16 to 17 in 032fc55

if python_version < (2,7):
raise SystemExit("Sorry, Python 2.7 or newer required")

@jribbens
Copy link
Copy Markdown
Collaborator

jribbens commented Apr 7, 2019

You're not wrong, but nevertheless I believe it does currently work on Python 2.6 and breaking that for no benefit at all seems unnecessary.

@kjd kjd changed the base branch from master to py3-only February 17, 2020 07:24
@kjd kjd merged commit f5f26b7 into kjd:py3-only Feb 17, 2020
@jdufresne jdufresne deleted the fmt-index branch February 17, 2020 16:38
@jayaddison
Copy link
Copy Markdown
Contributor

jayaddison commented Jan 20, 2021

@jdufresne @kjd There might be a few more examples of this that could be cleaned up in tools/idna-data:

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