Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PyREPL exits the interpreter on specific input #125666

Closed
Labels
topic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@warsaw

Description

@warsaw

Bug report

Bug description:

Playing with the Python 3.13.0 interpreter installed from brew on macOS 14.7 in a Terminal window.

I entered the repl and typed

>>>importmath>>>math.tau6.283185307179586

Then I hit ctrl-P to get the last line and hit SPC,/,2. Oddly, the SPC got eaten and the slash ended up right next to theu. I didn't notice that until I hit Enter, at which point the exception occurred and exited the interpreter.

Unfortunately, I cannot reproduce it again.

%python3Python3.13.0 (main,Oct72024,05:02:14) [Clang15.0.0 (clang-1500.3.9.4)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>importmath>>>math.tau6.283185307179586>>>math.tau/2SyntaxError:sourcecodestringcannotcontainnullbytes (<python-input-2>)Duringhandlingoftheaboveexception,anotherexceptionoccurred:Traceback (mostrecentcalllast):File"<frozen runpy>",line198,in_run_module_as_mainFile"<frozen runpy>",line88,in_run_codeFile"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/_pyrepl/__main__.py",line6,in<module>__pyrepl_interactive_console()~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/_pyrepl/main.py",line59,ininteractive_consolerun_multiline_interactive_console(console)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/_pyrepl/simple_interact.py",line160,inrun_multiline_interactive_consolemore=console.push(_strip_final_indent(statement),filename=input_name,_symbol="single")# type: ignore[call-arg]File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/code.py",line313,inpushmore=self.runsource(source,filename,symbol=_symbol)File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/_pyrepl/console.py",line179,inrunsourceself.showsyntaxerror(filename,source=source)~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/_pyrepl/console.py",line165,inshowsyntaxerrorsuper().showsyntaxerror(filename=filename,**kwargs)~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/code.py",line115,inshowsyntaxerrorself._showtraceback(typ,value,None,source)~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/code.py",line140,in_showtracebackandnotvalue.textandlen(lines)>=value.lineno):^^^^^^^^^^^^^^^^^^^^^^^^^^TypeError:'>='notsupportedbetweeninstancesof'int'and'NoneType'

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp