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-107458: fix test_tools refleak by kumaraditya303 · Pull Request #107577 · python/cpython

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Aug 3, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: test_tools are leaked #107458

Sorry, something went wrong.

Uh oh!

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

All reactions
@kumaraditya303
fix test_tools refleak
2d7a150
@kumaraditya303 kumaraditya303 added the skip news label Aug 3, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jul 31, 2023
test_tools are leaked #107458
Closed
@bedevere-bot bedevere-bot added awaiting core review tests Tests in the Lib/test dir labels Aug 3, 2023
@kumaraditya303
mock fork handler
f609dbc
@kumaraditya303

kumaraditya303 commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

I have verified this locally, I'll merge as the buildbots are all already broken, will check later when things are better.

All reactions

Sorry, something went wrong.

Uh oh!

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

@kumaraditya303
kumaraditya303 enabled auto-merge (squash) August 3, 2023 05:55
@kumaraditya303
kumaraditya303 merged commit 46366ca into python:main Aug 3, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label Aug 3, 2023
@kumaraditya303
kumaraditya303 deleted the refleak branch August 3, 2023 14:14
@Eclips4

Eclips4 commented Aug 3, 2023

Copy link
Copy Markdown
Member

Are this really solve the issue?
this code still leaks:

import sys
import importlib


name = "_decimal"
importlib.import_module(name)
sys.modules.pop(name)

./python.exe -X showrefcount example.py
[7624 refs, 4253 blocks]
All reactions

Sorry, something went wrong.

Uh oh!

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

@kumaraditya303

kumaraditya303 commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

Nope, this fixes this test which was false leaking, you should try running the test_tools on current main branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Eclips4 Eclips4 mentioned this pull request Aug 8, 2023
Refleak when some "internal modules" are imported multiple times. #107789
Closed
@vstinner vstinner mentioned this pull request Aug 21, 2023
_socket extension C capsule cannot be visited by the GC and so _socket.socket type may stay alive longer than expected #108240
Closed
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

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.

3 participants

@kumaraditya303 @Eclips4 @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 01402520 — 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.