X Tutup
Skip to content

AIX: OSError: [Errno 22] Invalid argument when history file is empty and no lines are written #105694

@jose1711

Description

@jose1711

Bug report

With an empty .python_history file:

$ python3
Python 3.7.15 (default, Dec 15 2022, 03:08:16)
[GCC 8.3.0] on aix7
Type "help", "copyright", "credits" or "license" for more information.
>>> (just press Ctrl-D)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/opt/freeware/lib64/python3.7/site.py", line 449, in write_history
    readline.write_history_file(history)
OSError: [Errno 22] Invalid argument

Here's another non-interactive test-case

$ > /tmp/foo
$ python3 -c "import readline; readline.write_history_file('/tmp/foo')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument

Your environment

  • CPython versions tested on:
$ python3 --version
Python 3.7.15
$ rpm -q python3
python3-3.7.15-2.ppc
$ rpm -q readline
readline-8.1-1.ppc

This is the latest available python3 version available from YUM repository.

  • Operating system and architecture:
    AIX 7.2, TL5 SP5, PowerPC:
$ oslevel -s
7200-05-05-2246

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup