Skip to content

Error compiling Python 3.13.0 when Sqlite compiled with foreign-key enabled by default. #125203

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

Closed
coleifer opened this issue Oct 9, 2024 · 2 comments
Labels
topic-sqlite3 type-bug An unexpected behavior, bug, or error

Comments

@coleifer
Copy link

coleifer commented Oct 9, 2024

Bug report

Bug description:

My system sqlite is compiled with support for foreign keys:

sqlite> pragma compile_options;
...
DEFAULT_FOREIGN_KEYS
...

This causes a test failure when attempting to compile Python 3.13.0:

======================================================================
ERROR: test_table_dump (test.test_sqlite3.test_dump.DumpTests.test_table_dump)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/charles/code/python-3.13.0/Lib/test/test_sqlite3/test_dump.py", line 45, in test_table_dump
    [self.cu.execute(s) for s in expected_sqls]
     ~~~~~~~~~~~~~~~^^^
sqlite3.IntegrityError: FOREIGN KEY constraint failed

----------------------------------------------------------------------

The test-case should likely disable foreign-key pragma before beginning in order to be correct in all cases.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

@coleifer coleifer added the type-bug An unexpected behavior, bug, or error label Oct 9, 2024
@tomasr8
Copy link
Member

tomasr8 commented Oct 9, 2024

Seems to be related to this issue #123849
Though it looks like the 3.13 backport which fixes the test failure has not been merged yet: #125163

@coleifer
Copy link
Author

coleifer commented Oct 9, 2024

Yes, feel free to close as duplicate, thanks for triaging this @tomasr8.

@erlend-aasland erlend-aasland closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-sqlite3 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants