Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable implicit conversions that might lose information#1568

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lostmsu merged 3 commits intopythonnet:masterfromlosttech:disable-auto-conversions
Sep 27, 2021

Conversation

lostmsu
Copy link
Member

@lostmsulostmsu commentedSep 23, 2021
edited
Loading

What does this implement/fix? Explain your changes.

This removes the following conversions:
PyInt ->int32 (when trying to convert toobject only)
.NET arrays and collections -> Pythonlist (due to mutability)

Additionally,PyObject no longer implementsIEnumerable<PyObject>, as not all python objects are iterable. Instead, a new classPyIterable is added.

Checklist

  • Make sure to include one or more tests for your change
  • Updated theCHANGELOG

@lostmsulostmsuforce-pushed thedisable-auto-conversions branch from631b019 toc97e5abCompareSeptember 23, 2021 19:05
@lostmsulostmsu marked this pull request as ready for reviewSeptember 23, 2021 20:43
@lostmsulostmsu added this to the3.0.0 milestoneSep 24, 2021
@lostmsulostmsuforce-pushed thedisable-auto-conversions branch from2e8cd3f tob2e6d4eCompareSeptember 27, 2021 21:45
@lostmsulostmsu merged commit1ca0bdb intopythonnet:masterSep 27, 2021
@lostmsulostmsu deleted the disable-auto-conversions branchSeptember 27, 2021 21:52
Copy link
MemberAuthor

@lostmsulostmsu left a comment

Choose a reason for hiding this comment

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

A few minor isssues

{
if (setError)
{
Exceptions.SetError(ex.InnerException);
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Should be justSetError(ex)

Comment on lines 363 to 364
return true;
}
// shouldn't happen
return false;
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Fallback branch should be added.

lostmsu added a commit to losttech/pythonnet that referenced this pull requestSep 27, 2021
lostmsu added a commit to losttech/pythonnet that referenced this pull requestSep 27, 2021
lostmsu added a commit to losttech/pythonnet that referenced this pull requestOct 2, 2021
… point typesarbitrary Python objects are no longer implicitly converted to .NET bool typethis is a continuation ofpythonnet#1568
lostmsu added a commit to losttech/pythonnet that referenced this pull requestOct 2, 2021
… point typesarbitrary Python objects are no longer implicitly converted to .NET bool typethis is a continuation ofpythonnet#1568
lostmsu added a commit to losttech/pythonnet that referenced this pull requestOct 2, 2021
… point typesarbitrary Python objects are no longer implicitly converted to .NET bool typethis is a continuation ofpythonnet#1568
lostmsu added a commit to losttech/pythonnet that referenced this pull requestOct 2, 2021
… point typesarbitrary Python objects are no longer implicitly converted to .NET bool typethis is a continuation ofpythonnet#1568
lostmsu added a commit to losttech/pythonnet that referenced this pull requestOct 2, 2021
… point typesarbitrary Python objects are no longer implicitly converted to .NET bool typethis is a continuation ofpythonnet#1568
lostmsu added a commit that referenced this pull requestOct 5, 2021
… point typesarbitrary Python objects are no longer implicitly converted to .NET bool typethis is a continuation of#1568
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@filmorfilmorfilmor approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
3.0.0
Development

Successfully merging this pull request may close these issues.

2 participants
@lostmsu@filmor

[8]ページ先頭

©2009-2025 Movatter.jp