-
Notifications
You must be signed in to change notification settings - Fork 752
Provide more info about failuers to load CLR assemblies #1076
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
645687e
to
4e1ea84
Compare
ccf5203
to
e6610eb
Compare
e6610eb
to
46a51d4
Compare
Codecov Report
@@ Coverage Diff @@
## master #1076 +/- ##
=======================================
Coverage 86.66% 86.66%
=======================================
Files 1 1
Lines 300 300
=======================================
Hits 260 260
Misses 40 40
Continue to review full report at Codecov.
|
src/runtime/assemblymanager.cs
Outdated
if (Path.IsPathRooted(name)) | ||
{ | ||
if (!Path.HasExtension(name)) | ||
if (!Path.HasExtension(name) && Runtime.InteropVersion < new Version(3, 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this was for compatibility, you can probably remove it.
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
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.
|
What does this implement/fix? Explain your changes.
__cause__
attribute of the finalImportError
.BREAKING:
clr.AddReference
will now throw exceptions besidesFileNotFoundException
.Additional: a few uses of
BorrowedReference
Does this close any currently open issues?
This addresses #261
It is an alternative to #298
Checklist
Check all those that are applicable and complete.