Repository navigation
New REPL Traceback Not Formatted Correctly #123178
Copy link
Copy link
Closed
Labels
topic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
At first I thought it was because the window was small but it happens even if the window is large.
>>> import threading
>>> thread = threading.Thread(target=lambda: threading.current_thread().name == 'MainThread')
>>> thread.run()
>>> thread.join()
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
thread.join()
~~~~~~~~~~~^^
File "/Users/codyscott_1/.pyenv/versions/3.13t-dev/lib/python3.13t/threading.py", line 1083, in join
raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started
>>> thread.start()
Exception in thread Thread-1 (<lambda>):
>>> Traceback (most recent call last):
File "/Users/codyscott_1/.pyenv/versions/3.13t-dev/lib/python3.13t/threading.py", line 991, in run
if self._target is not None:
^^^^^^^^^^^^
AttributeError: 'Thread' object has no attribute '_target'. Did you mean: '_started'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/codyscott_1/.pyenv/versions/3.13t-dev/lib/python3.13t/threading.py", line 1041, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/Users/codyscott_1/.pyenv/versions/3.13t-dev/lib/python3.13t/threading.py", line 996, in run
del self._target, self._args, self._kwargs
^^^^^^^^^^^^
AttributeError: 'Thread' object has no attribute '_target'
>>> CPython versions tested on:
3.13
Operating systems tested on:
macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
cfbolz commentedon Aug 24, 2024
confirmed on linux
rruuaanng commentedon Sep 6, 2024
I tested it on Ubuntu 22 and didn't encounter the issues mentioned, Maybe it's because my computer isn't a MacOS
pythongh-120221: Support KeyboardInterrupt in asyncio REPL
pythongh-120221: Support KeyboardInterrupt in asyncio REPL
gh-120221: Support KeyboardInterrupt in asyncio REPL (#123795)
pythongh-120221: Support KeyboardInterrupt in asyncio REPL (pythonGH-…
[3.13] gh-120221: Support KeyboardInterrupt in asyncio REPL (GH-123795)…
ambv commentedon Sep 6, 2024
Fixed by #123799.
Siecje commentedon Sep 9, 2024
I just tried with 3.13.0rc2 and I get a
KeyboardInterruptafter the traceback.Siecje commentedon Oct 4, 2024
I get the same
KeyboardInterruptafter with Python3.13.0rc3.