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 — `test_sqlite3.test_dbapi`: Extended error codes aren't actually tested · Issue #93115 · python/cpython

test_sqlite3.test_dbapi: Extended error codes aren't actually tested #93115

New issue
Copy link
New issue
Copy link
Closed
#93116
Closed
test_sqlite3.test_dbapi: Extended error codes aren't actually tested#93115
#93116
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@The-Compiler
The-Compiler
opened on May 23, 2022
Issue body actions

Bug report

In 456e27a / GH-28076, @erlend-aasland added extended error codes to test_module_constants - however, they use sqlite.version_info, documented as (emphasis mine):

The version number of this module, as a tuple of integers. This is not the version of the SQLite library.

Which has been set to "2.6.0" for the past 12 years or so:

cpython/Modules/_sqlite/module.h

Line 29 in a458be3

#define PYSQLITE_VERSION "2.6.0"

Causing that code to never be run at all. sqlite.sqlite_version_info should probably be used instead.

Additionally, the last statement does:

cpython/Lib/test/test_sqlite3/test_dbapi.py

Line 300 in a458be3

const.append("SQLITE_IOERR_CORRUPTFS")

instead of consts.append, which would cause a NameError if the conditions above were correct.

Preparing a PR to fix this.

(Found by running flake8 over Lib/ out of curiosity, see #93010 (comment))

Your environment

  • CPython versions tested on: The affected code was added in v3.11.0a2.
  • Operating system and architecture: Archlinux x86_64
Reacted by Erlend E. Aasland

Activity

  1. The-Compiler
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 23, 2022
  2. AlexWaygood
    added
    topic-sqlite3
    on May 23, 2022
  3. erlend-aasland commented on May 23, 2022

    @erlend-aasland
    erlend-aasland
    on May 23, 2022
    Contributor
    More actions

    Thanks!

  4. erlend-aasland
    added this to sqlite3 issueson May 23, 2022
  5. erlend-aasland
    moved this to TODO: Bugs in sqlite3 issueson May 23, 2022
  6. erlend-aasland
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on May 23, 2022
  7. erlend-aasland
    closed this as completedin #93116on May 23, 2022
  8. Repository owner moved this from TODO: Bugs to Done in sqlite3 issueson May 23, 2022
  9. erlend-aasland
    added a commit that references this issue on May 23, 2022

    GH-93115: Fix version check in sqlite3 module constants test (#93116)

    d5f0dd1
  10. miss-islington
    added a commit that references this issue on May 23, 2022

    pythonGH-93115: Fix version check in sqlite3 module constants test (p…

    e5f7ea2
  11. erlend-aasland commented on May 23, 2022

    @erlend-aasland
    erlend-aasland
    on May 23, 2022
    Contributor
    More actions

    Resolved by:

    • main: GH-93115: Fix error code tests in test_sqlite3.test_dbapi #93116
    • 3.11: [3.11] GH-93115: Fix version check in sqlite3 module constants test (GH-93116) #93128
  12. miss-islington
    added a commit that references this issue on May 23, 2022

    GH-93115: Fix version check in sqlite3 module constants test (GH-93116)

    acc998a
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

    testsTests in the Lib/test dirTests in the Lib/test dirtopic-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.