Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implementing GetDynamicMemberNames() for PyObject #690

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 5 commits into from
Jun 18, 2018

Conversation

jbw3
Copy link
Contributor

@jbw3 jbw3 commented Jun 17, 2018

What does this implement/fix? Explain your changes.

This change implements GetDynamicMemberNames() for PyObject. This allows dynamic object members to be visible in the Visual Studio debugger.

Does this close any currently open issues?

#443

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 Jun 17, 2018

Codecov Report

Merging #690 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #690      +/-   ##
=========================================
+ Coverage   76.81%   76.9%   +0.09%     
=========================================
  Files          63      63              
  Lines        5580    5582       +2     
  Branches      890     890              
=========================================
+ Hits         4286    4293       +7     
+ Misses       1003     998       -5     
  Partials      291     291
Flag Coverage Δ
#setup_linux 69.42% <ø> (ø) ⬆️
#setup_windows 76.08% <100%> (+0.09%) ⬆️
Impacted Files Coverage Δ
src/runtime/pyobject.cs 39.77% <100%> (+0.91%) ⬆️
src/runtime/pyiter.cs 77.27% <0%> (+13.63%) ⬆️

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 f60dc32...9f9c7e2. Read the comment docs.

Copy link
Member

@filmor filmor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for the most part, just check the two comments and add yourself to the contributors list (if you are not in there yet) and we can merge this. Thank you very much for this addition, good idea :)

@@ -26,45 +26,41 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'DebugMono'">
<DebugSymbols>true</DebugSymbols>
<DefineConstants Condition="'$(DefineConstants)' == ''">DEBUG;TRACE</DefineConstants>
<DefineConstants Condition="'$(DefineConstants)' == ''">PYTHON2;PYTHON27;UCS4;TRACE;DEBUG</DefineConstants>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are not necessary, are they?

#if PYTHON3
"__ne__",
#endif
"__new__",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defines here make the whole thing quite brittle, I think, to me it would be perfectly fine to just check that the explicitly added members exist (i.e. add, getNumber etc.).

@jbw3
Copy link
Contributor Author

jbw3 commented Jun 18, 2018

Thanks for the feedback. I've addressed your comments.

@filmor filmor requested a review from den-run-ai June 18, 2018 15:19
@filmor
Copy link
Member

filmor commented Jun 18, 2018

@denfromufa When you are through, please remember to squash this one before merging, as it contains quite a bit of unnecessary back and forth due to the accidental project file changes.

@den-run-ai den-run-ai merged commit 545c549 into pythonnet:master Jun 18, 2018
@jbw3 jbw3 deleted the dynamic-member-names branch July 6, 2018 22:21
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.

3 participants