Skip to content

CI Update: Enable python 3.14 beta, 3.13 is no longer dev#9

Merged
gordonmessmer merged 1 commit intogordonmessmer:mainfrom
hannob:upci314
Jan 27, 2026
Merged

CI Update: Enable python 3.14 beta, 3.13 is no longer dev#9
gordonmessmer merged 1 commit intogordonmessmer:mainfrom
hannob:upci314

Conversation

@hannob
Copy link
Copy Markdown
Collaborator

@hannob hannob commented Dec 11, 2024

This updates the CI to test with python 3.14 beta/rc versions, and moves 3.13-dev to 3.13, as this is now a stable version.

@hannob
Copy link
Copy Markdown
Collaborator Author

hannob commented Jan 27, 2026

I just updated the PR, as in the meantime, Github's default for 3.x is already on 3.14, so no need to have that separately, and I also bumped the github actions versions. However, it appears the tests now fail with the 3.x/3.14 version.

@gordonmessmer
Copy link
Copy Markdown
Owner

Test failures on python3.14 can be reproduced with a simple test case:

#!/usr/bin/python3

import dbm

def makedbm():
    newdbm = dbm.open('config.dat', 'c')
    newdbm["key"] = "value"

def opendbm():
    config_dbm = dbm.open('config.dat', 'r')
    return config_dbm

makedbm()
mydbm = opendbm()
if("key" in mydbm):
    print("found")

Output from the script is similar to the test logs:

# python3 test.py 
Traceback (most recent call last):
  File "/usr/lib64/python3.14/dbm/sqlite3.py", line 83, in _execute
    return closing(self._cx.execute(*args, **kwargs))
                   ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such table: Dict

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gordon/python-dbm-testcase/test.py", line 15, in <module>
    if("key" in mydbm):
       ^^^^^^^^^^^^^^
  File "<frozen _collections_abc>", line 801, in __contains__
  File "/usr/lib64/python3.14/dbm/sqlite3.py", line 93, in __getitem__
    with self._execute(LOOKUP_KEY, (key,)) as cu:
         ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/dbm/sqlite3.py", line 85, in _execute
    raise error(str(exc))
dbm.sqlite3.error: no such table: Dict

This only fails with sqlite3 dbm files that are created by 3.14. If I run the same test case with 3.13 in that directory, it actually repairs the config.dat file, which allows the test to run normally under 3.14.

@gordonmessmer
Copy link
Copy Markdown
Owner

gordonmessmer commented Jan 27, 2026

However, this test case does not fail:

#!/usr/bin/python3

import dbm

with dbm.open('config.dat', 'c') as newdbm:
    newdbm["key"] = "value"
    if("key" in newdbm):
        print("found")

@gordonmessmer
Copy link
Copy Markdown
Owner

Please rebase on the updated main branch.

@gordonmessmer gordonmessmer merged commit 84d6b4c into gordonmessmer:main Jan 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants