**Bug report** In 456e27ac0ac6bc1cfd6da0191bd7802d8667457b / GH-28076, @erlend-aasland added extended error codes to `test_module_constants` - however, they use `sqlite.version_info`, [documented as](https://docs.python.org/3/library/sqlite3.html#sqlite3.version_info) (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: https://github.com/python/cpython/blob/a458be3263b4cb92f3fde726461e8ef44b2a4a9d/Modules/_sqlite/module.h#L29 Causing that code to never be run at all. `sqlite.sqlite_version_info` should probably be used instead. Additionally, the last statement does: https://github.com/python/cpython/blob/a458be3263b4cb92f3fde726461e8ef44b2a4a9d/Lib/test/test_sqlite3/test_dbapi.py#L300 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 https://github.com/python/cpython/issues/93010#issuecomment-1133402591) **Your environment** - CPython versions tested on: The affected code was added in v3.11.0a2. - Operating system and architecture: Archlinux x86_64
Activity
erlend-aasland commentedon May 23, 2022
Thanks!
GH-93115: Fix version check in sqlite3 module constants test (#93116)
pythonGH-93115: Fix version check in sqlite3 module constants test (p…
erlend-aasland commentedon May 23, 2022
Resolved by:
GH-93115: Fix version check in sqlite3 module constants test (GH-93116)