| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
When C# shuts down we should restore Python to its original state.
Codecov Report
@@ Coverage Diff @@
## master #993 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 1 1
Lines 301 301
=======================================
Hits 261 261
Misses 40 40
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
Nice, thank you very much :) |
Sorry, something went wrong.
…t#993) When C# shuts down we should restore Python to its original state.
| Back | FazBrowse Home | New Git URL |
When C# shuts down we should restore Python to its original state.
What does this implement/fix? Explain your changes.
This is adapted from the large patch that amos put in PR #958. It restores the import hook.
Does this close any currently open issues?
Not yet.
Any other comments?
I would have used the ShutdownHandler but that's only in the PythonEngine, whereas __import__ is in the Runtime. Maybe we should move the ShutdownHandler mechanism to the runtime?
Checklist
Check all those that are applicable and complete.
Can't really test this at the moment. After Py_Finalize (in Shutdown), we can't check the state of the __import__ function until we call Py_Initialize. But Py_Initialize will create a new __import__, so we can't see whether our code ran. This change only becomes relevant when we stop calling Py_Finalize in Shutdown.