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-104787: use managed weakrefs in `_asyncio` by kumaraditya303 · Pull Request #106516 · python/cpython

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Jul 7, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Optimize and reduce memory usage for asyncio.Task and others #104787

Sorry, something went wrong.

Uh oh!

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

All reactions
@kumaraditya303
use managed weakrefs
cc51492
@kumaraditya303 kumaraditya303 added performance Performance or resource usage topic-asyncio skip news labels Jul 7, 2023
@kumaraditya303
kumaraditya303 requested review from 1st1, asvetlov, gvanrossum and willingc as code owners July 7, 2023 12:10
@bedevere-bot bedevere-bot added the awaiting core review label Jul 7, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jul 7, 2023
Optimize and reduce memory usage for asyncio.Task and others #104787
Closed
@kumaraditya303
remove weakreflist
74a5fbb
@gvanrossum

gvanrossum commented Jul 7, 2023

Copy link
Copy Markdown
Member

I'm not sure who is an expert in these APIs. Maybe @markshannon can review?

All reactions

Sorry, something went wrong.

Uh oh!

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

@kumaraditya303

kumaraditya303 commented Jul 8, 2023

Copy link
Copy Markdown
Contributor Author

I'm not sure who is an expert in these APIs.

Not much to review, see

cpython/Modules/_testcapi/heaptype.c

Lines 861 to 868 in 2ef1dc3

static PyType_Spec HeapCTypeWithManagedWeakref_spec = {
"_testcapi.HeapCTypeWithManagedWeakref",
sizeof(PyObject),
0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_MANAGED_WEAKREF,
HeapCTypeWithManagedWeakref_slots
};
as example of usage

All reactions

Sorry, something went wrong.

Uh oh!

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

itamaro
itamaro reviewed Jul 10, 2023
View reviewed changes
Comment thread Modules/_asynciomodule.c Resolved

Uh oh!

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

@kumaraditya303
kumaraditya303 merged commit 8fb6edf into python:main Jul 10, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label Jul 10, 2023
@kumaraditya303
kumaraditya303 deleted the weakref branch July 10, 2023 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@itamaro itamaro itamaro left review comments
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@gvanrossum gvanrossum Awaiting requested review from gvanrossum
@willingc willingc Awaiting requested review from willingc willingc is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

performance Performance or resource usage skip news topic-asyncio

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

@kumaraditya303 @gvanrossum @itamaro @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.