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

gh-127183: Add_ctypes.CopyComPointer tests#127184

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
encukou merged 5 commits intopython:mainfromjunkmd:add_copy_com_pointer_tests
Nov 25, 2024

Conversation

@junkmd
Copy link
Contributor

@junkmdjunkmd commentedNov 23, 2024
edited by bedevere-appbot
Loading

I would like to backport this to 3.12 and 3.13 as well.
This is internal-only, so I don’t think it needs a NEWS entry.

@junkmdjunkmdforce-pushed theadd_copy_com_pointer_tests branch fromf48bcf1 to638487bCompareNovember 24, 2024 01:15
Copy link
Member

@encukouencukou left a comment

Choose a reason for hiding this comment

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

Thank you.
I seeCopyComPointer is undocumented. Would you be willing to add some documentation for it as well?

dst_orig=create_shelllink_persist(self.IPersist)
dst=self.IPersist()
CopyComPointer(dst_orig,byref(dst))
dst_orig.Release()# The refcount of `dst_orig` is 1 here.
Copy link
Member

Choose a reason for hiding this comment

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

Could the refcount be checked usingRelease's return value?

junkmd reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Indeed, since this assertion is not costly, it is better to simply callassertEqual than to leave a comment about it.
I have changed these lines.

@junkmd
Copy link
ContributorAuthor

Would you be willing to add some documentation for it as well?

That's my intention, but as discussed ingh-126686, I believe publicizing it is also necessary for proper documentation.

Before moving forward with documentation or publicizing, I want to backport this test to 3.13 and 3.12, whereCopyComPointer, albeit private, already exists.
Therefore, I aim to keep this PR in a state where it can be merged as-is when miss-islington backports it.

encukou reacted with thumbs up emoji

@encukouencukou added skip news needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsNov 25, 2024
@encukouencukou merged commitc7f1e3e intopython:mainNov 25, 2024
41 checks passed
@miss-islington-app
Copy link

Thanks@junkmd for the PR, and@encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestNov 25, 2024
* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
@bedevere-app
Copy link

GH-127251 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelNov 25, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestNov 25, 2024
* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
@bedevere-app
Copy link

GH-127252 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelNov 25, 2024
@encukou
Copy link
Member

Makes sense. Thank you for the test!

junkmd reacted with rocket emoji

@junkmdjunkmd deleted the add_copy_com_pointer_tests branchNovember 25, 2024 14:10
encukou pushed a commit that referenced this pull requestNov 26, 2024
…127251)gh-127183: Add `_ctypes.CopyComPointer` tests (GH-127184)* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
encukou pushed a commit that referenced this pull requestNov 26, 2024
…127252)gh-127183: Add `_ctypes.CopyComPointer` tests (GH-127184)* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull requestJan 12, 2025
* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@encukouencukouencukou left review comments

Assignees

No one assigned

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@junkmd@encukou

[8]ページ先頭

©2009-2025 Movatter.jp