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 — Convert Python exceptions to appropriate SQLite error codes · Issue #89002 · python/cpython

Convert Python exceptions to appropriate SQLite error codes #89002

New issue
Copy link
New issue
Copy link
Closed
Closed
Convert Python exceptions to appropriate SQLite error codes#89002
Copy link
Labels
3.11only security fixesonly security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3type-featureA feature request or enhancementA feature request or enhancement

Description

@serhiy-storchaka
serhiy-storchaka
opened on Aug 5, 2021
Issue body actions
BPO 44839
Nosy @berkerpeksag, @serhiy-storchaka, @erlend-aasland
PRs
  • bpo-44839: Raise more specific errors in sqlite3 #27613
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-08-06.18:29:14.143>
    created_at = <Date 2021-08-05.11:54:52.391>
    labels = ['extension-modules', 'type-feature', '3.11']
    title = 'Convert Python exceptions to appropriate SQLite error codes'
    updated_at = <Date 2021-08-06.18:29:14.143>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-08-06.18:29:14.143>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-08-06.18:29:14.143>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2021-08-05.11:54:52.391>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44839
    keywords = ['patch']
    message_count = 3.0
    messages = ['398997', '398999', '399121']
    nosy_count = 3.0
    nosy_names = ['berker.peksag', 'serhiy.storchaka', 'erlendaasland']
    pr_nums = ['27613']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue44839'
    versions = ['Python 3.11']

    Activity

    1. serhiy-storchaka commented on Aug 5, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Aug 5, 2021
      MemberAuthor
      More actions

      Currently, any exception raised in user-defined function set the general SQLITE_ERROR error which then produce sqlite3.OperationalError.

      For example, if the user function returns a string or bytes object larger than INT_MAX you get OperationalError, but if it is less than INT_MAX and larger than the SQLite limit (configurable, 1000000000 by default) you get DataError. If a memory error occurred in Python code you get OperationalError, but if it is occurred in the SQLite code you get MemoryError.

      The proposed PR sets corresponding SQLite error codes for MemoryError and OverflowError in user-defined functions. They will produce MemoryError and DataError in Python.

    2. serhiy-storchaka
      added
      3.11only security fixesonly security fixes
      extension-modulesC modules in the Modules dirC modules in the Modules dir
      type-featureA feature request or enhancementA feature request or enhancement
      on Aug 5, 2021
    3. serhiy-storchaka commented on Aug 5, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Aug 5, 2021
      MemberAuthor
      More actions

      It was grown from bigmem tests for bpo-44822.

    4. serhiy-storchaka commented on Aug 6, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Aug 6, 2021
      MemberAuthor
      More actions

      New changeset 7d747f2 by Serhiy Storchaka in branch 'main':
      bpo-44839: Raise more specific errors in sqlite3 (GH-27613)
      7d747f2

    5. serhiy-storchaka
      closed this as completedon Aug 6, 2021
    6. serhiy-storchaka
      closed this as completedon Aug 6, 2021
    7. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    8. erlend-aasland
      added
      topic-sqlite3
      on May 16, 2022
    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

      3.11only security fixesonly security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3type-featureA feature request or enhancementA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402520 — 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.