Skip to content

Conversation

@jiftle
Copy link

@jiftle jiftle commented Nov 17, 2018

What does this implement/fix? Explain your changes.

clr.FindAssembly() method,throw exception when file not found.

Does this close any currently open issues?

maybe

Any other comments?

no

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

@codecov
Copy link

codecov bot commented Nov 17, 2018

Codecov Report

Merging #779 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #779      +/-   ##
==========================================
- Coverage   77.01%   76.97%   -0.04%     
==========================================
  Files          63       63              
  Lines        5786     5789       +3     
  Branches      912      913       +1     
==========================================
  Hits         4456     4456              
- Misses       1025     1028       +3     
  Partials      305      305
Flag Coverage Δ
#setup_linux 68.55% <ø> (ø) ⬆️
#setup_windows 76.17% <0%> (-0.04%) ⬇️
Impacted Files Coverage Δ
src/runtime/moduleobject.cs 78.3% <0%> (-1.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3ca2e8...9621c13. Read the comment docs.

@den-run-ai
Copy link
Contributor

den-run-ai commented Nov 19, 2018

@jiftle this may break existing user code when developers search for assembly via FindAssembly call and do not expect exception in the case of not finding any assembly. You should just look at return value of the FindAssembly call, which returns the full path to assembly or None.

>>> import clr
>>> clr.FindAssembly('testing')
>>> clr.FindAssembly('Python.Runtime')
u'C:\\Python\\Python27_32b\\lib\\site-packages\\Python.Runtime.dll'
>>>

@jiftle
Copy link
Author

jiftle commented Nov 19, 2018

@jiftle this may break existing user code when developers search for assembly via FindAssembly call and do not expect exception in the case of not finding any assembly. You should just look at return value of the FindAssembly call, which returns the full path to assembly or None.

>>> import clr
>>> clr.FindAssembly('testing')
>>> clr.FindAssembly('Python.Runtime')
u'C:\\Python\\Python27_32b\\lib\\site-packages\\Python.Runtime.dll'
>>>

but not found about clr.FindAssembly() method's return value in help and wiki

@den-run-ai
Copy link
Contributor

@jiftle you are welcome to improve the docs, I agree that pythonnet needs some explanation about finding, loading, and referencing assemblies.

@jiftle
Copy link
Author

jiftle commented Nov 19, 2018

@denfromufa
ok.

@jiftle jiftle closed this Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants