compatibility problem with s3ql-3.6.0 and Python 3.9?

30 views
Skip to first unread message

Xomex

unread,
Dec 6, 2020, 12:06:53 AM12/6/20
to s3...@googlegroups.com
I've just d/l and built s3ql-3.6.0 on a system newly updated to Fedora 33 which provides Python3.9. It seems to build OK but on running any s3ql command or the tests I get a fatal error from defusedxml about cElementTree:
"....
    import defusedxml.cElementTree as ElementTree
/usr/lib/python3.9/site-packages/defusedxml/cElementTree.py:13: in <module>
    raise ImportError("cElementTree has been removed from Python 3.9")
E   ImportError: cElementTree has been removed from Python 3.9
"
Is this a new incompatibility? and what's the simplest work around?
Thanks.

Nikolaus Rath

unread,
Dec 6, 2020, 5:24:02 AM12/6/20
to noreply-spamdigest via s3ql
Hi,

You should be able to just change "cElementTree" to "ElementTree" in the source code. cElementTree (used to) be a re-implementation of ElementTree in C (for better performance).

Best,
-Nikolaus

--
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


Xomex

unread,
Dec 6, 2020, 9:14:32 PM12/6/20
to s3ql
Thanks Nikolaus,
To confirm: changing the function in backends/s3c.py as suggested has fixed the cElementTree problem.

Now the tests fail at:
"
platform linux -- Python 3.9.0, pytest-6.0.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /usr/local/src/s3ql-3.6.0/tests, configfile: pytest.ini
plugins: trio-0.6.0
collected 354 items                                                                                   

tests/t1_backends.py::test_read_write[local/aes] ERROR                                          [  0%]
tests/t1_backends.py::test_read_write[local/aes] ERROR                                          [  0%]

=============================================== ERRORS ================================================
____________________________ ERROR at setup of test_read_write[local/aes] _____________________________
Traceback (most recent call last):
  File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 137, in pytest_runtest_setup
    check_output(item)
  File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 133, in check_output
    check_test_log(item.catch_log_handler)
AttributeError: 'Function' object has no attribute 'catch_log_handler'
___________________________ ERROR at teardown of test_read_write[local/aes] ___________________________
Traceback (most recent call last):
  File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 143, in pytest_runtest_teardown
    check_output(item)
  File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 133, in check_output
    check_test_log(item.catch_log_handler)
AttributeError: 'Function' object has no attribute 'catch_log_handler'
======================================= short test summary info =======================================
ERROR tests/t1_backends.py::test_read_write[local/aes] - AttributeError: 'Function' object has no at...
ERROR tests/t1_backends.py::test_read_write[local/aes] - AttributeError: 'Function' object has no at...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 2 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"

Nikolaus Rath

unread,
Dec 7, 2020, 5:34:00 AM12/7/20
to s3...@googlegroups.com
Hi Xoxex,

A: Because it confuses the reader.
Q: Why?
A: No.
Q: Should I write my response above the quoted reply?

..so please quote properly, as I'm doing in the rest of this mail:


On Dec 06 2020, Xomex <xom...@gmail.com> wrote:
> ____________________________ ERROR at setup of test_read_write[local/aes]
> _____________________________
> Traceback (most recent call last):
> File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 137, in
> pytest_runtest_setup
> check_output(item)
> File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 133, in
> check_output
> check_test_log(item.catch_log_handler)
> AttributeError: 'Function' object has no attribute 'catch_log_handler'
> ___________________________ ERROR at teardown of test_read_write[local/aes]
> ___________________________
> Traceback (most recent call last):
> File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 143, in
> pytest_runtest_teardown
> check_output(item)
> File "/usr/local/src/s3ql-3.6.0/tests/pytest_checklogs.py", line 133, in
> check_output
> check_test_log(item.catch_log_handler)
> AttributeError: 'Function' object has no attribute 'catch_log_handler'

Should be fixed by
https://github.com/s3ql/s3ql/commit/5316c60b447dbf85a8b80de523fb1a570bf01c11.

Xomex

unread,
Dec 10, 2020, 7:47:10 AM12/10/20
to s3...@googlegroups.com


On Mon, 7 Dec 2020 at 20:34, Nikolaus Rath <Niko...@rath.org> wrote:

Should be fixed by
https://github.com/s3ql/s3ql/commit/5316c60b447dbf85a8b80de523fb1a570bf01c11.

Confirmed. Thanks.

Reply all
Reply to author
Forward
0 new messages