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-86493: Fix possible leaks in some modules initialization by serhiy-storchaka · Pull Request #106768 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 15, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.

Use new private function _PyModule_AddNew() public function PyModule_Add() instead of PyModule_AddObject().

  • Issue: C API: Add PyModule_Add() function #86493

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jul 15, 2023
@serhiy-storchaka
serhiy-storchaka requested a review from vstinner July 15, 2023 06:28
@serhiy-storchaka
serhiy-storchaka requested review from abalkin and pganssle as code owners July 15, 2023 06:28
@bedevere-bot bedevere-bot added the awaiting core review label Jul 15, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jul 15, 2023
C API: Add PyModule_Add() function #86493
Closed
@serhiy-storchaka
pythongh-86493: Fix possible leaks in some modules initialization
8703a44
Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
@serhiy-storchaka
serhiy-storchaka force-pushed the pymodule-add4b branch from 1bec79f to 8703a44 Compare July 15, 2023 07:21
@serhiy-storchaka serhiy-storchaka mentioned this pull request Jul 17, 2023
bpo-42327: Add PyModule_Add() (smaller). #23443
Merged
@serhiy-storchaka serhiy-storchaka added the skip news label Jul 18, 2023
@serhiy-storchaka
Merge branch 'main' into pymodule-add4b
63fa1ba
@serhiy-storchaka
serhiy-storchaka merged commit 3e65bae into python:main Jul 18, 2023
@miss-islington

miss-islington commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. 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 core review label Jul 18, 2023
@serhiy-storchaka
serhiy-storchaka deleted the pymodule-add4b branch July 18, 2023 07:50
@miss-islington

miss-islington commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

Sorry @serhiy-storchaka, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 3e65baee72131b49f4ce8ca2da568a6f2001ce93 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 serhiy-storchaka Jul 18, 2023
@miss-islington

miss-islington commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 3e65baee72131b49f4ce8ca2da568a6f2001ce93 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Jul 18, 2023

Copy link
Copy Markdown
Member

Nice fix. I like when removing characters fix bugs :-D

About the backport: Python 3.11 and 3.12 don't have PyModule_Add(), so you cannot backport these fixes, no? While it's tempting, I don't think that it's worth it.

All reactions

Sorry, something went wrong.

Uh oh!

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

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jul 18, 2023
@serhiy-storchaka
[3.12] pythongh-86493: Fix possible leaks in some modules initializat…
e163ec1
…ion (pythonGH-106768)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time..
(cherry picked from commit 3e65bae)

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

bedevere-bot commented Jul 18, 2023

Copy link
Copy Markdown

GH-106855 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 18, 2023
serhiy-storchaka added a commit that referenced this pull request Jul 18, 2023
@serhiy-storchaka
[3.12] gh-86493: Fix possible leaks in some modules initialization (G…
a423ddb
…H-106768) (GH-106855)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65bae)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jul 18, 2023
@serhiy-storchaka
[3.11] [3.12] pythongh-86493: Fix possible leaks in some modules init…
708a1b6
…ialization (pythonGH-106768) (pythonGH-106855)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65bae).
(cherry picked from commit a423ddb)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Jul 19, 2023
@serhiy-storchaka
[3.11] gh-86493: Fix possible leaks in some modules initialization (G…
fced79f
…H-106768) (GH-106855) (GH-106863)

[3.11] [3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65bae).
(cherry picked from commit a423ddb)
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 25, 2023
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.11 only security fixes label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner Awaiting requested review from vstinner
@pganssle pganssle Awaiting requested review from pganssle pganssle is a code owner
@abalkin abalkin Awaiting requested review from abalkin

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

4 participants

@serhiy-storchaka @miss-islington @vstinner @bedevere-bot
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.