- Notifications
You must be signed in to change notification settings - Fork749
Improve Python <-> .NET exception integration#1134
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
42 commits Select commitHold shift + click to select a range
663df73
reworked PythonException to simplify memory management, and enable .N…
lostmsud45c39a
allows codecs to encode and decode thrown exceptions
lostmsu0d941c5
turned on CLR exception marshaling
lostmsu02cd234
revert to C# 7.3
lostmsudefb200
fixed Restore when not all exception fields are set
lostmsu945dc85
cleaned PythonException code up a bit
lostmsu3d95e60
remove unused overloads of FromPyErr
lostmsud667998
capture exception on Exceptions.SetError, restore in ThrowLastAsClrEx…
lostmsubec8b7d
fixed failure in ExceptionEncoded test case caused by ExceptionDispat…
lostmsu0961c94
added tests for __cause__/InnerException #893 #1098
lostmsu2cd8627
introduced StolenReference type
lostmsue4c1b9b
prevent undebuggable StackOverflowException during exception interop
lostmsu81cd197
Merge branch 'master' into PR/ExceptionsImprovement
lostmsu3c0b737
README: added summary of new exception handling features
lostmsu257a765
merge latest master
lostmsuc0fe430
reworked `PythonException`:
lostmsue58411d
rum embedding tests before Python tests
lostmsu00653dc
PythonException.StackTrace is GIL-safe
lostmsu3433201
separate .Steal() and .StealNullable()
lostmsu95cc52f
can't test exception type when runtime is down
lostmsu63ad42c
PythonException: dispose intermediate values used in stack trace gene…
lostmsufaec7fc
Point users to Message property of PythonException
lostmsudfc70f6
minor change in PythonEngine.With
lostmsud976acf
simplified code of PythonException and added a lot more checks
lostmsu146ebf3
fixed type of reference in PyException_SetCause
lostmsu272687b
minor fixes to Converter.ToArray:
lostmsu2cd3f61
added a few debug checks to Exceptions.SetError
lostmsue79f041
method binding failure now supports non-Python exception causes
lostmsud068f36
XDecref now checks, that refcount is positive in debug builds
lostmsu4877fe7
fixed __cause__ on overload bind failure and array conversion
lostmsued594c1
cache PythonException message
lostmsue5bce06
minor code cleanup
lostmsu6819e7b
improved handling of dict offset in object instances
lostmsu6679d1c
added a few debug checks
lostmsu67bd1c2
merge latest master
lostmsu2e57b04
+ class diagram for ManagedType and subclasses
lostmsu539ce81
added OverloadMapper to ManagedTypes class diagram
lostmsu25e3864
refactored tp_dealloc in ExtensionType and descendants
lostmsu5bca333
refactored tp_clear in ExtensionType and descendants into a virtual C…
lostmsu7271d88
all Dealloc overrides simply duplicate Clear, so just call both from …
lostmsu4f3f648
fixup! merge latest master
SDEIIc500a39
fixup! reworked `PythonException`:
lostmsuFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
6 changes: 3 additions & 3 deletions.github/workflows/main.yml
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
6 changes: 6 additions & 0 deletionsCHANGELOG.md
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
59 changes: 59 additions & 0 deletionssrc/embed_tests/Codecs.cs
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
2 changes: 1 addition & 1 deletionsrc/embed_tests/TestCallbacks.cs
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
4 changes: 2 additions & 2 deletionssrc/embed_tests/TestPyFloat.cs
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
4 changes: 2 additions & 2 deletionssrc/embed_tests/TestPyInt.cs
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
2 changes: 1 addition & 1 deletionsrc/embed_tests/TestPyList.cs
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
4 changes: 2 additions & 2 deletionssrc/embed_tests/TestPyLong.cs
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
4 changes: 2 additions & 2 deletionssrc/embed_tests/TestPyTuple.cs
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
1 change: 1 addition & 0 deletionssrc/embed_tests/TestPyType.cs
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
2 changes: 1 addition & 1 deletionsrc/embed_tests/TestPyWith.cs
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
78 changes: 49 additions & 29 deletionssrc/embed_tests/TestPythonException.cs
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
3 changes: 1 addition & 2 deletionssrc/embed_tests/TestRuntime.cs
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
3 changes: 1 addition & 2 deletionssrc/embed_tests/pyimport.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -102,8 +102,7 @@ import clr | ||
clr.AddReference('{path}') | ||
"; | ||
Assert.Throws<FileLoadException>(() => PythonEngine.Exec(code)); | ||
} | ||
} | ||
} |
3 changes: 2 additions & 1 deletionsrc/embed_tests/pyinitialize.cs
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
2 changes: 2 additions & 0 deletionssrc/runtime/BorrowedReference.cs
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.