Skip to content

bpo-37616: Enhance calculate_zip_path() #20225

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

Closed
wants to merge 1 commit into from
Closed

bpo-37616: Enhance calculate_zip_path() #20225

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 19, 2020

Use sprintf() to format the filename, rather than accessing directly
characters of the VERSION string.

Make getpath.c ready for Python version 3.100 or version 10.0.

https://bugs.python.org/issue37616

Use sprintf() to format the filename, rather than accessing directly
characters of the VERSION string.

Make getpath.c ready for Python version 3.100 or version 10.0.
@vstinner
Copy link
Member Author

@pablogsal proposed PR #20214.

@pablogsal
Copy link
Member

This solution is great but lacks preprocessor magic 😆

@@ -1296,16 +1296,28 @@ calculate_zip_path(PyCalculatePath *calculate)
{
PyStatus res;

// wsprintf() is not available on all platforms:
Copy link
Member

Choose a reason for hiding this comment

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

I honestly find this code harder to follow and more complex than the preprocessor solution

@vstinner
Copy link
Member Author

@pablogsal's PR #20214 is way simpler (and wa merged). I close my PR.

@vstinner vstinner closed this May 19, 2020
@vstinner vstinner deleted the getpath_zip_filename branch May 19, 2020 17:10
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