Skip to content

IPython 8.1.0 claims to be compatible with Python 3.8, but isn't #13554

@arekfu

Description

@arekfu

Steps to reproduce:

$ python --version
Python 3.8.10
$ pip install ipython
$ ipython
Traceback (most recent call last):
  File "/path/to/venv/bin/ipython", line 8, in <module>
    sys.exit(start_ipython())
  File "/path/to/venv/lib/python3.8/site-packages/IPython/__init__.py", line 123, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/path/to/venv/lib/python3.8/site-packages/traitlets/config/application.py", line 845, in launch_instance
    app.initialize(argv)
  File "/path/to/venv/lib/python3.8/site-packages/traitlets/config/application.py", line 88, in inner
    return method(app, *args, **kwargs)
  File "/path/to/venv/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 279, in initialize
    self.init_shell()
  File "/path/to/venv/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 293, in init_shell
    self.shell = self.interactive_shell_class.instance(parent=self,
  File "/path/to/venv/lib/python3.8/site-packages/traitlets/config/configurable.py", line 540, in instance
    inst = cls(*args, **kwargs)
  File "/path/to/venv/lib/python3.8/site-packages/IPython/terminal/interactiveshell.py", line 619, in __init__
    super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
  File "/path/to/venv/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 529, in __init__
    self.init_virtualenv()
  File "/path/to/venv/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 788, in init_virtualenv
    new_path = p.readlink()
AttributeError: 'PosixPath' object has no attribute 'readlink'

If you suspect this is an IPython 8.1.0 bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True

PosixPath.readlink() was introduced in Python 3.9.

Thank you for looking into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions