Skip to content

gh-117953: Always Run Extension Init Func in Main Interpreter First - #117487

Closed
ericsnowcurrently wants to merge 6 commits into
python:mainfrom
ericsnowcurrently:load-ext-in-main-interp
Closed

gh-117953: Always Run Extension Init Func in Main Interpreter First#117487
ericsnowcurrently wants to merge 6 commits into
python:mainfrom
ericsnowcurrently:load-ext-in-main-interp

Conversation

@ericsnowcurrently

@ericsnowcurrentlyericsnowcurrently commented Apr 2, 2024

Copy link
Copy Markdown
Member

@ericsnowcurrentlyericsnowcurrently changed the title Always Run Extension Init Func in Main Interpreter Firstgh-117953: Always Run Extension Init Func in Main Interpreter FirstApr 16, 2024
@neonene

Copy link
Copy Markdown
Contributor

I tried this PR on Windows. The following two results were unexpected to me:

...
>>>_xxsubinterpreters.run_string(i, "import _datetime; print(_datetime)")
<module'_datetime' (built-in)># legacy module is imported?
...
>>>_xxsubinterpreters.run_string(i, "import _testcapi")
>>>_xxsubinterpreters.destroy(i)
Debugmemoryblockataddressp=0000000002EB8B90: API' '15987178197214944733bytesoriginallyrequestedThe7padbytesatp-7arenotallFORBIDDENBYTE (0xfd):
atp-7: 0x00***OUCHatp-6: 0x00***OUCHatp-5: 0x00***OUCH
...

@ericsnowcurrently

Copy link
Copy Markdown
MemberAuthor

Thanks for trying it. That info is helpful. FYI, I'm working on extra changes here as the current PR appears to be incomplete.

Sign up for freeto 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

@ericsnowcurrently@neonene