Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808795 - app-misc/khal-0.10.2-r2 breaks with dev-python/tzlocal-3.0
Summary: app-misc/khal-0.10.2-r2 breaks with dev-python/tzlocal-3.0
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL: https://github.com/pimutils/khal/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-17 20:54 UTC by Nils Freydank
Modified: 2021-10-31 04:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Freydank 2021-08-17 20:54:34 UTC
Hi,

as noted earlier this week on IRC in #gentoo-python khal breaks with tzlocal-3.0
as tzlocal upstream has replaced pytz with zoneinfo[1].

The problem is known upstream[2] and mgorny already converted the dependency in
commit b29a9a34b2e614d3affecb971d66df81e3705858 [3].

I'm still writing this bug report to track upstream's migration progress or
possibly for to block a future tzlocal-3.0 tracker bug.

This bug is not fixed in khal-0.10.4, which I bumped locally before searching
in upstream's issues.

Here is the full trace from khal 0.10.0-r2::gentoo:
--- begin of trace
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/ikhal", line 33, in <module>
    sys.exit(load_entry_point('khal==0.10.2', 'console_scripts', 'ikhal')())
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/khal/cli.py", line 479, in interactive_cli
    controllers.interactive(
  File "/usr/lib/python3.9/site-packages/khal/controllers.py", line 542, in interactive
    pane = ui.ClassicView(
  File "/usr/lib/python3.9/site-packages/khal/ui/__init__.py", line 1037, in __init__
    daywalker = Walker(
  File "/usr/lib/python3.9/site-packages/khal/ui/__init__.py", line 358, in __init__
    self.ensure_date(this_date)
  File "/usr/lib/python3.9/site-packages/khal/ui/__init__.py", line 367, in ensure_date
    pile = self._get_events(day)
  File "/usr/lib/python3.9/site-packages/khal/ui/__init__.py", line 477, in _get_events
    self.events = sorted(self._collection.get_events_on(day))
  File "/usr/lib/python3.9/site-packages/khal/khalendar/khalendar.py", line 151, in get_events_on
    localize = self._locale['local_timezone'].localize
AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'localize'
--- end of trace

[1] https://github.com/regebro/tzlocal/pull/92
[2] https://github.com/pimutils/khal/issues/985
[3] https://gitweb.gentoo.org/repo/gentoo.git/commit/app-misc/khal?id=b29a9a34b2e614d3affecb971d66df81e3705858

Reproducible: Always
Comment 1 Marcel Schilling 2021-09-28 06:03:02 UTC
I hit this issue as well.
Note that 0.10.2-r1 is the latest version available to me, so mgorny's fix is not kicking in (yet). I had to manually add `>=dev-python/tzlocal-3.0` to `/etc/portage/package.mask` followed by `emerge -1 dev-python/tzlocal` to get khal working again.
Comment 2 Sam James archtester gentoo-dev Security 2021-10-29 16:08:30 UTC
(In reply to Marcel Schilling from comment #1)
> I hit this issue as well.
> Note that 0.10.2-r1 is the latest version available to me, so mgorny's fix
> is not kicking in (yet). I had to manually add `>=dev-python/tzlocal-3.0` to
> `/etc/portage/package.mask` followed by `emerge -1 dev-python/tzlocal` to
> get khal working again.

Wait.. what? Why can't you have a newer version?
Comment 3 Marcel Schilling 2021-10-30 14:44:01 UTC
Sorry, my bad:

I had

```
=app-misc/khal-0.10.2-r1 ~amd64
```

in `/etc/portage/package.accept_keywords`.
With `app-misc/khal-0.10.2-r2` there is no need to manually mask `>=app-misc/khal-0.10.2-r1` anymore as it indeed depends on `<dev-python/tzlocal-3` already.
Comment 4 Marcel Schilling 2021-10-30 14:47:52 UTC
s:>=app-misc/khal-0.10.2-r1:>=dev-python/tzlocal-3.0: ;-)
Comment 5 Sam James archtester gentoo-dev Security 2021-10-31 04:46:56 UTC
Heh, great! Thanks for the update :)