Skip to content
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

bpo-44859: Improve error handling in sqlite3 and change some errors #27654

Merged
merged 2 commits into from
Aug 8, 2021

Commits on Aug 7, 2021

  1. bpo-44859: Improve error handling in sqlite3 and change some errors

    * 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.
    serhiy-storchaka committed Aug 7, 2021
    Configuration menu
    Copy the full SHA
    75d79c2 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
    serhiy-storchaka and Erlend Egeberg Aasland authored Aug 7, 2021
    Configuration menu
    Copy the full SHA
    664b14e View commit details
    Browse the repository at this point in the history