FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-100176: Mac/build-installer: Remove redundant compat code for Python 3.5 and older by hugovk · Pull Request #100297 · python/cpython · GitHub

/ cpython Public

gh-100176: Mac/build-installer: Remove redundant compat code for Python 3.5 and older - #100297

Closed
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:100176-mac-build-installer
Closed

gh-100176: Mac/build-installer: Remove redundant compat code for Python 3.5 and older#100297
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:100176-mac-build-installer

Conversation

hugovk commented Dec 16, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Python 3.5 has been EOL since 2020-09-13 and 2.7 since 2020-01-01, so we can remove these old compatibility checks.

https://devguide.python.org/versions/

Python 3.5 has been EOL since 2020-09-13 and 2.7 since 2020-01-01, so we
can remove these old compatibility checks.
hugovk requested a review from a team as a code owner December 16, 2022 16:06
hugovk changed the title gh-100176: Remove redundant compat code for Python 3.5 and older gh-100176: Mac/build-installer: Remove redundant compat code for Python 3.5 and older Dec 16, 2022
Comment on lines +1266 to +1275
fp = open(os.path.join(buildDir, 'Makefile'), 'r')
for ln in fp:
if ln.startswith('VERSION='):
VERSION=ln.split()[1]
if ln.startswith('ABIFLAGS='):
ABIFLAGS=ln.split()
ABIFLAGS=ABIFLAGS[1] if len(ABIFLAGS) > 1 else ''
if ln.startswith('LDVERSION='):
LDVERSION=ln.split()[1]
fp.close()

AlexWaygood Dec 16, 2022
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Might as well modernise this 12-year-old code while we're here, since we're touching these lines anyway?

Suggested change
fp = open(os.path.join(buildDir, 'Makefile'), 'r')
for ln in fp:
if ln.startswith('VERSION='):
VERSION=ln.split()[1]
if ln.startswith('ABIFLAGS='):
ABIFLAGS=ln.split()
ABIFLAGS=ABIFLAGS[1] if len(ABIFLAGS) > 1 else ''
if ln.startswith('LDVERSION='):
LDVERSION=ln.split()[1]
fp.close()
with open(os.path.join(buildDir, 'Makefile'), 'r') as fp:
for ln in fp:
if ln.startswith('VERSION='):
VERSION=ln.split()[1]
if ln.startswith('ABIFLAGS='):
ABIFLAGS=ln.split()
ABIFLAGS=ABIFLAGS[1] if len(ABIFLAGS) > 1 else ''
if ln.startswith('LDVERSION='):
LDVERSION=ln.split()[1]

(This might actually result in a smaller PR diff as well, as a bonus.)

Copy link
Copy Markdown
Member

Thanks for your efforts but I would prefer to leave build-installer.py untouched for now. I will be making much more substantial changes to it later in the current release cycle and for now it's easier to keep it in sync with other active versions.

hugovk commented Dec 16, 2022

Copy link
Copy Markdown
Member Author

Sure! Let's close this.

hugovk closed this Dec 16, 2022
hugovk deleted the 100176-mac-build-installer branch December 16, 2022 18:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL