ImportHook cleanup + PyObject.Length exception by lostmsu · Pull Request #1400 · pythonnet/pythonnet
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 774
Merged
lostmsu merged 5 commits intopythonnet:masterfrom
Feb 27, 2021Merged
ImportHook cleanup + PyObject.Length exception#1400
lostmsu merged 5 commits intopythonnet:masterfrom
ImportHook cleanup + PyObject.Length exception#1400
lostmsu merged 5 commits intopythonnet:masterfrom
Conversation
Copy link Copy Markdown
Member
lostmsu
commented
Feb 26, 2021
lostmsu
commented
What does this implement/fix? Explain your changes.
Import
- adds validation to
PyImportTest - before restoring original
__import__, validates, that__import__was not replaced by a third party (only inDEBUGbuild) - drops unsupported
_PyObject_GetDictPtrin favor ofPyObject_GenericGetDict
PyObject
Length()method now raises an exception when object does not support concept of length (was returning 0).
lostmsu added 2 commits
February 25, 2021 16:01Copy link Copy Markdown
Member
filmor
commented
Feb 27, 2021
filmor commented
Feb 27, 2021Why do you run the validation only in DEBUG mode?
filmor approved these changes Feb 27, 2021
lostmsu added 3 commits
February 27, 2021 12:44
lostmsu
force-pushed
the
cleanup/21-02-25
branch
from
9358531 to
908316f
Compare
lostmsu
merged commit
f2dc8f1
into
pythonnet:master
lostmsu
deleted the
cleanup/21-02-25
branch
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