Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed__cause__ on overload bind failure and array conversion#1442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lostmsu merged 1 commit intopythonnet:masterfromlosttech:PR/PythonDebugBuild
Apr 14, 2021

Conversation

lostmsu
Copy link
Member

What does this implement/fix? Explain your changes.

Calls toPyObject_Str andPyObject_Repr should not be made with error set, as they may clear it. When using debug build of Python, this causes an assertion at runtime, preventing use of Python.NET.

Does this close any currently open issues?

Partial fix for#1412

@filmor
Copy link
Member

As there are probably a few more places like this, shouldn't we add a convenienceIDisposable that does the fetching in startup and restores onDispose?

@lostmsu
Copy link
MemberAuthor

lostmsu commentedApr 13, 2021
edited
Loading

@filmor I do not think it is justified at this moment: with just these two places I don't get any more related assertion failures of that nature with debug builds of Python throughout out test suite.

@@ -926,7 +926,9 @@ internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw, MethodBase i
}

value.Append(": ");
Runtime.PyErr_Fetch(out var errType, out var errVal, out var errTrace);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This might also be a fix for#1371

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It might let us reenable the test case, but the issue that caused it will still be there.

Copy link
Contributor

@BadSingletonBadSingleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM. However this is something easy to miss. It'd be great if we had pythonnet in debug (without Py_Debug) be able to detect known cases.

@lostmsulostmsu merged commit16f04e9 intopythonnet:masterApr 14, 2021
@lostmsulostmsu deleted the PR/PythonDebugBuild branchApril 14, 2021 00:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@BadSingletonBadSingletonBadSingleton approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@lostmsu@filmor@BadSingleton

[8]ページ先頭

©2009-2025 Movatter.jp