Skip to content

Conversation

aelsayed95
Copy link
Contributor

@aelsayed95 aelsayed95 commented May 21, 2024

Issue described in #118911

Fix includes:

  1. If the user hits enter twice, they are able to exit out of the block, even if there's trailing whitespace.
  2. Trim trailing whitespace in the HistoricalReader to match IPython's behavior

@ghost
Copy link

ghost commented May 21, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented May 21, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@aelsayed95
Copy link
Contributor Author

One issue discovered while testing this (exists on main too):

Within a code block, if the user hits enter twice to add new lines, the first line matches the previous line's indentation while the next one doesn't.
This doesn't match IPython's behaviour.

@aelsayed95
Copy link
Contributor Author

Added #119356

@lysnikolaou lysnikolaou added the needs backport to 3.13 bugs and security fixes label May 21, 2024
Copy link
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

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

Nice! I tested this on Fedora (via Devcontainer) and it looks like this now works as described.

Copy link
Contributor

@ambv ambv left a comment

Choose a reason for hiding this comment

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

This looks good.

I merged new changes in main into your PR since there were conflicts, and reworded the blurb per my suggestion.

@ambv ambv merged commit 5091c44 into python:main May 22, 2024
@miss-islington-app
Copy link

Thanks @aelsayed95 for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @aelsayed95 and @ambv, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 5091c4400c9ea2a2d1e4d89a28c9d0de2651fa6d 3.13

@ambv
Copy link
Contributor

ambv commented May 22, 2024

Thanks, Aya! ✨ 🍰 ✨

@ambv
Copy link
Contributor

ambv commented May 22, 2024

The backport depends on GH-119362. I'll deal with that tomorrow.

@lysnikolaou
Copy link
Member

Thanks, @aelsayed95! I've merged #119362. I'll open a backport PR now.

lysnikolaou pushed a commit to lysnikolaou/cpython that referenced this pull request May 22, 2024
…ent the user from terminating the code block (pythonGH-119355)

(cherry picked from commit 5091c44)

Co-authored-by: Aya Elsayed <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 22, 2024

GH-119404 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 22, 2024
lysnikolaou added a commit that referenced this pull request May 23, 2024
…e user from terminating the code block (GH-119355) (#119404)

(cherry picked from commit 5091c44)

Co-authored-by: Aya Elsayed <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
… user from terminating the code block (python#119355)

Co-authored-by: Łukasz Langa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-repl Related to the interactive shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants