FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code by ericsnowcurrently · Pull Request #95860 · python/cpython · GitHub

/ cpython Public

gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code - #95860

Merged
ericsnowcurrently merged 20 commits into
python:mainfrom
ericsnowcurrently:global-objects-pyargs-parser-keywords-init
Aug 11, 2022
Merged

gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code#95860
ericsnowcurrently merged 20 commits into
python:mainfrom
ericsnowcurrently:global-objects-pyargs-parser-keywords-init

Conversation

ericsnowcurrently commented Aug 10, 2022
edited
Loading

Copy link
Copy Markdown
Member

We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately.

This change includes generated code. The significant changes are in:

  • Tools/clinic/clinic.py
  • Python/getargs.c
  • Include/cpython/modsupport.h
  • Makefile.pre.in (re-generate global strings after running clinic)
  • very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c

All other changes are generated code (clinic, global strings).

ericsnowcurrently marked this pull request as ready for review August 10, 2022 22:55
Comment thread Tools/clinic/clinic.py

kumaraditya303 commented Aug 11, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

LGTM.

We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime.

Yeah, its better to solve it for builtins now, extensions modules can be solved later on.
FTR, I tried solving both at once 1 and it worked on Linux but does not work on Windows because it does not allows taking addresses of DLL loaded symbols.

Footnotes

  1. https://github.com/kumaraditya303/cpython/pull/4

Copy link
Copy Markdown
Member Author

Yeah, its better to solve it for builtins now, extensions modules can be solved later on.
FTR, I tried solving both at once 2 and it worked on Linux but does not work on Windows because it does not allows taking addresses of DLL loaded symbols.

I'm glad you agree. 😄 Splitting it up this way made the most sense.

ericsnowcurrently added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 11, 2022

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 3b308c4 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 11, 2022

erlend-aasland commented Aug 11, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

CC. @colorfulappl, regarding your PR #32092. This PR touches some of the same parts of AC and getarg.c.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL