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-109151: Enable readline in the sqlite3 CLI by serhiy-storchaka · Pull Request #109152 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 8, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: Enable readline in the sqlite3 CLI #109151

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
pythongh-109151: Enable readline in the sqlite3 CLI
0522298
@serhiy-storchaka
serhiy-storchaka requested review from berkerpeksag and erlend-aasland as code owners September 8, 2023 16:45
@bedevere-bot bedevere-bot added the awaiting core review label Sep 8, 2023
@bedevere-bot bedevere-bot mentioned this pull request Sep 8, 2023
Enable readline in the sqlite3 CLI #109151
Closed
@erlend-aasland

erlend-aasland commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

Thanks, Serhiy, this is very nice! Ideally, we should have this for 3.12. What do you think? I'm not sure it can be considered a defect/bug.

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka

serhiy-storchaka commented Sep 8, 2023

Copy link
Copy Markdown
Member Author

It is clearly not a bug fix. But it is so much must have feature, that it should go in 3.12.1. Let wait on the release of 3.12.0.

@Yhg1s

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland approved these changes Sep 9, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Sep 9, 2023
@vstinner

vstinner commented Sep 15, 2023

Copy link
Copy Markdown
Member

This is a new feature, IMO it's too late for Python 3.12. I dislike when Python behavior changes in 3.x.y bug releases, sorry.

If you want readline in Python 3.12, you can write your CLI code:

#import readline
import sqlite3.__main__
import sys
sqlite3.__main__.main(sys.argv[1:])
All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner approved these changes Sep 15, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, just some remarks on the NEWS entry.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Misc/NEWS.d/next/Library/2023-09-08-19-44-01.gh-issue-109151.GkzkQu.rst Resolved

Uh oh!

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

@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting merge labels Sep 15, 2023
@serhiy-storchaka @vstinner
Update Misc/NEWS.d/next/Library/2023-09-08-19-44-01.gh-issue-109151.G…
6fd1f97
…kzkQu.rst

Co-authored-by: Victor Stinner <[email protected]>
@vstinner vstinner mentioned this pull request Sep 15, 2023
Add a page to the documentation listing stdlib modules with a command-line interface (CLI) #109435
Closed
@vstinner

vstinner commented Sep 15, 2023

Copy link
Copy Markdown
Member

I forgot or didn't know that sqlite3 has a command-line interface. I created issue #109435 to document all stdlib modules which provides a command-line interface (CLI).

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka

serhiy-storchaka commented Sep 15, 2023

Copy link
Copy Markdown
Member Author

The sqlite3 CLI is new in 3.12. This is why I think it is a good idea to backport this change.

I always use utilites that read from the stdin with an external wrapper (rlwrap), but the sqlite3 CLI differs from the dis CLI or others which also can read from the stdin, -- it is intended as a REPL.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Sep 15, 2023

Copy link
Copy Markdown
Member

The sqlite3 CLI is new in 3.12. This is why I think it is a good idea to backport this change.

Aha, you can negociate with @Yhg1s. First land it in the main branch :-)

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
Merge branch 'main' into sqlite3-readline
20a26bf
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.12 only security fixes label Oct 4, 2023
erlend-aasland
erlend-aasland approved these changes Oct 4, 2023
View reviewed changes
vstinner
vstinner approved these changes Oct 4, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
serhiy-storchaka merged commit 254e30c into python:main Oct 4, 2023
@miss-islington

miss-islington commented Oct 4, 2023

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

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 awaiting core review label Oct 4, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 4, 2023
@serhiy-storchaka @miss-islington
pythongh-109151: Enable readline in the sqlite3 CLI (pythonGH-109152)
507c7d5
(cherry picked from commit 254e30c)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app

bedevere-app Bot commented Oct 4, 2023

Copy link
Copy Markdown

GH-110352 is a backport of this pull request to the 3.12 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.12 only security fixes label Oct 4, 2023
@erlend-aasland

erlend-aasland commented Oct 4, 2023

Copy link
Copy Markdown
Contributor

Thanks, Serhiy!

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner pushed a commit that referenced this pull request Oct 4, 2023
@miss-islington @serhiy-storchaka
[3.12] gh-109151: Enable readline in the sqlite3 CLI (GH-109152) (#11…
bc1fe35
…0352)

gh-109151: Enable readline in the sqlite3 CLI (GH-109152)
(cherry picked from commit 254e30c)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Oct 9, 2023
@serhiy-storchaka
Revert "[3.12] pythongh-109151: Enable readline in the sqlite3 CLI (p…
641ef6b
…ythonGH-109152) (python#110352)"

This reverts commit bc1fe35.
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Oct 9, 2023
@serhiy-storchaka
Revert "[3.12] pythongh-109151: Enable readline in the sqlite3 CLI (p…
a70ae71
…ythonGH-109152) (python#110352)"

This reverts commit bc1fe35.
Yhg1s pushed a commit that referenced this pull request Oct 9, 2023
@serhiy-storchaka
[3.12] gh-109151: Revert readline support in the sqlite3 CLI (#110542)
22474a1
Revert "[3.12] gh-109151: Enable readline in the sqlite3 CLI (GH-109152) (#110352)"

This reverts commit bc1fe35.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@serhiy-storchaka @Glyphack
pythongh-109151: Enable readline in the sqlite3 CLI (pythonGH-109152)
141eb3a
@serhiy-storchaka
serhiy-storchaka deleted the sqlite3-readline branch July 1, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@erlend-aasland erlend-aasland erlend-aasland approved these changes
@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

5 participants

@serhiy-storchaka @erlend-aasland @vstinner @miss-islington @bedevere-bot
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.