GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-100176: Mac/build-installer: Remove redundant compat code for Python 3.5 and older by hugovk · Pull Request #100297 · python/cpython Conversation
|
| 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() |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Might as well modernise this 12-year-old code while we're here, since we're touching these lines anyway?
| 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.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure! Let's close this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.