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 — bpo-40077: Convert itertools types to heap types by erlend-aasland · Pull Request #24065 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Jan 2, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

https://bugs.python.org/issue40077

Sorry, something went wrong.

Uh oh!

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

All reactions
Erlend E. Aasland added 23 commits January 2, 2021 21:13
Erlend E. Aasland
Convert groupby and _grouper to heap types
1c93d36
Erlend E. Aasland
Convert cycle type to heap type
f1d27e9
Erlend E. Aasland
Convert dropwhile type to heap type
c654ad3
Erlend E. Aasland
Convert takewhile type to heap type
09206f9
Erlend E. Aasland
Convert starmap type to heap type
676d4ef
Erlend E. Aasland
Convert combinations & cwr types to heap types
68a64c6
Erlend E. Aasland
Convert permutations type to heap type
f46b80c
Erlend E. Aasland
Convert accumulate type to heap type
520b009
Erlend E. Aasland
Convert compress type to heap type
970c8bb
Erlend E. Aasland
Convert filterfalse type to heap type
8f24fb5
Erlend E. Aasland
Convert count type to heap type
1e8d1cc
Erlend E. Aasland
Convert pairwise type to heap type
a6df90d
Erlend E. Aasland
Convert ziplongest type to heap type
ea4ac64
Erlend E. Aasland
Convert product type to heap type
55fc088
Erlend E. Aasland
Convert repeat type to heap type
7c32c2f
Erlend E. Aasland
Convert islice type to heap type
3bde6b4
Erlend E. Aasland
Convert chain type to heap type
88b0926
Erlend E. Aasland
Convert tee type to heap type
de95b43
Erlend E. Aasland
Convert teedataobject type to heap type
3df69b6
Erlend E. Aasland
Remove unneeded PyType_Ready() calls
adbde61
Erlend E. Aasland
Sort types
cb8c7fe
Erlend E. Aasland
Remove unneeded Py_SET_TYPE on teedataobject type
a2c9349
Erlend E. Aasland
Add NEWS
8d8cd61
@erlend-aasland
erlend-aasland requested a review from rhettinger as a code owner January 2, 2021 23:13
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jan 2, 2021
@bedevere-bot bedevere-bot added the awaiting review label Jan 2, 2021
@erlend-aasland

erlend-aasland commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

@rhettinger, let me know how large chunks you want me to split this PR in.

All reactions

Sorry, something went wrong.

Uh oh!

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

shihai1991
shihai1991 reviewed Jan 3, 2021
View reviewed changes
Comment thread Modules/itertoolsmodule.c Resolved

Uh oh!

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

Erlend E. Aasland
Address review: fix performance issue in tee_copy()
55cee70
@erlend-aasland
erlend-aasland requested a review from shihai1991 January 3, 2021 09:38
@pablogsal pablogsal added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 4, 2021
@bedevere-bot

bedevere-bot commented Jan 4, 2021

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @pablogsal for commit 55cee70 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 4, 2021
@rhettinger

rhettinger commented Jan 4, 2021

Copy link
Copy Markdown
Contributor
  • I can't review this because I don't fully understand the changes
  • I'm unclear why this is necessary.
  • The code churn is enormous.
  • There are measurable performance hits.
  • There are no doc changes or tests, so I'm unclear what the user benefit would be.
All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Jan 4, 2021

Copy link
Copy Markdown
Contributor Author
  • I can't review this because I don't fully understand the changes

The changes are described in the PR subject: "Convert itertools types to heap types"
As an improvement, and in order to make the change more explicit, I could alter the subject to "Convert itertools types to heap allocated types".

In order to fully understand the changes, I would recommend taking a look at PEP 384, PEP 573, PyType_Spec, and PyType_Slot.

I guess @vstinner or @corona10 could assist in reviewing this, if they don't mind.

  • I'm unclear why this is necessary.
  • issue1635741
  • Why Isolate Subinterpreters?
  • PEP 630
  • The code churn is enormous.

#24065 (comment)

  • There are measurable performance hits.

https://mail.python.org/archives/list/[email protected]/thread/S5GZZCEREZLA2PEMTVFBCDM52H4JSENR/#RIK75U3ROEHWZL4VENQSQECB4F4GDELV

  • There are no doc changes

The itertools docs does not contain information about how its types are implemented. I see no reason to add this information.

or tests

A module should not alter its behaviour depending on how its types are implemented. I see no reason to add type implementation specific tests for itertools.

, so I'm unclear what the user benefit would be.

  • Why Isolate Subinterpreters?
  • PEP 630
All reactions

Sorry, something went wrong.

Uh oh!

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

@shihai1991
shihai1991 requested review from corona10 and vstinner January 5, 2021 17:01
@vstinner

vstinner commented Jan 6, 2021

Copy link
Copy Markdown
Member

I prefer to close the PR for now. I'm working on a PEP with @corona10 to explain the rationale. We can wait until this (future) PEP is accepted before changing itertools.

erlend-aasland reacted with thumbs up emoji corona10 reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner closed this Jan 6, 2021
@erlend-aasland
erlend-aasland deleted the bpo-40077/itertools branch January 6, 2021 11:41
@erlend-aasland

erlend-aasland commented Jan 6, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

I prefer to close the PR for now. I'm working on a PEP with @corona10 to explain the rationale. We can wait until this (future) PEP is accepted before changing itertools.

All right!

I'll keep the branch around, then :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal pablogsal mentioned this pull request Feb 8, 2021
bpo-40077: Convert zoneinfo type to heap type #24481
Closed
@erlend-aasland

erlend-aasland commented Jun 27, 2022

Copy link
Copy Markdown
Contributor Author

FYI, PEP-687 was just accepted.

All reactions

Sorry, something went wrong.

Uh oh!

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

@corona10 corona10 mentioned this pull request Jun 27, 2022
Convert static types to heap types: use PyType_FromSpec() #84258
Closed
@erlend-aasland erlend-aasland mentioned this pull request Jan 24, 2023
Isolate the itertools extension module #101277
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rhettinger rhettinger Awaiting requested review from rhettinger
@shihai1991 shihai1991 Awaiting requested review from shihai1991
@vstinner vstinner Awaiting requested review from vstinner
@corona10 corona10 Awaiting requested review from corona10

Uh oh!

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

Assignees

No one assigned

Labels

awaiting review

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.

7 participants

@erlend-aasland @bedevere-bot @rhettinger @vstinner @shihai1991 @pablogsal @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.