Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 10, 2025

Rename the 'math' extension to '_math'.

Rename the 'math' extension to '_math'.
Comment on lines +7 to +8
# gh-140824: Fix module name for pickle
def patch_module(objs, module):
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better just to have the module name as math.integer for these functions in C?

Copy link
Member Author

Choose a reason for hiding this comment

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

In C, function.__module__ is set to the extension name: so set to _math or _math_integer. The whole purpose of this PR is to fix function.__module__.

@bedevere-app
Copy link

bedevere-app bot commented Nov 10, 2025

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@vstinner vstinner requested a review from a team as a code owner November 10, 2025 16:16
vstinner and others added 4 commits November 10, 2025 17:19
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@vstinner
Copy link
Member Author

@AA-Turner: I addressed your review. Please review the updated PR.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

This is still a hack. I think there should be more straightforward way.

@skirpichev skirpichev self-requested a review November 10, 2025 22:35
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.

3 participants