Skip to content

Incorrect representation of itertools.count(sys.maxsize) #126618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
picnixz opened this issue Nov 9, 2024 · 0 comments
Closed

Incorrect representation of itertools.count(sys.maxsize) #126618

picnixz opened this issue Nov 9, 2024 · 0 comments
Assignees
Labels
3.12 only security fixes 3.13 bugs and security fixes 3.14 bugs and security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@picnixz
Copy link
Member

picnixz commented Nov 9, 2024

Bug report

Bug description:

./python -c 'import sys; import itertools; print(itertools.count(sys.maxsize))'
count(<NULL>)

This aborts on DEBUG builds. See #126595 (comment).

I'd like to address this issue separately since the free-threaded code would be different.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

@picnixz picnixz added type-bug An unexpected behavior, bug, or error extension-modules C modules in the Modules dir 3.12 only security fixes 3.13 bugs and security fixes 3.14 bugs and security fixes labels Nov 9, 2024
@picnixz picnixz self-assigned this Nov 9, 2024
@picnixz picnixz changed the title Incorrect itertools.count.__repr__ when count is sys.maxsize Incorrect representation of itertools.count(sys.maxsize) Nov 9, 2024
skirpichev added a commit to skirpichev/cpython that referenced this issue Nov 20, 2024
vstinner pushed a commit that referenced this issue Dec 2, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 2, 2024
)

(cherry picked from commit 930ba0c)

Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
@vstinner vstinner closed this as completed Dec 2, 2024
vstinner pushed a commit that referenced this issue Dec 2, 2024
…127508)

gh-126618: fix repr(itertools.count(sys.maxsize)) (GH-127048)
(cherry picked from commit 930ba0c)

Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
vstinner pushed a commit that referenced this issue Dec 2, 2024
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
ebonnal pushed a commit to ebonnal/cpython that referenced this issue Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 only security fixes 3.13 bugs and security fixes 3.14 bugs and security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants