Open RobH123 opened 1 month ago
On Fri Jun 7, 2024 at 5:29 AM CEST, Robert wrote:
0:00:50 load avg: 8.41 [38/44] test_statistics -- test_sqlite3 failed (4 errors)
What happens when you run
./python -mtest -v test_sqlite3 ?
Thanks for looking at this @mcepl.
...
test_win_sum_int (test.test_sqlite3.test_userfunctions.WindowFunctionTests.test_win_sum_int) ... ok
======================================================================
ERROR: test_open_undecodable_uri (test.test_sqlite3.test_dbapi.OpenTests.test_open_undecodable_uri)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/robert/Downloads/Python-3.13.0b2/Lib/test/test_sqlite3/test_dbapi.py", line 729, in test_open_undecodable_uri
with contextlib.closing(sqlite.connect(uri, uri=True)) as cx:
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
======================================================================
ERROR: test_open_undecodable_uri (test.test_sqlite3.test_dbapi.OpenTests.test_open_undecodable_uri)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/robert/Downloads/Python-3.13.0b2/Lib/test/support/os_helper.py", line 345, in unlink
_unlink(filename)
~~~~~~~^^^^^^^^^^
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: b'@test_195094_tmp\xe7w\xf0'
======================================================================
ERROR: test_open_with_undecodable_path (test.test_sqlite3.test_dbapi.OpenTests.test_open_with_undecodable_path)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/robert/Downloads/Python-3.13.0b2/Lib/test/test_sqlite3/test_dbapi.py", line 682, in test_open_with_undecodable_path
with contextlib.closing(sqlite.connect(path)) as cx:
~~~~~~~~~~~~~~^^^^^^
sqlite3.OperationalError: unable to open database file
======================================================================
ERROR: test_open_with_undecodable_path (test.test_sqlite3.test_dbapi.OpenTests.test_open_with_undecodable_path)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/robert/Downloads/Python-3.13.0b2/Lib/test/support/os_helper.py", line 345, in unlink
_unlink(filename)
~~~~~~~^^^^^^^^^^
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: b'@test_195094_tmp\xe7w\xf0'
----------------------------------------------------------------------
Ran 481 tests in 0.517s
FAILED (errors=4, skipped=4)
test test_sqlite3 failed
test_sqlite3 failed (4 errors)
== Tests result: FAILURE ==
1 test failed:
test_sqlite3
Total duration: 689 ms
Total tests: run=481 skipped=4
Total test files: run=1/1 failed=1
Result: FAILURE
Sat 08:25:~/Downloads/Python-3.13.0b2$ ll Lib/test/test_sqlite3/
...
-rw-r--r-- 1 robert robert 74629 Jun 6 02:46 test_dbapi.py
...```
Probably completely wrong question. What did you get when running this?
$ ./python -c 'import sys; print(sys.maxunicode > 0xffff)'
True (and if I print sys.maxunicode it's 1114111 or 0x10FFFF).
Oh, and dumb me hadn't even realised at first that I'm actually running python3.13 for these commands. (I'm guessing that it's the unoptimised version???)
----------------------------------------------------------------------
Ran 480 tests in 0.625s
OK (skipped=4)
Warning -- files was modified by test_sqlite3
Warning -- Before: []
Warning -- After: ['gmon.out']
test_sqlite3 failed (env changed)
== Tests result: SUCCESS ==
1 test altered the execution environment (env changed):
test_sqlite3
Total duration: 1.2 sec
Total tests: run=480 skipped=4
Total test files: run=1/1 env_changed=1
Result: SUCCESS
╭─ manjusaka@manjusaka-garuda ~/Documents/projects/cpython main ?9 21:29:47
╰─ sqlite3 --version
3.46.0 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebalt1 (64-bit)
Could not reproduce the issue on main branch
Oh. Do you install sqlite3 from a ppa? (I have 3.45.1 on Ubuntu Noble 24.04, you have 3.46). My Ubuntu has been upgraded every six months for almost five years, so possibly some compatibility thing makes my system not identical to a new install??? Any ideas what else I could possibly look for @Zheaoli? I guess I could try to figure out how to build 3.13 in Docker or something??? Otherwise I'll just have to wait for the eventual release to reach Ubuntu 24.10. (Never had problems building betas before.)
Can you run the following commands and copy/paste the output?
$ ./python
>>> from test.support import os_helper
>>> os_helper.TESTFN_UNDECODABLE
b'@test_950535_tmp\xe7w\xf0'
>>> import sys
>>> sys.getfilesystemencoding()
'utf-8'
>>> sys.getfilesystemencodeerrors()
'surrogateescape'
>>> import locale
>>> locale.getencoding()
'UTF-8'
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.45.1'
>>> sqlite3.sqlite_version_info
(3, 45, 1)
Python 3.13.0b2 (main, Jun 7 2024, 14:59:58) [GCC 13.2.0] on linux
b'@test_4030379_tmp\xe7w\xf0'
'utf-8' 'surrogateescape'
'UTF-8'
'3.45.1' (3, 45, 1)
Thanks @vstinner. (Without the optimisations, 3.13 is about half the speed of 3.12 in my applications.)
Bug report
Bug description:
After successfully running ./configure --enable-optimizations on Ubuntu 24.04 (with these lines perhaps relevant):
Then make -s -j4
dpkg -l | grep sqlite3
Not sure where to look next? (Can't see anything relevant on the issue tracker.)
(I had the same problem last month with beta1, but hoped beta2 might help me get 3.13 running for testing.)
CPython versions tested on:
3.13
Operating systems tested on:
Linux