X Tutup
The Wayback Machine - https://web.archive.org/web/20250114184132/https://github.com/python/cpython/issues/126618
Skip to content
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

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

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 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, 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 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, 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
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
vstinner pushed a commit that referenced this issue Dec 2, 2024
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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 <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@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 <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
vstinner pushed a commit that referenced this issue Dec 2, 2024
…127510)

(cherry picked from commit 930ba0c)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
ebonnal pushed a commit to ebonnal/cpython that referenced this issue Jan 12, 2025
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, 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
X Tutup