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 — [WIP] bpo-40137: Use pep573 in functools extension module. by shihai1991 · Pull Request #20055 · python/cpython

Conversation

@shihai1991

@shihai1991 shihai1991 commented May 12, 2020 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

https://bugs.python.org/issue40137

Sorry, something went wrong.

Uh oh!

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

All reactions
@shihai1991
test
63b68b5
@shihai1991
shihai1991 requested a review from rhettinger as a code owner May 12, 2020 15:18
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 12, 2020
@bedevere-bot bedevere-bot added the awaiting review label May 12, 2020
@shihai1991
shihai1991 marked this pull request as draft May 12, 2020 15:18
@shihai1991 shihai1991 mentioned this pull request May 12, 2020
bpo-40549: Convert posixmodule.c to multiphase init #19982
Merged
corona10
corona10 reviewed May 12, 2020
View reviewed changes
Comment thread Modules/_functoolsmodule.c Resolved

Uh oh!

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

@shihai1991

shihai1991 commented May 12, 2020

Copy link
Copy Markdown
Member Author

There have a problem what petr have mentioned in #19982: This also only works because the iterator type is not subclassable.(PyType_GetModule can not work if the type is subtype).

All reactions

Sorry, something went wrong.

Uh oh!

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

@shihai1991
update pep573 in functools extension module
2ddffb0
vstinner
vstinner requested changes May 14, 2020
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It is possible to subclass lru_cache_type and so calling PyType_GetModule(Py_TYPE(self)) in lru_cache_new() doesn't work.

It seems like the _functools will have to wait until the PEP 573 is extended.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot

bedevere-bot commented May 14, 2020

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels May 14, 2020
@shihai1991

shihai1991 commented May 14, 2020

Copy link
Copy Markdown
Member Author

It is possible to subclass lru_cache_type and so calling PyType_GetModule(Py_TYPE(self)) in lru_cache_new() doesn't work.

It seems like the _functools will have to wait until the PEP 573 is extended.

You are right, the type have tp_new can not worked now : (

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner closed this May 14, 2020
encukou
encukou reviewed May 15, 2020
View reviewed changes
Comment thread Modules/_functoolsmodule.c Resolved

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner requested changes
@encukou encukou encukou left review comments
@corona10 corona10 corona10 left review comments
@rhettinger rhettinger Awaiting requested review from rhettinger

Uh oh!

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

Assignees

No one assigned

Labels

awaiting changes

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.

6 participants

@shihai1991 @bedevere-bot @vstinner @encukou @corona10 @the-knights-who-say-ni
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.