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

Python 3.13.0b1 REPL sometimes swallows the output #119032

Closed
hroncok opened this issue May 14, 2024 · 2 comments
Closed

Python 3.13.0b1 REPL sometimes swallows the output #119032

hroncok opened this issue May 14, 2024 · 2 comments
Labels
topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@hroncok
Copy link
Contributor

hroncok commented May 14, 2024

Bug report

Bug description:

I was debugging a certain issue in setuptools tests in Python 3.13.0b1 REPL:

>>> import os, posixpath
>>> path = r'\foo/bar.txt'
>>> os.path.pardir in path.split(posixpath.sep)
(no output)

I was worried. Shouldn't the result be True or False exclusively?

>>> os.path.pardir in path.split(posixpath.sep)
>>> os.path.pardir in path.split(posixpath.sep)
False
>>> os.path.pardir in path.split(posixpath.sep)
False
>>> os.path.pardir in path.split(posixpath.sep)
False
>>> os.path.pardir in path.split(posixpath.sep)
False
>>> os.path.pardir in path.split(posixpath.sep)
False

Huh? Let's try again with something simpler:

>>> 'a' in 'aaa'
>>> 'a' in 'aaa'
True

This appears to happen entirely at random for me.

$ python3.13
Python 3.13.0b1 (main, May  9 2024, 00:00:00) [GCC 14.1.1 20240507 (Red Hat 14.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'a' in 'aaa'
>>> 'a' in 'aaa'
True

$ python3.13
Python 3.13.0b1 (main, May  9 2024, 00:00:00) [GCC 14.1.1 20240507 (Red Hat 14.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'a' in 'aaa'
True
>>> 'a' in 'aaa'
True

This is on Fedora Linux 39.

python3.13-3.13.0~b1-2.fc41.x86_64
readline-8.2-6.fc39.x86_64
ncurses-libs-6.4-7.20230520.fc39.1.x86_64

CPython versions tested on:

3.13

Operating systems tested on:

Linux

@hroncok hroncok added the type-bug An unexpected behavior, bug, or error label May 14, 2024
@Eclips4 Eclips4 added the topic-repl Related to the interactive shell label May 14, 2024
@hugovk
Copy link
Member

hugovk commented May 14, 2024

Did you paste the lines with swallowed output? If so, see #118893.

@hroncok
Copy link
Contributor Author

hroncok commented May 14, 2024

Thanks. I did, but I did not notice that as I was mixing pasting,t typing and using the prompt history.

This is a duplicate of #118893.

@hroncok hroncok closed this as completed May 14, 2024
@Eclips4 Eclips4 closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants