Package: khal
Version: 1:0.10.4~ds-3
Followup-For: Bug #1007255
X-Debbugs-Cc: eingousef+debb...@rhizogen.es.eu.org

Dear Maintainer,

I would like to add that on my system at least, this error seems to
prevent the creation of an event via `khal new` if I dont explicitely
set the timezone :

$ khal new -a private_calendar '2022-04-10 09:00' "Test2" :: "test2" 
/usr/lib/python3/dist-packages/khal/icalendar.py:104: PytzUsageWarning: The 
localize method is no longer necessary, as this time zone supports the fold 
attribute (PEP 495). For more details on migrating to a PEP 495-compliant 
implementation, see 
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  dtstart = timezone.localize(dtstart)
/usr/lib/python3/dist-packages/khal/icalendar.py:105: PytzUsageWarning: The 
localize method is no longer necessary, as this time zone supports the fold 
attribute (PEP 495). For more details on migrating to a PEP 495-compliant 
implementation, see 
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  dtend = timezone.localize(dtend)
/usr/lib/python3/dist-packages/icalendar/parser.py:54: PytzUsageWarning: The 
zone attribute is specific to pytz's interface; please migrate to a new time 
zone provider. For more details on how to do so, see 
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  if hasattr(dt.tzinfo, 'zone'):
/usr/lib/python3/dist-packages/icalendar/parser.py:55: PytzUsageWarning: The 
zone attribute is specific to pytz's interface; please migrate to a new time 
zone provider. For more details on how to do so, see 
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  tzid = dt.tzinfo.zone  # pytz implementation
Traceback (most recent call last):
  File "/usr/bin/khal", line 5, in <module>
    main_khal()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in 
new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3/dist-packages/khal/cli.py", line 388, in new
    new_func(
  File "/usr/lib/python3/dist-packages/khal/controllers.py", line 355, in 
new_from_string
    new_from_args(
  File "/usr/lib/python3/dist-packages/khal/controllers.py", line 381, in 
new_from_args
    collection.new(event)
  File "/usr/lib/python3/dist-packages/khal/khalendar/khalendar.py", line 208, 
in new
    event.href, event.etag = self._storages[calendar].upload(event)
  File "/usr/lib/python3/dist-packages/khal/khalendar/vdir.py", line 212, in 
upload
    if not isinstance(item.raw, str):
  File "/usr/lib/python3/dist-packages/khal/khalendar/event.py", line 382, in 
raw
    timezone = create_timezone(tzinfo, self.start)
  File "/usr/lib/python3/dist-packages/khal/khalendar/event.py", line 858, in 
create_timezone
    for one, two in iter(tz._tzinfos.items())
AttributeError: '_PytzShimTimezone' object has no attribute '_tzinfos'

When setting the timezone it works as expected :

$ khal new -a private_calendar '2022-04-10 09:00 Europe/Paris' "Test2" :: 
"test2"

Regards,

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (980, 'stable-updates'), (980, 'stable'), (500, 
'stable-security'), (500, 'oldstable-updates'), (500, 'oldoldstable'), (500, 
'oldstable'), (90, 'experimental'), (90, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.16.0-5-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: OpenRC (via /run/openrc), PID 1: init
LSM: AppArmor: enabled

Versions of packages khal depends on:
ii  python3                3.9.8-1
ii  python3-atomicwrites   1.4.0-2
ii  python3-click          8.0.3-1
ii  python3-click-log      0.2.1-2
ii  python3-configobj      5.0.6-5
ii  python3-dateutil       2.8.1-6
ii  python3-icalendar      4.0.3-4
ii  python3-pkg-resources  59.6.0-1.2
ii  python3-tz             2022.1-1
ii  python3-tzlocal        4.1-1
ii  python3-urwid          2.1.2-2+b1
ii  python3-xdg            0.27-2

Versions of packages khal recommends:
ii  python3-setproctitle  1.2.2-2+b1

Versions of packages khal suggests:
ii  khal-doc  1:0.10.4~ds-3

-- no debconf information

Reply via email to