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-101277: Isolate itertools, add group and _grouper types to module state by erlend-aasland · Pull Request #101302 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Jan 24, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Part 1/4

  • Issue: Isolate the itertools extension module #101277

Sorry, something went wrong.

Uh oh!

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

All reactions
erlend-aasland added 3 commits January 25, 2023 00:30
@erlend-aasland
Add immutable types tests
3ab0289
@erlend-aasland
pythongh-101277: establish global state
99406f8
@erlend-aasland
pythongh-101277: Add groupby and _grouper types to module state
50410bf
@erlend-aasland
erlend-aasland requested a review from rhettinger as a code owner January 24, 2023 23:38
@erlend-aasland
erlend-aasland requested a review from kumaraditya303 January 24, 2023 23:38
@bedevere-bot bedevere-bot added the awaiting core review label Jan 24, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jan 24, 2023
Isolate the itertools extension module #101277
Closed
@erlend-aasland erlend-aasland added the skip news label Jan 24, 2023
@erlend-aasland

erlend-aasland commented Jan 24, 2023

Copy link
Copy Markdown
Contributor Author

This is part 1 of 4. I've split each PR so the diffs are ~200 lines of code, excluding clinic changes. This PR add helpers for fetching state, adds tests for type immutability, converts two of the types to heap types, and add them to the module state.

Follow-up PRs for the rest of the types are created as draft PRs; these will be rebased onto main after this PR has landed.

The last PR will purge the global-to-fix file, and add a NEWS entry.

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland commented Jan 24, 2023
View reviewed changes
Comment thread Modules/itertoolsmodule.c Resolved

Uh oh!

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

@erlend-aasland
Merge branch 'main' into isolate-itertools/batch-1
6dc2032
@erlend-aasland erlend-aasland added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 25, 2023
@bedevere-bot

bedevere-bot commented Jan 25, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit 6dc2032 🤖

If you want to schedule another build, you need to add the :hammer: test-with-refleak-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-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 25, 2023
@rhettinger
rhettinger removed their request for review January 29, 2023 03:46
erlend-aasland added 2 commits January 29, 2023 11:32
@erlend-aasland
Sync with main
2cfe214
@erlend-aasland
Store state in groupbyobject
f1e877b
erlend-aasland
erlend-aasland commented Jan 29, 2023
View reviewed changes
Comment thread Modules/clinic/itertoolsmodule.c.h Resolved

Uh oh!

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

erlend-aasland added 2 commits January 29, 2023 12:01
@erlend-aasland
In _grouper_create, fetch state from groupbyobject->state
a0f9b42
@erlend-aasland
Removed now unused variable
51b3c6e
rhettinger
rhettinger reviewed Jan 29, 2023
View reviewed changes
Comment thread Modules/itertoolsmodule.c Resolved

Uh oh!

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

@erlend-aasland erlend-aasland mentioned this pull request Jan 29, 2023
Argument clinic: improve generated code for self converter type checks #101409
Closed
@kumaraditya303 kumaraditya303 self-assigned this Jan 31, 2023
kumaraditya303
kumaraditya303 reviewed Jan 31, 2023
View reviewed changes
Comment thread Modules/itertoolsmodule.c Resolved

Uh oh!

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

erlend-aasland and others added 3 commits January 31, 2023 18:00
@erlend-aasland @kumaraditya303
Update Modules/itertoolsmodule.c
7aea9f6
Co-authored-by: Kumar Aditya <[email protected]>
@erlend-aasland
Include pycore_moduleobject.h bco. _PyModule_GetState()
10cb0bc
@erlend-aasland
Make sure the include is inserted in alphabetical order
a64e69c
kumaraditya303
kumaraditya303 approved these changes Jan 31, 2023
View reviewed changes

@kumaraditya303 kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with hooray emoji erlend-aasland reacted with heart emoji
All reactions
  • 🎉 1 reaction
  • ❤️ 1 reaction
Comment thread Modules/itertoolsmodule.c Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jan 31, 2023
@erlend-aasland

erlend-aasland commented Jan 31, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews! Highly appreciated. I'm considering landing this tomorrow.

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland and others added 2 commits January 31, 2023 19:03
@erlend-aasland @kumaraditya303
Update Modules/itertoolsmodule.c
4783565
Co-authored-by: Kumar Aditya <[email protected]>
@erlend-aasland
Sync with main
cea6d40
erlend-aasland
erlend-aasland commented Jan 31, 2023
View reviewed changes
Comment thread Modules/clinic/itertoolsmodule.c.h Resolved

Uh oh!

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

@erlend-aasland
Add get-state-by-cls helper and use it for subclass check
8a3b6df
@erlend-aasland
erlend-aasland requested a review from kumaraditya303 February 1, 2023 07:35
kumaraditya303
kumaraditya303 approved these changes Feb 1, 2023
View reviewed changes
@erlend-aasland

erlend-aasland commented Feb 1, 2023

Copy link
Copy Markdown
Contributor Author

I'm landing this shortly. I'll rebase #101303 onto main and mark it as ready for review.

Thanks again for the reviews.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
erlend-aasland merged commit 2b3e02a into python:main Feb 1, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Feb 1, 2023
@erlend-aasland
erlend-aasland deleted the isolate-itertools/batch-1 branch February 1, 2023 11:41
carljm added a commit to carljm/cpython that referenced this pull request Feb 1, 2023
@carljm
Merge branch 'main' into inlinecomp2
8b76051
* main:
  pythongh-98831: rewrite PUSH_EXC_INFO and conditional jumps in the instruction definition DSL (python#101481)
  pythongh-98831: Modernize the LOAD_ATTR family (python#101488)
  pythongh-101498 : Fix asyncio.Timeout example in docs (python#101499)
  pythongh-101454: fix documentation for END_ASYNC_FOR (python#101455)
  pythongh-101277: Isolate itertools, add group and _grouper types to module state (python#101302)
  pythongh-101317: Add `ssl_shutdown_timeout` parameter for `asyncio.StreamWriter.start_tls` (python#101335)
  datetime.rst: fix combine() signature (python#101490)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rhettinger rhettinger rhettinger left review comments
@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes

Uh oh!

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

Assignees

@kumaraditya303 kumaraditya303

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

@erlend-aasland @bedevere-bot @rhettinger @kumaraditya303
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.