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

ImportHook cleanup + PyObject.Length exception by lostmsu · Pull Request #1400 · pythonnet/pythonnet · GitHub

ImportHook cleanup + PyObject.Length exception - #1400

Merged
lostmsu merged 5 commits into
pythonnet:masterfrom
losttech:cleanup/21-02-25
Feb 27, 2021
Merged

ImportHook cleanup + PyObject.Length exception#1400
lostmsu merged 5 commits into
pythonnet:masterfrom
losttech:cleanup/21-02-25

Conversation

lostmsu commented Feb 26, 2021

Copy link
Copy Markdown
Member

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 in DEBUG build)
  • drops unsupported _PyObject_GetDictPtr in favor of PyObject_GenericGetDict

PyObject

  • Length() method now raises an exception when object does not support concept of length (was returning 0).

filmor commented Feb 27, 2021

Copy link
Copy Markdown
Member

Why do you run the validation only in DEBUG mode?

lostmsu merged commit f2dc8f1 into pythonnet:master Feb 27, 2021
lostmsu deleted the cleanup/21-02-25 branch February 27, 2021 20:52
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL