Skip to content

Change as #1118

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

Closed
wants to merge 4 commits into from
Closed

Change as #1118

wants to merge 4 commits into from

Conversation

koubaa
Copy link
Contributor

@koubaa koubaa commented Apr 17, 2020

What does this implement/fix? Explain your changes.

Improve behavior of PyObject.As<>. This is needed to make external function codec work:
pythonnet/codecs#1
...

Does this close any currently open issues?

...

Any other comments?

...

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 Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1118   +/-   ##
=======================================
  Coverage   86.75%   86.75%           
=======================================
  Files           1        1           
  Lines         302      302           
=======================================
  Hits          262      262           
  Misses         40       40           
Flag Coverage Δ
#setup_linux 65.56% <ø> (ø)
#setup_windows 71.52% <ø> (ø)

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 2a83fe5...007e5dd. Read the comment docs.

@filmor
Copy link
Member

filmor commented Apr 22, 2020

Hmm, I think in general this is fine because we don't lose anything (As<PyObject> will still work), but it's nevertheless a silent breaking change. This is possible in the future, but I wouldn't want to do it during a point-release. Can you introduce a preliminary new function for this behaviour?

@koubaa
Copy link
Contributor Author

koubaa commented Apr 22, 2020

@filmor I can do that. I will also create a new issue to address this in a major release.

@lostmsu
Copy link
Member

lostmsu commented Apr 22, 2020

@koubaa if this is specifically targeted to conversion to object, why does it have to be generic?

@koubaa
Copy link
Contributor Author

koubaa commented Apr 22, 2020

@koubaa if this is specifically targeted to conversion to object, why does it have to be generic?

@lostmsu good point. It would be more clear to just call it AsObject

@lostmsu
Copy link
Member

lostmsu commented Apr 22, 2020

@koubaa there is already AsManagedObject(Type). Does it not work for you? It appears to be doing the same when Type == object.

@koubaa koubaa closed this Apr 23, 2020
@koubaa koubaa deleted the change-as branch April 23, 2020 15:55
@koubaa
Copy link
Contributor Author

koubaa commented Apr 23, 2020

@lostmsu didn't know about that. I don't need this change anymore

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