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 — sqlite3 CLI does not recognize dot commands with trailing spaces · Issue #133439 · python/cpython

sqlite3 CLI does not recognize dot commands with trailing spaces #133439

New issue
Copy link
New issue
Copy link
Closed
Closed
sqlite3 CLI does not recognize dot commands with trailing spaces#133439
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@tanloong
tanloong
opened on May 5, 2025
Issue body actions

Bug report

Bug description:

Dot commands with trailing spaces are mistaken for multi-line sqlite3 statements.

$ python -m sqlite3↵
sqlite> .version↵
3.49.1
sqlite> .version␣↵
    ... ↵
    ... ↵

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs

  • gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line sqlite statements in the sqlite3 command-line interface #133440
  • [3.14] gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line sqlite statements in the sqlite3 command-line interface (GH-133440) #133738
  • [3.13] gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line sqlite statements in the sqlite3 command-line interface (GH-133440) #133765
  • gh-133439: Fix the error message in the sqlite3 CLI #133807
  • [3.14] gh-133439: Fix the error message in the sqlite3 CLI (GH-133807) #135708

Activity

  1. tanloong
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 5, 2025
  2. tanloong
    added a commit that references this issue on May 5, 2025

    pythongh-133439: fix dot commands with trailing spaces are not recogn…

    80af071
  3. aisk
    added this to sqlite3 issueson May 5, 2025
  4. picnixz
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    topic-sqlite3
    on May 5, 2025
  5. picnixz commented on May 5, 2025

    @picnixz
    picnixz
    on May 5, 2025
    Member
    More actions

    Does the sqlite3 cli (not python one) ignore trailing whitespaces?

  6. tanloong commented on May 5, 2025

    @tanloong
    tanloong
    on May 5, 2025
    ContributorAuthor
    More actions

    Yes. The sqlite3 cli works normally on sql statements with trailing or leading whitespaces.Image

  7. tanloong commented on May 6, 2025

    @tanloong
    tanloong
    on May 6, 2025
    ContributorAuthor
    More actions

    Trailing whitespaces for dot commands are also ignored, although leading ones are not.

    $ sqlite3↵
    sqlite> .quit␣↵
    $ 
    
    $ sqlite3↵
    sqlite> ␣.quit↵
        ... ↵
        ... ↵
    
  8. tanloong
    added a commit that references this issue on May 9, 2025

    pythongh-133439: fix dot commands with trailing spaces are not recogn…

    080d0c8
  9. serhiy-storchaka
    added a commit that references this issue on May 9, 2025

    gh-133439: Fix dot commands with trailing spaces are mistaken for mul…

    ebd4881
  10. miss-islington
    added a commit that references this issue on May 9, 2025

    pythongh-133439: Fix dot commands with trailing spaces are mistaken f…

    42599d5
  11. tanloong
    closed this as completedon May 9, 2025
  12. github-project-automation
    moved this to Done in sqlite3 issueson May 9, 2025
  13. serhiy-storchaka
    added a commit that references this issue on May 9, 2025

    [3.14] gh-133439: Fix dot commands with trailing spaces are mistaken …

    beb8a50
  14. tanloong
    added a commit that references this issue on May 9, 2025

    pythongh-133439: Fix dot commands with trailing spaces are mistaken f…

    771f617
  15. erlend-aasland
    reopened this on Jun 13, 2025
  16. serhiy-storchaka
    added a commit that references this issue on Jun 13, 2025

    [3.13] gh-133439: Fix dot commands with trailing spaces are mistaken …

    22cf289
  17. serhiy-storchaka commented on Jun 13, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Jun 13, 2025
    Member
    More actions

    There was a missed space and redundant newline in the error message. #133807 fixes this.

  18. serhiy-storchaka
    closed this as completedon Jun 13, 2025
  19. tanloong commented on Jun 14, 2025

    @tanloong
    tanloong
    on Jun 14, 2025
    ContributorAuthor
    More actions

    No, the missing space is not introduced here but from this line of #133461. I left a comment there a month ago but the comment was labeled as "Pending", I am not sure whether it was successfully sent and Stan received it or not. This PR uses self.write() in which the newline is needed, otherwise the output is mixed with the next shell prompt on the same line.

    Image

  20. encukou commented on Jun 16, 2025

    @encukou
    encukou
    on Jun 16, 2025
    Member
    More actions

    @tanloong, the “pending” label means that the comment won't be sent until you “finish your review”:

    Image

    Reacted by Tan Long
  21. serhiy-storchaka commented on Jun 16, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Jun 16, 2025
    Member
    More actions

    Ah, sorry. I thought you were the last one to touch this code.

    It is a common error to add a comment but forget to publish it.

    Reacted by Tan Long
  22. encukou
    added a commit that references this issue on Jun 19, 2025

    gh-133439: Fix the error message in the sqlite3 CLI (GH-133807)

    ecd83e0
  23. StanFromIreland
    added a commit that references this issue on Jun 19, 2025

    [3.14] pythongh-133439: Fix the error message in the sqlite3 CLI (pyt…

    33531dd
  24. lkollar
    added a commit that references this issue on Jun 19, 2025

    pythongh-133439: Fix the error message in the sqlite3 CLI (pythonGH-1…

    f7dd010
  25. Pranjal095
    added 2 commits that reference this issue on Jul 12, 2025

    pythongh-133439: Fix dot commands with trailing spaces are mistaken f…

    9fde33a

    pythongh-133439: Fix the error message in the sqlite3 CLI (pythonGH-1…

    7179095
  26. taegyunkim
    added 2 commits that reference this issue on Aug 4, 2025

    pythongh-133439: Fix dot commands with trailing spaces are mistaken f…

    b75cacf

    pythongh-133439: Fix the error message in the sqlite3 CLI (pythonGH-1…

    31b9dc4
  27. Agent-Hellboy
    added a commit that references this issue on Aug 19, 2025

    pythongh-133439: Fix the error message in the sqlite3 CLI (pythonGH-1…

    1458384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • sqlite3 issues
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.