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

issue with display hook in base python repl #4504

Closed
Assignees
tacaswell
Labels
API: changesRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
@tacaswell

Description

@tacaswell

This only applies to the basepython repl, everything works inIPython repls.

In discussion onb2fbae7 discovered thatsys.displayhook only gets evaluated for expressions, not statements.

This means that things like

importnumpypassa=b

will not trigger the auto-redrawing. This is particularly troubling because this mean

ln,=ax.plot(...)

will not trigger a re-draw, but

ax.plot(...)

will.

Due tob2fbae7, where we rely on the auto-redrawing to trigger thepyplot redrawing this means that manypyplot workflows in the normal repl are broken (as in things that used to auto-redraw no longer do).

The options I think are:

  1. figure out how to trigger a call back on statements (if this is possible, it is well hidden. There may be a reason IPython completely re-wrote the execution handling)
  2. say we only support interactive plotting with the IPython repl (which is a major regression)
  3. revert the removal ofdraw_if_interactive which maintains some functions as 'special'

I suspect that the answer is going to be both 2 and 3. normal python shell keeps current functionality and gainssome new functionality, IPython picks up lots of new functionality, and the code base keeps this particular wart.

Metadata

Metadata

Assignees

Labels

API: changesRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp