jelmer/xandikos

Test failure with icalendar v6

Closed this issue · 0 comments

Icalendar v6 was released: https://github.com/collective/icalendar/blob/main/README.rst#version-6-with-zoneinfo
Xandikos should now explicitly depend on pytz. But even with that fixed running pytest yields

============================= test session starts ==============================
platform linux -- Python 3.12.5, pytest-8.3.2, pluggy-1.5.0
rootdir: /build/source
configfile: pyproject.toml
collected 124 items / 4 errors                                                 

==================================== ERRORS ====================================
_________________ ERROR collecting xandikos/tests/test_api.py __________________
ImportError while importing test module '/build/source/xandikos/tests/test_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
xandikos/tests/test_api.py:24: in <module>
    from ..web import XandikosApp, XandikosBackend
xandikos/web.py:75: in <module>
    from xandikos import (
xandikos/caldav.py:30: in <module>
    from icalendar.prop import LocalTimezone, vDDDTypes, vPeriod
E   ImportError: cannot import name 'LocalTimezone' from 'icalendar.prop' (/nix/store/cf91qf2b3d4r0yjdy8fk2jv5djigd655-python3.12-icalendar-6.0.0/lib/python3.12/site-packages/icalendar/prop.py)
________________ ERROR collecting xandikos/tests/test_caldav.py ________________
ImportError while importing test module '/build/source/xandikos/tests/test_caldav.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
xandikos/tests/test_caldav.py:25: in <module>
    from xandikos import caldav
xandikos/caldav.py:30: in <module>
    from icalendar.prop import LocalTimezone, vDDDTypes, vPeriod
E   ImportError: cannot import name 'LocalTimezone' from 'icalendar.prop' (/nix/store/cf91qf2b3d4r0yjdy8fk2jv5djigd655-python3.12-icalendar-6.0.0/lib/python3.12/site-packages/icalendar/prop.py)
_________________ ERROR collecting xandikos/tests/test_web.py __________________
ImportError while importing test module '/build/source/xandikos/tests/test_web.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
xandikos/tests/test_web.py:27: in <module>
    from .. import caldav
xandikos/caldav.py:30: in <module>
    from icalendar.prop import LocalTimezone, vDDDTypes, vPeriod
E   ImportError: cannot import name 'LocalTimezone' from 'icalendar.prop' (/nix/store/cf91qf2b3d4r0yjdy8fk2jv5djigd655-python3.12-icalendar-6.0.0/lib/python3.12/site-packages/icalendar/prop.py)
_________________ ERROR collecting xandikos/tests/test_wsgi.py _________________
ImportError while importing test module '/build/source/xandikos/tests/test_wsgi.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
xandikos/tests/test_wsgi.py:22: in <module>
    from ..wsgi_helpers import WellknownRedirector
xandikos/wsgi_helpers.py:24: in <module>
    from .web import WELLKNOWN_DAV_PATHS
xandikos/web.py:75: in <module>
    from xandikos import (
xandikos/caldav.py:30: in <module>
    from icalendar.prop import LocalTimezone, vDDDTypes, vPeriod
E   ImportError: cannot import name 'LocalTimezone' from 'icalendar.prop' (/nix/store/cf91qf2b3d4r0yjdy8fk2jv5djigd655-python3.12-icalendar-6.0.0/lib/python3.12/site-packages/icalendar/prop.py)
=========================== short test summary info ============================
ERROR xandikos/tests/test_api.py
ERROR xandikos/tests/test_caldav.py
ERROR xandikos/tests/test_web.py
ERROR xandikos/tests/test_wsgi.py
!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 4 errors in 0.39s ===============================