Skip to content

IPython 8.2.0 ERROR with %cpaste -q #13622

@ljmc-github

Description

@ljmc-github

I recently updated my workflow to use pyenv, which brought along an update to all my pip installed tools.

IPython was updated from 8.1.1 to 8.2.0.

Since then running a block with %cpaste -q which I use a lot causes an ERROR:

ERROR! Session/line number was not unique in database. History logging moved to new session 3

I compared with my old install and with a downgraded version, both work as expected:

  1. Old install using brew and pip
Python 3.10.2 (main, Feb  2 2022, 06:19:27) [Clang 13.0.0 (clang-1300.0.29.3)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.1.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %cpaste -q
i = 1
print(i)
--
1

In [2]:
  1. New install in pyenv and pip
Python 3.9.11 (main, Apr  4 2022, 12:07:49)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %cpaste -q
j = 2
print(j)
--
2

ERROR! Session/line number was not unique in database. History logging moved to new session 3
In [3]:
  1. Downgraded to 8.1.1
Python 3.9.11 (main, Apr  4 2022, 12:07:49)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.1.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %cpaste -q
i = 1
print(i)
--
1

In [2]:

There was a difference in the history.sqlite database, both 8.1.1 version has a single row for the %cpaste -q, the 8.2.0 was also showing the j = 2 and print(j) on a second row, but I'm unable to find this output at this time. The overincrementing can be seen in the jump from prompt 1 straight to 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions