Skip to content

__name__ and __signature__ for .NET methods #1133

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

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented May 4, 2020

What does this implement/fix? Explain your changes.

This implements __name__ and __signature__ Python members for reflected .NET methods, that enables them to be analyzed with inspect module.

Does this close any currently open issues?

N/A

Any other comments?

Some Python libraries validate passed callables by using inspect module. This makes it possible for .NET methods to pass this kind of validation.

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-io
Copy link

codecov-io commented May 14, 2020

Codecov Report

Merging #1133 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1133   +/-   ##
=======================================
  Coverage   86.66%   86.66%           
=======================================
  Files           1        1           
  Lines         300      300           
=======================================
  Hits          260      260           
  Misses         40       40           
Flag Coverage Δ
#setup_linux 65.33% <ø> (ø)
#setup_windows 72.00% <ø> (ø)

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 d8f5ab0...da968d0. Read the comment docs.

@filmor
Copy link
Member

filmor commented May 16, 2020

@lostmsu Can you update this with the latest master? Should this go into 2.5?

@lostmsu
Copy link
Member Author

lostmsu commented May 16, 2020

@filmor this is not a breaking change, so as you wish.

@filmor filmor added this to the 3.0.0 milestone May 17, 2020
@filmor
Copy link
Member

filmor commented May 17, 2020

After looking at it a bit, I'd rather merge this later (maybe backporting to 2.5) because relying on standard library modules is always a bit tricky (cf. the platform fiasco... ;)).

@codecov-commenter
Copy link

codecov-commenter commented May 29, 2020

Codecov Report

Merging #1133 into master will decrease coverage by 0.27%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1133      +/-   ##
==========================================
- Coverage   86.53%   86.25%   -0.28%     
==========================================
  Files           1        1              
  Lines         297      291       -6     
==========================================
- Hits          257      251       -6     
  Misses         40       40              
Flag Coverage Δ
#setup_linux 64.94% <ø> (-0.04%) ⬇️
#setup_windows 72.50% <ø> (+0.45%) ⬆️
Impacted Files Coverage Δ
setup.py 86.25% <0.00%> (-0.28%) ⬇️

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 742463e...e104143. Read the comment docs.

@lostmsu lostmsu merged commit 748d3d7 into pythonnet:master Oct 1, 2021
@lostmsu lostmsu deleted the PR/Inspect branch October 1, 2021 02:34
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.

4 participants