GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-46376: Return existing pointer when possible in ctypes by code-of-kpp · Pull Request #107131 · python/cpython

Conversation

@code-of-kpp

@code-of-kpp code-of-kpp commented Jul 23, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: ctypes pointer not always keeping target alive #46376

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot mentioned this pull request Jul 23, 2023
ctypes pointer not always keeping target alive #46376
Open
@bedevere-bot bedevere-bot added the awaiting review label Jul 23, 2023
@bedevere-bot

bedevere-bot commented Jul 23, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@bedevere-bot

bedevere-bot commented Jul 23, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost

ghost commented Jul 23, 2023 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@code-of-kpp code-of-kpp changed the title gh-46376: Return existing pointer when possible in ctypes WIP gh-46376: Return existing pointer when possible in ctypes Jul 23, 2023
ambv
ambv reviewed Jul 23, 2023
View reviewed changes
Comment thread Modules/_ctypes/_ctypes.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@code-of-kpp
code-of-kpp force-pushed the ctypes-p2p branch from e93d3f2 to 75e6a7b Compare July 23, 2023 14:49
@bedevere-bot

bedevere-bot commented Jul 23, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@code-of-kpp
code-of-kpp force-pushed the ctypes-p2p branch 3 times, most recently from f0009ef to 36fb19a Compare July 24, 2023 16:30
@s1kpp
ctypes: Return existing pointer when possible
20d69e8
Addresses pythongh-46376
@code-of-kpp
code-of-kpp force-pushed the ctypes-p2p branch from 36fb19a to 20d69e8 Compare July 25, 2023 11:48
@code-of-kpp
code-of-kpp requested a review from ambv July 26, 2023 10:48
@code-of-kpp code-of-kpp changed the title WIP gh-46376: Return existing pointer when possible in ctypes gh-46376: Return existing pointer when possible in ctypes Jul 26, 2023
@ambv ambv added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jul 31, 2023
@ambv
ambv merged commit 08447b5 into python:main Jul 31, 2023
@miss-islington

miss-islington commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

Thanks @code-of-kpp for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting review label Jul 31, 2023
@miss-islington

miss-islington commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

Sorry, @code-of-kpp and @ambv, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 08447b5deb47e2a0df87fa0a0576d300e5c909b4 3.12

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington miss-islington assigned ambv Jul 31, 2023
@miss-islington

miss-islington commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

Sorry, @code-of-kpp and @ambv, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 08447b5deb47e2a0df87fa0a0576d300e5c909b4 3.11

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv

ambv commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

I'll backport disabled test removal first to make the conflicts go away. That's #107483 and #107484.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ambv pushed a commit to ambv/cpython that referenced this pull request Jul 31, 2023
@code-of-kpp @ambv
[3.12] pythongh-46376: Return existing pointer when possible in ctypes (
c38d425
pythonGH-107131)

(cherry picked from commit 08447b5)

Co-authored-by: Konstantin <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 31, 2023

Copy link
Copy Markdown

GH-107487 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 31, 2023
ambv pushed a commit to ambv/cpython that referenced this pull request Jul 31, 2023
@code-of-kpp @ambv
[3.11] pythongh-46376: Return existing pointer when possible in ctypes (
f099f3a
pythonGH-107131)

(cherry picked from commit 08447b5)

Co-authored-by: Konstantin <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 31, 2023

Copy link
Copy Markdown

GH-107488 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 31, 2023
ambv added a commit that referenced this pull request Jul 31, 2023
@ambv @code-of-kpp
[3.12] gh-46376: Return existing pointer when possible in ctypes (GH-…
54aaaad
…107131) (#107487)

(cherry picked from commit 08447b5)

Co-authored-by: Konstantin <[email protected]>
ambv added a commit that referenced this pull request Jul 31, 2023
@ambv @code-of-kpp
[3.11] gh-46376: Return existing pointer when possible in ctypes (GH-…
57f27e4
…107131) (#107488)

(cherry picked from commit 08447b5)

Co-authored-by: Konstantin <[email protected]>
@mattip mattip mentioned this pull request Aug 14, 2023
incompatible behaviour between 3.12.0rc1 and previous versions in ctypes #107940
Closed
2 tasks done
ambv added a commit to ambv/cpython that referenced this pull request Aug 21, 2023
@ambv
Revert "[3.11] pythongh-46376: Return existing pointer when possible …
4760094
…in ctypes (pythonGH-107131) (python#107488)"

This reverts commit 57f27e4.
ambv added a commit to ambv/cpython that referenced this pull request Aug 22, 2023
@ambv
Revert "[3.12] pythongh-46376: Return existing pointer when possible …
0d4c21d
…in ctypes (pythonGH-107131) (python#107487)"

This reverts commit 54aaaad.
ambv added a commit to ambv/cpython that referenced this pull request Aug 24, 2023
@ambv
Revert "[3.11] pythongh-46376: Return existing pointer when possible …
b08996e
…in ctypes (pythonGH-107131) (python#107488)"

This reverts commit 57f27e4.
ambv added a commit that referenced this pull request Aug 24, 2023
@ambv
[3.11] Revert "gh-46376: Return existing pointer when possible in cty…
c3d129f
…pes (GH-107131) (GH-107488)" (#108412)

This reverts commit 57f27e4.

The fix caused gh-107940. Until we have a bulletproof fix for that, the 3.11 backport needs to be reverted to make way for 3.11.5.
vstinner added a commit to vstinner/cpython that referenced this pull request Aug 30, 2023
@vstinner
Revert "pythongh-46376: Return existing pointer when possible in ctyp…
8ae78bf
…es (python#107131)"

This reverts commit 08447b5.

Revert also _ctypes.c changes of the PyDict_ContainsString() change,
commit 6726626.
ambv added a commit to ambv/cpython that referenced this pull request Sep 4, 2023
@ambv
Revert "[3.12] pythongh-46376: Return existing pointer when possible …
a6f728d
…in ctypes (pythonGH-107131) (python#107487)"

This reverts commit 54aaaad.
ambv added a commit that referenced this pull request Sep 4, 2023
@ambv @Yhg1s
[3.12] gh-46376: Revert "Return existing pointer when possible in cty…
e0f6080
…pes (GH-107131) (GH-107487)" (#108864)

This reverts commit 54aaaad.

Co-authored-by: T. Wouters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ambv ambv Awaiting requested review from ambv

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ambv ambv

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@code-of-kpp @bedevere-bot @miss-islington @ambv @s1kpp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.