Fixed CollectBasicObject test#1313
Merged
filmor merged 3 commits intopythonnet:masterfrom Dec 12, 2020
Merged
Conversation
8d89411 to
45c370a
Compare
… PyObject instances
filmor
reviewed
Dec 11, 2020
Member
filmor
left a comment
There was a problem hiding this comment.
Can't you use one of the *Reference types instead of IntPtr? It would be good to see at least in the code that we are talking about Python objects here.
|
|
||
| [Test] | ||
| [Ignore("Ignore temporarily")] | ||
| [Obsolete("GC tests are not guaranteed")] |
Member
There was a problem hiding this comment.
Is NUnit aware of this attribute or does this just generate yet another compile-time warning? Does it help to retry the test using https://docs.nunit.org/articles/nunit/writing-tests/attributes/retry.html?
Member
Author
There was a problem hiding this comment.
NUnit is not aware. This actually removes warning from the usage of other [Obsolete] code.
Member
Author
|
@filmor not for the finalizer. |
4 tasks
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This contains two fixes, that must go along for the tests to pass:
CollectBasicObjectandCollectOnShutdowntests for Mono by fixingMakeAGarbagefunction to not keep the garbage on the stack during a conservative roots scan (looks like Mono scans some variables, that are already gone).Finalizerto only store raw pointers to python objects instead of instances ofIPyDisposableand thus replacing Dispose with reliable and simpleDecRef.This removes some functions from
Finalizer, which previously were public, but should not have been.