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 — bpo-16379: Expose sqlite error code by palaviv · Pull Request #1108 · python/cpython

Conversation

@palaviv

@palaviv palaviv commented Apr 13, 2017 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This PR adds the sqlite error code and name to the exceptions raised by the sqlite3 module. Once this is merged my hope is to expose the sqlite extended error code as discussed in bpo-24139

https://bugs.python.org/issue16379

Sorry, something went wrong.

Uh oh!

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

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Apr 13, 2017
@Mariatta Mariatta added needs rebase and removed needs rebase labels Oct 9, 2017
@brettcannon brettcannon added the awaiting review label Feb 21, 2018
@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Dec 8, 2018
auvipy
auvipy suggested changes Apr 28, 2019
View reviewed changes

@auvipy auvipy left a comment

Copy link
Copy Markdown

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.

plz rebase!

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Apr 28, 2019
@matrixise matrixise changed the title bpo-16379: Expose sqlite error code bpo-16379: Expose sqlite error code May 7, 2019
@matrixise

matrixise commented May 7, 2019

Copy link
Copy Markdown
Member

Hi @palaviv

Would you be interested to upgrade your PR to the last master?

Thank you

All reactions

Sorry, something went wrong.

Uh oh!

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

@matrixise
matrixise requested a review from berkerpeksag May 7, 2019 20:48
@palaviv
palaviv force-pushed the bpo-16379-expose-sqlite-error-code branch from 365ad2a to c236045 Compare May 8, 2019 12:22
@palaviv

palaviv commented May 8, 2019

Copy link
Copy Markdown
Contributor Author

Sure @matrixise. Do you think there is a chance for this to be merged?

All reactions

Sorry, something went wrong.

Uh oh!

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

palaviv added 5 commits May 9, 2019 12:54
@palaviv
sqlite3 module expose sqlite error code and name in exceptions
83ab267
@palaviv
Fix syntax error
eeb10f4
@palaviv
Add NEWS entry
42636f9
@palaviv
Update version
f224223
@palaviv
Fix whitespace
31467e3
@palaviv
palaviv force-pushed the bpo-16379-expose-sqlite-error-code branch from b9dc556 to 31467e3 Compare May 9, 2019 09:55
@dimaqq

dimaqq commented Jun 7, 2019

Copy link
Copy Markdown
Contributor

If I remember https://bugs.python.org/issue24139 correctly, the issue was rather about exposing the extended error codes http://www.sqlite.org/c3ref/c_abort_rollback.html

All reactions

Sorry, something went wrong.

Uh oh!

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

@palaviv

palaviv commented Jun 11, 2019

Copy link
Copy Markdown
Contributor Author

@dimaqq you are correct. This is a patch for https://bugs.python.org/issue16379. There is a different patch that depends on this change to solve https://bugs.python.org/issue24139.

All reactions

Sorry, something went wrong.

Uh oh!

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

@nelsonjchen nelsonjchen mentioned this pull request Jan 12, 2020
sqlite3.OperationalError: disk I/O error - coverage/sqldata.py, line 1024 coveragepy/coveragepy#915
Closed
@dpusceddu

dpusceddu commented Apr 22, 2020

Copy link
Copy Markdown

I'd really really like to have this feature...

All reactions

Sorry, something went wrong.

Uh oh!

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

dimaqq
dimaqq reviewed Apr 23, 2020
View reviewed changes
Comment thread Modules/_sqlite/module.c
{"PARSE_COLNAMES", PARSE_COLNAMES},

{"SQLITE_OK", SQLITE_OK},
/* enumerated return values for sqlite3_set_authorizer() callback */

@dimaqq dimaqq Apr 23, 2020

Copy link
Copy Markdown
Contributor

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.

It looks like SQLITE_OK is used in the wild (https://github.com/search?l=Python&p=4&q=SQLITE_OK&type=Code) thus it cannot be removed.

Sorry, something went wrong.

Uh oh!

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

All reactions

@erlend-aasland erlend-aasland Aug 6, 2021

Copy link
Copy Markdown
Contributor

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.

SQLITE_OK is definitely in use. For example, it is used one of the valid return values in authoriser callbacks.

Sorry, something went wrong.

Uh oh!

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

All reactions
danielshahaf
danielshahaf reviewed May 24, 2020
View reviewed changes
Comment thread Modules/_sqlite/module.c
#ifdef SQLITE_NOTADB
{"SQLITE_NOTADB", SQLITE_NOTADB},
#endif
{"SQLITE_DONE", SQLITE_DONE},

@danielshahaf danielshahaf May 24, 2020

Copy link
Copy Markdown
Contributor

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.

Hi @palaviv, thanks for picking this up. Should SQLITE_NOTICE and SQLITE_WARNING be added to this list?

Sorry, something went wrong.

Uh oh!

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

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

erlend-aasland commented Apr 8, 2021

Copy link
Copy Markdown
Contributor

@palaviv: Can you rebase onto master and update your code to PEP 7 standards? Also, the #ifdefs are not needed as SQLite 3.7.15 is now a hard requirement.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

@palaviv, are you planning on landing this PR? If not, would you mind if I reopened a PR with your changes cherry-picked onto it?

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland mentioned this pull request Aug 16, 2021
bpo-16379: expose SQLite error codes and error names in sqlite3 #27786
Merged
@erlend-aasland

erlend-aasland commented Aug 30, 2021

Copy link
Copy Markdown
Contributor

Closing this, as #27786 (based off of this PR) has now been merged. Thank you for your work, @palaviv!

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland closed this Aug 30, 2021
@coderabbitai coderabbitai Bot mentioned this pull request Aug 25, 2026
M3: the control plane — one read model, a real browser, and a wheel that actually contains it RitvikDayal/whetstone#48
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland left review comments
@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag
+3 more reviewers
@dimaqq dimaqq dimaqq left review comments
@danielshahaf danielshahaf danielshahaf left review comments
@auvipy auvipy auvipy requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review type-feature A feature request or enhancement

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.

12 participants

@palaviv @matrixise @dimaqq @dpusceddu @erlend-aasland @danielshahaf @auvipy @brettcannon @serhiy-storchaka @Mariatta @the-knights-who-say-ni @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.