Package Details: python-caldav 1.3.9-2

Git Clone URL: https://aur.archlinux.org/python-caldav.git (read-only, click to copy)
Package Base: python-caldav
Description: A CalDAV (RFC4791) client library for Python
Upstream URL: https://github.com/python-caldav/caldav
Licenses: Apache-2.0 AND GPL-3.0-or-later
Submitter: fauxmight
Maintainer: yochananmarqos
Last Packager: yochananmarqos
Votes: 5
Popularity: 0.38
First Submitted: 2017-08-29 03:35 (UTC)
Last Updated: 2024-01-21 18:31 (UTC)

Latest Comments

1 2 3 Next › Last »

yochananmarqos commented on 2024-01-08 16:35 (UTC)

I've disabled the tests for now.

brunomontezano commented on 2024-01-08 12:09 (UTC) (edited on 2024-01-08 13:20 (UTC) by brunomontezano)

@yochananmarqos I've been having the same errors as @lothar_m for the last few days trying to install python-caldav. Just for info, I tried to install version 1.3.9-2.

Edit 1: This is the test that errors out: tests/test_cdav.py.

Edit 2: I commented out line 51 from PKGBUILD and it built alright. This is the line:

  testenv/bin/python -m pytest

yochananmarqos commented on 2024-01-06 21:56 (UTC)

@lothar_m: Try 1.3.9-2. Either way, the tests pass with just a warning building in a clean chroot.

lothar_m commented on 2024-01-06 20:21 (UTC) (edited on 2024-01-06 21:33 (UTC) by lothar_m)

@yochananmarqos: thanks for the help with this matter. However, the changes to the PKGBUILD does not solve the problem and the same errors occur. For what is worth, if I comment out the pytest command, the build finishes without any additional errors.

yochananmarqos commented on 2024-01-06 16:50 (UTC)

@lothar_m: It's an issue with tzlocal. I've disabled the warnings, do a git pull and try again.

lothar_m commented on 2024-01-06 14:41 (UTC)

Hi All Getting errors when trying to build versions 1.3.7 through 1.3.9. Log as follows:


============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.4, pluggy-1.3.0
rootdir: /build/python-caldav/src/caldav-1.3.9
plugins: cov-4.1.0
collected 121 items

tests/test_caldav.py s.s..s..s............ss..............s....s........ [ 42%]
...........s...............s..                                           [ 66%]
tests/test_caldav_unit.py .............................                  [ 90%]
tests/test_cdav.py ......FF                                              [ 97%]
tests/test_utils.py .                                                    [ 98%]
tests/test_vcal.py ..                                                    [100%]

=================================== FAILURES ===================================
_________ TestErrorUnitTestBot.test_to_utc_date_string_with_exception __________

ts = datetime.datetime(1, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/London'))

    def _to_utc_date_string(ts):
        # type (Union[date,datetime]]) -> str
        """coerce datetimes to UTC (assume localtime if nothing is given)"""
        if isinstance(ts, datetime):
            try:
                ## for any python version, this should work for a non-native
                ## timestamp.
                ## in python 3.6 and higher, ts.astimezone() will assume a
                ## naive timestamp is localtime (and so do we)
>               ts = ts.astimezone(utc_tz)
E               ValueError: year 0 is out of range

caldav/elements/cdav.py:30: ValueError

During handling of the above exception, another exception occurred:

self = <tests.test_cdav.TestErrorUnitTestBot object at 0x7f4d2aa648d0>

    def test_to_utc_date_string_with_exception(self):
        """
        ts = datetime.datetime(1, 1, 1)
        """
        # This test fails because function [caldav.elements.cdav._to_utc_date_string] produces [OverflowError]
>       _to_utc_date_string(datetime.datetime(1, 1, 1))

tests/test_cdav.py:72: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ts = datetime.datetime(1, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/London'))

    def _to_utc_date_string(ts):
        # type (Union[date,datetime]]) -> str
        """coerce datetimes to UTC (assume localtime if nothing is given)"""
        if isinstance(ts, datetime):
            try:
                ## for any python version, this should work for a non-native
                ## timestamp.
                ## in python 3.6 and higher, ts.astimezone() will assume a
                ## naive timestamp is localtime (and so do we)
                ts = ts.astimezone(utc_tz)
            except:
                ## native time stamp and the current python version is
                ## not able to treat it as localtime.
                import tzlocal

                ts = ts.replace(tzinfo=tzlocal.get_localzone())

                mindate = datetime.min.replace(tzinfo=utc_tz)
                maxdate = datetime.max.replace(tzinfo=utc_tz)
>               if mindate + ts.tzinfo.utcoffset(ts) > ts:
E               OverflowError: date value out of range

caldav/elements/cdav.py:40: OverflowError
____________ TestRegressionUnitTestBot.test_to_utc_date_string_min _____________

ts = datetime.datetime(1, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/London'))

    def _to_utc_date_string(ts):
        # type (Union[date,datetime]]) -> str
        """coerce datetimes to UTC (assume localtime if nothing is given)"""
        if isinstance(ts, datetime):
            try:
                ## for any python version, this should work for a non-native
                ## timestamp.
                ## in python 3.6 and higher, ts.astimezone() will assume a
                ## naive timestamp is localtime (and so do we)
>               ts = ts.astimezone(utc_tz)
E               ValueError: year 0 is out of range

caldav/elements/cdav.py:30: ValueError

During handling of the above exception, another exception occurred:

self = <tests.test_cdav.TestRegressionUnitTestBot object at 0x7f4d2aa653d0>

    def test_to_utc_date_string_min(self):
        input_datetime = datetime.datetime(1, 1, 1)
>       res = _to_utc_date_string(input_datetime)

tests/test_cdav.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ts = datetime.datetime(1, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/London'))

    def _to_utc_date_string(ts):
        # type (Union[date,datetime]]) -> str
        """coerce datetimes to UTC (assume localtime if nothing is given)"""
        if isinstance(ts, datetime):
            try:
                ## for any python version, this should work for a non-native
                ## timestamp.
                ## in python 3.6 and higher, ts.astimezone() will assume a
                ## naive timestamp is localtime (and so do we)
                ts = ts.astimezone(utc_tz)
            except:
                ## native time stamp and the current python version is
                ## not able to treat it as localtime.
                import tzlocal

                ts = ts.replace(tzinfo=tzlocal.get_localzone())

                mindate = datetime.min.replace(tzinfo=utc_tz)
                maxdate = datetime.max.replace(tzinfo=utc_tz)
>               if mindate + ts.tzinfo.utcoffset(ts) > ts:
E               OverflowError: date value out of range

caldav/elements/cdav.py:40: OverflowError
=========================== short test summary info ============================
FAILED tests/test_cdav.py::TestErrorUnitTestBot::test_to_utc_date_string_with_exception
FAILED tests/test_cdav.py::TestRegressionUnitTestBot::test_to_utc_date_string_min
================== 2 failed, 109 passed, 10 skipped in 35.59s ==================
ERROR: A failure occurred in check().
Aborting...

Is anyone else experiencing this issue? I think it might be related to some of the dependencies but can't pinpoint which one, even after having rebuilt them. A manjaro user seems to have stumbled on the same issue - link here and was able to use the manjaro package manager to solve the issue somehow.

mY1v6 commented on 2023-02-19 20:52 (UTC)

I get the same error as Jee

jee commented on 2023-02-19 09:13 (UTC) (edited on 2023-02-19 09:14 (UTC) by jee)

Hello, I got this error with the last update 1.1.1-1

running egg_info
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
    exec(code, locals())
  File "<string>", line 56, in <module>
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
    super().run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 253, in finalize_options
    if pd is not None and pd.key == self.egg_name.lower():
AttributeError: 'PathDistribution' object has no attribute 'key'

am I the only one ?

yochananmarqos commented on 2022-11-13 20:14 (UTC)

@MartinDiehl: It's fixed upstream. I'll skip the failing test for now until 0.10.1 is released.

MartinDiehl commented on 2022-11-13 19:48 (UTC)

I get an error when building:

>       self.assertTrue(b"DTSTART;VALUE=DATE-TIME:20321010T101010Z" in some_ical0)
E       AssertionError: False is not true