René's URL Explorer Experiment


Title: bpo-44859: Improve error handling in sqlite3 and change some errors by serhiy-storchaka · Pull Request #27654 · python/cpython · GitHub

Open Graph Title: bpo-44859: Improve error handling in sqlite3 and change some errors by serhiy-storchaka · Pull Request #27654 · python/cpython

X Title: bpo-44859: Improve error handling in sqlite3 and change some errors by serhiy-storchaka · Pull Request #27654 · python/cpython

Description: MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.call() and Cursor.execute(). UnicodEncodeError is now raised instead of sqlite3.Warning when the statement contains surrogate characters in Connection.__call__() and Cursor.execute(). TypeError is now raised instead of ValueError for non-string script argument in Cursor.executescript(). ValueError is now raised for script containing the null character instead of truncating it in Cursor.executescript(). Correctly handle exceptions raised when getting boolean value of the result of the progress handler. Add may tests covering different exceptional cases. https://bugs.python.org/issue44859

Open Graph Description: MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.call() and Cursor.execute(). UnicodEncodeError is now raised instead o...

X Description: MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.call() and Cursor.execute(). UnicodEncodeError is now raised instead o...

Opengraph URL: https://github.com/python/cpython/pull/27654

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:721a3f06-071e-8532-8e6c-944fc89744f3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9290:2DA0A8:5935B7:787D7C:6969B34D
html-safe-nonce248067950bbcaa63ef73ee6306b8784691d7a76631fcdb096e93795aad4c0350
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjkwOjJEQTBBODo1OTM1Qjc6Nzg3RDdDOjY5NjlCMzREIiwidmlzaXRvcl9pZCI6Ijg1MDg0ODI3NTA5MDgwNTIzMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac689c5ed24d6fc6fabba08fc7f423b2e499d7d95d194e9f21849d14a0cb64b64c
hovercard-subject-tagpull_request:705899950
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/27654/files
twitter:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
og:image:altMemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.call() and Cursor.execute(). UnicodEncodeError is now raised instead o...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb23b8fcc855cd29bb04d6c94aafa62d336bf44eefa8229444eecc968cad03aee
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0672399d88424758731ec07fe24509e23bb17fb5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/27654/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F27654%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F27654%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/27654/files
Reloadhttps://github.com/python/cpython/pull/27654/files
Reloadhttps://github.com/python/cpython/pull/27654/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/27654/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/27654/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:sqlite-errorshttps://github.com/serhiy-storchaka/cpython/tree/sqlite-errors
Conversation 10 https://github.com/python/cpython/pull/27654
Commits 2 https://github.com/python/cpython/pull/27654/commits
Checks 0 https://github.com/python/cpython/pull/27654/checks
Files changed https://github.com/python/cpython/pull/27654/files
Please reload this pagehttps://github.com/python/cpython/pull/27654/files
bpo-44859: Improve error handling in sqlite3 and change some errors https://github.com/python/cpython/pull/27654/files#top
Show all changes 2 commits https://github.com/python/cpython/pull/27654/files
75d79c2 bpo-44859: Improve error handling in sqlite3 and change some errors serhiy-storchaka Aug 7, 2021 https://github.com/python/cpython/pull/27654/commits/75d79c29d866f567a667b2d7b4695dc0bda18bec
664b14e Apply suggestions from code review serhiy-storchaka Aug 7, 2021 https://github.com/python/cpython/pull/27654/commits/664b14e6d738b32c2f64585576d3373d1d82e56e
Clear filters https://github.com/python/cpython/pull/27654/files
Please reload this pagehttps://github.com/python/cpython/pull/27654/files
Please reload this pagehttps://github.com/python/cpython/pull/27654/files
dbapi.py https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
hooks.py https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
regression.py https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
types.py https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
userfunctions.py https://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
2021-08-07-17-28-56.bpo-44859.CCopjk.rst https://github.com/python/cpython/pull/27654/files#diff-cbd82174d3395969ab5b85b1733cab0f4248a86ea3c7791d1ec54f875bbedebf
cursor.c.h https://github.com/python/cpython/pull/27654/files#diff-f1180597c9b61f04f16c700d27bb11e5ad068181ff5b2d4646dcbc56ec1b13ee
connection.c https://github.com/python/cpython/pull/27654/files#diff-f405d0da477c184cd4afb94ce52dfd7fcd4980500a3a5ffe753d0e8cd57638a2
cursor.c https://github.com/python/cpython/pull/27654/files#diff-7209d2a9e4167e7aefe9b52e03d1d291f2e078cbfac7652c747d91f90fbacb82
statement.c https://github.com/python/cpython/pull/27654/files#diff-517a9c73ccad12dd55f0beb930416fee87cade1b2abbb84a73ed8e39cc696c39
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L578
Lib/sqlite3/test/dbapi.pyhttps://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Lib/sqlite3/test/dbapi.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
https://github.com/python/cpython/pull/27654/files#diff-a4b73f9e48ee8e071938f6f86b8bb3f1491d71b6ab0a57f7cc447b020f6164d5
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L578
Lib/sqlite3/test/hooks.pyhttps://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Lib/sqlite3/test/hooks.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
https://github.com/python/cpython/pull/27654/files#diff-a4e97eae4408a21b9d6fa33a74c986e112ebd11488ef19b2d408d19d1e5bdc9c
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L578
Lib/sqlite3/test/regression.pyhttps://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Lib/sqlite3/test/regression.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
https://github.com/python/cpython/pull/27654/files#diff-da59637c2c6f52a3296719809ff80fb330c93b1ae1245b2eee36256ba74aa128
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L578
Lib/sqlite3/test/types.pyhttps://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Lib/sqlite3/test/types.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
https://github.com/python/cpython/pull/27654/files#diff-629a4c16ac041a42cd55b0582a775139839f658353a647a96ee2fdd1c80e0d58
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L578
Lib/sqlite3/test/userfunctions.pyhttps://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Lib/sqlite3/test/userfunctions.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
https://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
https://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
https://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
https://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
https://github.com/python/cpython/pull/27654/files#diff-b705419ee753421eeee94ae62d2d3bea0628a27ea6e2536d7f820b9bc74f3748
Misc/NEWS.d/next/Library/2021-08-07-17-28-56.bpo-44859.CCopjk.rsthttps://github.com/python/cpython/pull/27654/files#diff-cbd82174d3395969ab5b85b1733cab0f4248a86ea3c7791d1ec54f875bbedebf
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Misc/NEWS.d/next/Library/2021-08-07-17-28-56.bpo-44859.CCopjk.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
Modules/_sqlite/clinic/cursor.c.hhttps://github.com/python/cpython/pull/27654/files#diff-f1180597c9b61f04f16c700d27bb11e5ad068181ff5b2d4646dcbc56ec1b13ee
View file https://github.com/serhiy-storchaka/cpython/blob/664b14e6d738b32c2f64585576d3373d1d82e56e/Modules/_sqlite/clinic/cursor.c.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/27654/{{ revealButtonHref }}
https://github.com/python/cpython/pull/27654/files#diff-f1180597c9b61f04f16c700d27bb11e5ad068181ff5b2d4646dcbc56ec1b13ee
https://github.com/python/cpython/pull/27654/files#diff-f1180597c9b61f04f16c700d27bb11e5ad068181ff5b2d4646dcbc56ec1b13ee
https://github.com/python/cpython/pull/27654/files#diff-f1180597c9b61f04f16c700d27bb11e5ad068181ff5b2d4646dcbc56ec1b13ee
Please reload this pagehttps://github.com/python/cpython/pull/27654/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.