Skip to content

Fix Handling of shell.should_run_async#605

Merged
blink1073 merged 1 commit into
ipython:masterfrom
afshin:should-run-async
Mar 18, 2021
Merged

Fix Handling of shell.should_run_async#605
blink1073 merged 1 commit into
ipython:masterfrom
afshin:should-run-async

Conversation

@afshin

@afshin afshin commented Mar 18, 2021

Copy link
Copy Markdown
Member

Fixes #540

@blink1073 blink1073 added this to the 6.0 milestone Mar 18, 2021
@blink1073 blink1073 merged commit b84f023 into ipython:master Mar 18, 2021

@blink1073 blink1073 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jccurtis

Copy link
Copy Markdown

Yes thank you! Is there a planned release with this fix?

@blink1073

Copy link
Copy Markdown
Contributor

@meeseeksdev please backport to 5.5.x

meeseeksmachine pushed a commit to meeseeksmachine/ipykernel that referenced this pull request Mar 18, 2021
blink1073 pushed a commit that referenced this pull request Mar 18, 2021
…on-5.5.x

Backport PR #605 on branch 5.5.x (Fix Handling of shell.should_run_async)
@blink1073

Copy link
Copy Markdown
Contributor

Done! https://pypi.org/project/ipykernel/5.5.1/

@blink1073

Copy link
Copy Markdown
Contributor

I deleted https://pypi.org/project/ipykernel/5.5.1 because we would have to upgrade our ipython dependency to 7.17, which doesn't make sense in a patch release. cf #607. This will have to wait for the next minor or major release, whichever comes first.

@Carreau

Carreau commented Mar 19, 2021

Copy link
Copy Markdown
Member

Noooooooooo.

That reintroduce the exact bug the change of API was meant to prevent. We have transformers that are stateful; they destroy data if called twice.

self.shell.transform_cell(code) should not be called twice in an execution loop. The warning is there for a reason.

@afshin

afshin commented Mar 22, 2021

Copy link
Copy Markdown
Member Author

That reintroduce the exact bug the change of API was meant to prevent. We have transformers that are stateful; they destroy data if called twice.

self.shell.transform_cell(code) should not be called twice in an execution loop. The warning is there for a reason.

Ah, did we miss passing transformed_cell and preprocessing_exc_tuple here and perhaps here?

blink1073 pushed a commit that referenced this pull request Mar 30, 2021
Revert Backport of #605: Fix Handling of shell.should_run_async
@blink1073 blink1073 added the bug label Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeprecationWarning has unclear origin: should_run_async will not call transform_cell automatically in the future

4 participants