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 raises exception while trying to write to the history file on a read-only file system #128066

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixestopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@vladimir-poghosyan

Description

@vladimir-poghosyan

Bug report

Bug description:

When using new Python 3.13pyrepl on a read-only file system, attempting to exit the REPL raises the following exception:OSError: [Errno 30] Read-only file system: '/root/.python_history'. The same setup works with Python 3.12.

dev:/home/dev$ docker run -it --read-only python:3.12-slim-bookworm python3Python 3.12.7 (main, Nov 12 2024, 02:26:49) [GCC 12.2.0] on linuxType"help","copyright","credits" or"license"for more information.>>> print('hello')hello>>>exit()dev:/home/dev$ docker run -it --read-only python:3.13-slim-bookworm python3Python 3.13.1 (main, Dec  4 2024, 20:40:24) [GCC 12.2.0] on linuxType"help","copyright","credits" or"license"for more information.>>> print('hello')hello>>>exit()Exception ignoredin atexit callback<function register_readline.<locals>.write_history at 0x7f56689a3600>:Traceback (most recent call last):  File"<frozen site>", line 574,in write_history  File"/usr/local/lib/python3.13/_pyrepl/readline.py", line 453,in write_history_file    f = open(os.path.expanduser(filename),"w",OSError: [Errno 30] Read-only file system:'/root/.python_history'

CPython versions tested on:

3.12, 3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixestopic-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