{{ message }}
Provide more info about failuers to load CLR assemblies#1076
Merged
lostmsu merged 1 commit intopythonnet:masterfrom Aug 19, 2020
Merged
Provide more info about failuers to load CLR assemblies#1076lostmsu merged 1 commit intopythonnet:masterfrom
lostmsu merged 1 commit intopythonnet:masterfrom
Conversation
645687e to
4e1ea84
Compare
ccf5203 to
e6610eb
Compare
e6610eb to
46a51d4
Compare
filmor
reviewed
Aug 15, 2020
| if (Path.IsPathRooted(name)) | ||
| { | ||
| if (!Path.HasExtension(name)) | ||
| if (!Path.HasExtension(name) && Runtime.InteropVersion < new Version(3, 0)) |
Member
There was a problem hiding this comment.
If this was for compatibility, you can probably remove it.
filmor
approved these changes
Aug 15, 2020
Member
|
Fine by me, but please add a changelog entry for the breaking change. |
58ef45f to
37df647
Compare
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
37df647 to
6eb9258
Compare
Member
Author
|
I dropped the update, that tried to remove legacy "CLR." module from this change, as it started growing in scope, and is not directly related to this change. |
Codecov Report
@@ Coverage Diff @@
## master #1076 +/- ##
=======================================
Coverage 86.25% 86.25%
=======================================
Files 1 1
Lines 291 291
=======================================
Hits 251 251
Misses 40 40 Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.

What does this implement/fix? Explain your changes.
__cause__attribute of the finalImportError.BREAKING:
clr.AddReferencewill now throw exceptions besidesFileNotFoundException.Additional: a few uses of
BorrowedReferenceDoes this close any currently open issues?
This addresses #261
It is an alternative to #298
Checklist
Check all those that are applicable and complete.