René's URL Explorer Experiment


Title: Align itertools constructor binding and conversions by youknowdot · Pull Request #9632 · RustPython/RustPython · GitHub

Open Graph Title: Align itertools constructor binding and conversions by youknowdot · Pull Request #9632 · RustPython/RustPython

X Title: Align itertools constructor binding and conversions by youknowdot · Pull Request #9632 · RustPython/RustPython

Description: Summary Align itertools constructor binding and conversion order with CPython while preserving positional/keyword kinds and subclass keyword handling. Bind tee's optional count before invoking __index__. Build on merged #9513: keep typed PyIter arguments for cycle, starmap, takewhile, dropwhile, filterfalse, and pairwise, whose positional arity and keyword checks now happen before conversion. Retain deferred conversion where ordering or source lifetime requires it. In particular, _tee must keep its source alive until copying an existing tee's position. Align batched signed-size conversion, strict truth testing, partial-batch and source-error behavior, and islice start/stop/step conversion ordering and ValueErrors. Validate combinations sizes before consuming the iterable, preserve permutations' distinct pool-first/PyLong-only semantics, and distinguish an omitted repeat count from explicit None. Share the C-ssize conversion for relevant counts and retain user conversion exceptions. Add focused regression coverage for argument rejection before __iter__, direct __new__ calls, subclass keywords, and _tee source finalization. Resolve the related Clippy warnings. Validation cargo test --locked -p rustpython-vm --lib: 170 passed. Threading-enabled RustPython debug build with stdlib,stdio,importlib,host_env,doc,threading; rustpython -m test test_itertools: SUCCESS, 137 run, 22 skipped. pytest -v test_snippets.py -k stdlib_itertools: 2 passed (RustPython and CPython 3.12.14). Targeted VM Clippy with compiler,gc,host_env,stdio,doc,threading,importlib,encodings: passed without warnings. Normal commit hooks, including rustfmt, cspell, and Ruff: passed. Full workspace/C-API suites and release-mode tests have not completed. The first non-threading build failed the concurrent tee test; rerunning the full module with threading enabled passed. This does not claim complete constructor parity. Existing arity-versus-keyword diagnostic precedence, other allocation and argument/source lifetime differences, try_index normalization details, and broader concurrency behavior remain outside scope. Deferred conversion retains the original argument during the constructor call and adds bounded reference-management work; no benchmark was run. zip_longest variadic binding remains unchanged because deferring it requires a separately assessed temporary allocation. AI assistance OpenAI Codex assisted with implementation, source review, regression tests, and local validation.

Open Graph Description: Summary Align itertools constructor binding and conversion order with CPython while preserving positional/keyword kinds and subclass keyword handling. Bind tee's optional count before invoking...

X Description: Summary Align itertools constructor binding and conversion order with CPython while preserving positional/keyword kinds and subclass keyword handling. Bind tee's optional count before invo...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9632

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ac64fb2e-5dac-28b9-2fd1-21a58b66d23a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id86FA:3A8E64:138FE5B:19EE1F2:6B01F396
html-safe-nonceca7cc83c5121f1c70fdbc2e622e5e76796494b92bfb80db6da2a5eb0653ff61b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkZBOjNBOEU2NDoxMzhGRTVCOjE5RUUxRjI6NkIwMUYzOTYiLCJ2aXNpdG9yX2lkIjoiNjk1ODIwNTQ1MzUxNjAxMDM5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac841bc6fee9c0ba7bd8c482972f1740ad0e11006db125b82c72aae97b2214199e
hovercard-subject-tagpull_request:5139665404
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9632/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Align itertools constructor binding and conversion order with CPython while preserving positional/keyword kinds and subclass keyword handling. Bind tee's optional count before invoking...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9632/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9632%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9632%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9632/files
Reloadhttps://github.com/RustPython/RustPython/pull/9632/files
Reloadhttps://github.com/RustPython/RustPython/pull/9632/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:fix/itertools-constructor-binding-20261103https://github.com/youknowdot/RustPython/tree/fix/itertools-constructor-binding-20261103
Conversation 4 https://github.com/RustPython/RustPython/pull/9632
Commits 9 https://github.com/RustPython/RustPython/pull/9632/commits
Checks 19 https://github.com/RustPython/RustPython/pull/9632/checks
Files changed https://github.com/RustPython/RustPython/pull/9632/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9632/files
Align itertools constructor binding and conversions https://github.com/RustPython/RustPython/pull/9632/files#top
Show all changes 9 commits https://github.com/RustPython/RustPython/pull/9632/files
b60a1d0 Align batched arguments and termination behavior youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/b60a1d0ce4fdf609d1f5cbf5b8ea42f92017b022
aed9a43 Align islice index conversion order youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/aed9a431f24766920e2789d7742f8109ce274a69
eea2a85 Validate combinator sizes in CPython order youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/eea2a8554d6a759cb2569b09e9dc504fb0b49241
c740933 Distinguish omitted repeat count from None youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/c740933432d70e1fbac1231b178cb41529a65210
61d03e1 Bind itertools arguments before conversions youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/61d03e14c24d92cebe171cf6c7e4bfdaba927410
a0f59c3 Match iterator count conversion diagnostics youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/a0f59c35e6569208bcc43f6ba52ab46e1b2363b2
bf26e22 Match repeat count overflow conversion youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/bf26e22a86d6c251c8bb46fb13aff1263ef5e004
300b261 Reuse the shared optional argument binder for islice youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/300b261fba53a3c999b844b99bc12d7b1186f893
60e3d91 Restore typed positional itertools arguments after binder validation youknowdot Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9632/commits/60e3d91646fae489271f3385386e747cc8dca2a9
Clear filters https://github.com/RustPython/RustPython/pull/9632/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9632/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9632/files
int.rs https://github.com/RustPython/RustPython/pull/9632/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
itertools.rs https://github.com/RustPython/RustPython/pull/9632/files#diff-327f924a0e1982a4aa3d49157129811604b589ade7716766a67653a16e0bf101
stdlib_itertools.py https://github.com/RustPython/RustPython/pull/9632/files#diff-4e7aac46413819169f405d74449119f5a3fb6ac758d7ad63a4841cc468b53ac3
crates/vm/src/builtins/int.rshttps://github.com/RustPython/RustPython/pull/9632/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
View file https://github.com/youknowdot/RustPython/blob/60e3d91646fae489271f3385386e747cc8dca2a9/crates/vm/src/builtins/int.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9632/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9632/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
https://github.com/RustPython/RustPython/pull/9632/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9632/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9632/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.