Title: Split from PR 958: restoring the __import__ after shutdown. by benoithudson · Pull Request #993 · pythonnet/pythonnet · GitHub
Open Graph Title: Split from PR 958: restoring the __import__ after shutdown. by benoithudson · Pull Request #993 · pythonnet/pythonnet
X Title: Split from PR 958: restoring the __import__ after shutdown. by benoithudson · Pull Request #993 · pythonnet/pythonnet
Description: 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. Make sure to include one or more tests for your change 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. If an enhancement PR, please create docs and at best an example Add yourself to AUTHORS Updated the CHANGELOG
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/993
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b8848511-68c5-8ab8-5b7c-c6fc94932060 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D980:16F17F:3173E01:451182E:697119E9 |
| html-safe-nonce | dfd1ad7a06472aacd8408a16b93da00339345ac0e48819fec573be57854a7685 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTgwOjE2RjE3RjozMTczRTAxOjQ1MTE4MkU6Njk3MTE5RTkiLCJ2aXNpdG9yX2lkIjoiMzE5MTgxNzczODIwNDAyNzM2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6ddd46f28dec769fefe71a79c5e6746f96e7823c19f8cbc77712135b7f702257 |
| hovercard-subject-tag | pull_request:343859455 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/pythonnet/pythonnet/pull/993/files |
| twitter:image | https://avatars.githubusercontent.com/u/15807877?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/15807877?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 73ca43ac10b0f114fadc2d2cf702bc0c6453174aa5f9dad3a1d131b428870c6d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c16e50bde10edd19f5772e9b3804df6d7bf9bfe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width