| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This looks reasonable.
I'm proposing a replacement for Init functions in PEP-793, but that PEP adds PyModule_FromSlotsAndSpec and PyModule_Exec which should work for similar use cases.
Would it make sense to switch the spec & initfunc arguments to match that proposal?
I'm not sure if the word Builtin in the name is necessary -- is that to match the internal create_builtin? Would something like PyImport_LoadModuleFromInitfuncAndSpec work better?
Do you want to submit this to the C API WG?
Sorry, something went wrong.
I think it should be fine! Is the PEP already implemented on main?
Yes, I used it to reflect what it does internally. PyImport_LoadModuleFromInitfuncAndSpec sounds great to me!
Will do. Should we first decide whether to change this to match PEP 793, or go to the WP with options and get their input? |
Sorry, something went wrong.
No, it's not even accepted :)
Just go to the WG :) |
Sorry, something went wrong.
done :) capi-workgroup/decisions#77 |
Sorry, something went wrong.
- use `PyImport_CreateModuleFromInitfunc` for the new API - no need to introduce `create_builtin_ex` - update `create_builtin` and all callers - update exception message
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
I left my suggestions as a PR: itamaro#27 |
Sorry, something went wrong.
* Test single-phase init as well; don't use private APIs in test * Doc update --------- Co-authored-by: Itamar Oren <itamarost@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Sorry, something went wrong.
…on under the free-threaded build
|
thank you @encukou @vstinner @kumaraditya303 for the review and suggestions! @encukou are you planning to merge gh-141197 soon? until that is merged, this PR has a docs failure due to referring to the function that you document in gh-141197. |
Sorry, something went wrong.
There was a problem hiding this comment.
The new function PyImport_CreateModuleFromInitfunc() should be documented in Doc/whatsnew/3.15.rst.
Sorry, something went wrong.
Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
There was a problem hiding this comment.
LGTM. Thanks for the updates!
Sorry, something went wrong.
…ythonGH-139196) Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
| Back | FazBrowse Home | New Git URL |
C-API WG decision: capi-workgroup/decisions#77