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

fix: bin/update_pythons.py to work properly with PyPy win_amd64 #695

Merged
merged 2 commits into from
May 26, 2021

Conversation

mayeut
Copy link
Member

@mayeut mayeut commented May 25, 2021

No description provided.

Comment on lines 265 to 270
if identifier.startswith("pp"):
config.update(**self.windows_pypy.update_version_windows(spec))
else:
config_update = self.windows_64.update_version_windows(spec)
if config_update:
config.update(**config_update)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if identifier.startswith("pp"):
config.update(**self.windows_pypy.update_version_windows(spec))
else:
config_update = self.windows_64.update_version_windows(spec)
if config_update:
config.update(**config_update)
config_update: ConfigWinCP | ConfigWinPP | None
if identifier.startswith("pp"):
config_update = self.windows_pypy.update_version_windows(spec)
else:
config_update = self.windows_64.update_version_windows(spec)
if config_update:
config.update(**config_update)

Not sure this is any better, though.

Copy link
Contributor

@henryiii henryiii May 25, 2021

Choose a reason for hiding this comment

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

Suggested change
if identifier.startswith("pp"):
config.update(**self.windows_pypy.update_version_windows(spec))
else:
config_update = self.windows_64.update_version_windows(spec)
if config_update:
config.update(**config_update)
config_update = (
self.windows_pypy.update_version_windows(spec)
if identifier.startswith("pp")
else self.windows_64.update_version_windows(spec)
)
if config_update:
config.update(**config_update)

Assuming this passes MyPy, maybe it's better?

Copy link
Contributor

Choose a reason for hiding this comment

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

Technically, the current form looks just like the win32 version above, so it's also fine (and if changed, the one above should follow too).

Copy link
Member Author

Choose a reason for hiding this comment

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

I reworked this a bit. Just fail if config_update is None as was done on macOS, it shall never happen.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, sounds good.

@mayeut mayeut requested a review from henryiii May 25, 2021 18:31
@henryiii
Copy link
Contributor

Follow up to #671, for the record.

@mayeut mayeut merged commit 75b707f into pypa:master May 26, 2021
@mayeut mayeut deleted the fix-pypy-update branch May 27, 2021 10:05
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.

2 participants