GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111201: auto-indentation in _pyrepl by wiggin15 · Pull Request #119348 · python/cpython

Conversation

@wiggin15

@wiggin15 wiggin15 commented May 21, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Auto-indent blocks in new _pyrepl when the user presses after a line that should start a new block. By default, indent by 4 spaces, but keep the user indentation if the user changes it.

Ideas for future improvement (not included in this PR):

  • Add configuration to specify default number of spaces
  • Better parsing of latest line to support auto indentation after lines like this: if foo: # bar (currently it will not auto-indent after this line)
  • Issue: A new Python REPL #111201

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added the awaiting review label May 21, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 21, 2024
A new Python REPL #111201
Closed
7 tasks done
@ambv ambv added skip news topic-repl Related to the interactive shell labels May 21, 2024
ambv added 2 commits May 22, 2024 04:44
@ambv
auto-indentation in _pyrepl
a379bdc
@ambv
blacklit paradise
ac4a8a5
@ambv
ambv force-pushed the pyrepl-auto-indent branch from 5090e05 to ac4a8a5 Compare May 22, 2024 02:51
@wiggin15

wiggin15 commented May 22, 2024

Copy link
Copy Markdown
Contributor Author

Hi @ambv , I see the commit authorship changed for the first commit 😬

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv
ambv merged commit cd516cd into python:main May 22, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label May 22, 2024
@ambv

ambv commented May 22, 2024

Copy link
Copy Markdown
Contributor

We squash all commits so this isn't important. As you can see in cd516cd the merged commit is attributed to you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv

ambv commented May 22, 2024

Copy link
Copy Markdown
Contributor

Thanks for your contribution, Arnon!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lysnikolaou lysnikolaou added the needs backport to 3.13 only security fixes label May 22, 2024
@miss-islington-app

miss-islington-app Bot commented May 22, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented May 22, 2024

Copy link
Copy Markdown

Sorry, @wiggin15 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 cd516cd1f5e94dba887353f421513fd172efadf3 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned ambv May 22, 2024
lysnikolaou pushed a commit to lysnikolaou/cpython that referenced this pull request May 22, 2024
@wiggin15 @ambv @lysnikolaou
[3.13] pythongh-111201: auto-indentation in _pyrepl (pythonGH-119348)
b13a368
(cherry picked from commit cd516cd)

Co-authored-by: Arnon Yaari <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
lysnikolaou pushed a commit to lysnikolaou/cpython that referenced this pull request May 22, 2024
@wiggin15 @ambv @lysnikolaou
[3.13] pythongh-111201: auto-indentation in _pyrepl (pythonGH-119348)
0eb0ff9
(cherry picked from commit cd516cd)

Co-authored-by: Arnon Yaari <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
@bedevere-app

bedevere-app Bot commented May 22, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 22, 2024
ambv added a commit that referenced this pull request May 22, 2024
@lysnikolaou @wiggin15 @ambv
[3.13] gh-111201: auto-indentation in _pyrepl (GH-119348) (#119427)
9435124
(cherry picked from commit cd516cd)

Co-authored-by: Arnon Yaari <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
@wiggin15
wiggin15 deleted the pyrepl-auto-indent branch May 27, 2024 14:06
@JelleZijlstra JelleZijlstra mentioned this pull request May 28, 2024
backport a9a74da 3.13 #119642
Closed
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@wiggin15 @ambv @estyxx
pythongh-111201: auto-indentation in _pyrepl (python#119348)
1f15c9f
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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ambv ambv

Labels

skip news topic-repl Related to the interactive shell

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@wiggin15 @ambv @lysnikolaou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.