| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…nitfunc() The builtin loader info encoded the module name as ASCII, so a non-ASCII spec name failed with UnicodeEncodeError even for multi-phase init modules, which support such names when loaded dynamically. Fall back to UTF-8 and mark the name as non-ASCII, so that multi-phase init works and single-phase init is rejected with the same error as for dynamically loaded extensions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HoZE3WdRWQshvinfBZ137N
|
Out of curiosity (and to inform future prioritization), did this actually come up in practice? PyInit is soft-deprecated so I'm not too happy adding features, but yeah, this is a valid bugfix. As a nitpick, mödul isn't a good test name -- it's always encoded in the source, so the fact that it's a mangled word doesn't help readers; also the following d needs the workaround in the C literals. |
Sorry, something went wrong.
no, this didn't come up in the real world, it was something claude flagged while looking into the single-phase init issue. I don't feel strongly about this fix, if you think it's not worth it, we can drop it. |
Sorry, something went wrong.
|
Let's get it in 3.16 as a new feature. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The builtin loader info encoded the module name as ASCII, so a non-ASCII spec name failed with UnicodeEncodeError even for multi-phase init modules, which support such names when loaded dynamically. Fall back to UTF-8 and mark the name as non-ASCII, so that multi-phase init works and single-phase init is rejected with the same error as for dynamically loaded extensions.
AI assisted with Claude Fable 5.1