Skip to content

gh-77617: Add interactive shell for sqlite3 #95026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Aug 1, 2022

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Jul 19, 2022

Disclaimer: this is based off of an old proof-of-concept branch I had lying around. Take it as it is :)

Resolves gh-77617

TODO:

  • docs
  • tests?

@erlend-aasland erlend-aasland marked this pull request as ready for review July 20, 2022 19:28
@erlend-aasland
Copy link
Contributor Author

@rhettinger, would you mind reviewing this?

@erlend-aasland erlend-aasland marked this pull request as draft July 29, 2022 12:09
@erlend-aasland
Copy link
Contributor Author

Putting this PR on hold until the --enable-loadable-sqlite-extensions mess has been fixed in main.

@erlend-aasland erlend-aasland marked this pull request as ready for review July 29, 2022 19:37
Erlend Egeberg Aasland and others added 4 commits July 29, 2022 23:22
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@erlend-aasland
Copy link
Contributor Author

The python3 -m sqlite3 :memory: "pragma compile_options" trick will be very helpful for triaging and debugging issues.

Copy link
Contributor

@kumaraditya303 kumaraditya303 left a comment

Choose a reason for hiding this comment

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

LGTM

@erlend-aasland
Copy link
Contributor Author

Added tests; plus some adjustments:

  • return non-zero if SQL passed from the command line fails
  • print exceptions to stderr (not sure if this is a good idea; I have no strong opinion here)

PTAL, @serhiy-storchaka and @kumaraditya303

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

👍

@erlend-aasland
Copy link
Contributor Author

Thank you for the helpful reviews, Dong-hee, Kumar, and Serhiy. Highly appreciated!

@erlend-aasland
Copy link
Contributor Author

FTR, I'm going to land this later today.

@erlend-aasland erlend-aasland merged commit bc7c7cd into python:main Aug 1, 2022
@erlend-aasland erlend-aasland deleted the sqlite-shell branch August 1, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an interactive shell for Sqlite3
5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy