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

Add test for enum int conversion#1811

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
filmor merged 1 commit intomasterfromenum-int
Jun 13, 2022
Merged

Add test for enum int conversion#1811

filmor merged 1 commit intomasterfromenum-int
Jun 13, 2022

Conversation

filmor
Copy link
Member

What does this implement/fix? Explain your changes.

#1810

Does this close any currently open issues?

#1810

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
  • Ensure you have signed the.NET Foundation CLA
  • Add yourself toAUTHORS
  • Updated theCHANGELOG

lostmsu reacted with rocket emoji
Comment on lines 83 to 84
[ForbidPythonThreads]
#pragma warning disable IDE1006 // Naming Styles - must match Python
public static PyInt __int__(T value)
public static PyInt __int__(T value) {
Copy link
Member

Choose a reason for hiding this comment

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

The[ForbidPythonThreads] attribute should be ensuring that when this method is called, the calling thread holds GIL.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It's the other way round, right? If this attribute is not given, the GIL is explicitly released. If for some reason it has been released before, it will not be taken here.

Copy link
Member

@lostmsulostmsuJun 9, 2022
edited
Loading

Choose a reason for hiding this comment

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

The point is: who and why releases GIL when this is called from Python?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

That's a great question, but in the end, the code here is wrong asForbidPythonThreads does not take the GIL, right? After this one is merged, I'd declare the current master rc1 and start off a release-3.0 branch, ok?

Copy link
Member

@lostmsulostmsuJun 12, 2022
edited
Loading

Choose a reason for hiding this comment

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

@filmor you should take this fix instead. I actually addressed ignoringForbidPythonThreads:losttech@025cc5c

@filmorfilmor changed the titleTake the GIL when converting enum to intAdd test for enum int conversionJun 13, 2022
@filmorfilmor merged commit43d1640 intomasterJun 13, 2022
@filmorfilmor deleted the enum-int branchJune 13, 2022 13:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lostmsulostmsulostmsu left review comments

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

Successfully merging this pull request may close these issues.

2 participants
@filmor@lostmsu

[8]ページ先頭

©2009-2025 Movatter.jp