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

Move __name__ mangling to end of module #156

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noahbkim
Copy link

@noahbkim noahbkim commented Mar 7, 2025

Changing __name__ in the middle of the module causes subsequent definitions to have the mangled (and therefore incorrect) __module__, which causes a bad interaction with cloudpickle (which in turn needs to ensure pickled functions can be imported from their __module__). Moving the __name__ change to the end of the module satisfies the DeprecationWarning check while sidestepping the above.

@noahbkim noahbkim force-pushed the pickling-fix branch 2 times, most recently from 9a6ffaf to bf6815d Compare March 7, 2025 21:56
@noahbkim
Copy link
Author

noahbkim commented Mar 7, 2025

Ah, I see these CI failures are already addressed in #155, I'll rebase once that lands

@mikenerone
Copy link
Member

Ah, I see these CI failures are already addressed in #155, I'll rebase once that lands

@noahbkim I'm not clear on what's causing the unrelated CI failure in that PR (#155) (only for Python 3.12 on MacOS?!?), and haven't had time to dig into it. I'd welcome an extra set of eyes if you're willing.

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