-
Notifications
You must be signed in to change notification settings - Fork 213
Pytz warnings when using khal #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same thing here! System: Arch Linux latest |
I am hitting the same issue as well. I can see about making a PR for this, but it would need to be validated by a maintainer as I do not have a whole bunch of python experience. This issue happens for me on Pop!Os 21.04. |
@WhyNotHugo , @d7415 I think I have a potential fix for this issue and the tests pass locally, but I don't think I have access to create a PR on this repo. So I will just explain the solution I used. You need to do the following in both
def get_events_on(self, day: dt.date) -> Iterable[Event]:
"""return all events on `day`"""
...
locale = ZoneInfo(str(self._locale['local_timezone'])) # create local variable for new locale
localized_events = self.get_localized(start.replace(tzinfo=locale), end.replace(tzinfo=locale)) # equivalent to using the new locale
return itertools.chain(localized_events, floating_events) |
If you fork the repo via the button on the top right, you can commit/push to your fork, and open a PR to merge your changes here. |
@mschilli87 , thank you for letting me know. I did not realize the only way to make PRs was through forking the repo. I will try that and see what happens. |
Hello, I'm facing some issues quite similar to the issue related here when I try to use khal from Arch:
Any suggestion on how to correct it or workaround this? I'm unable to create events from it. Thanks in advance. |
The issue for me was tzlocal -- as the comments on that PR request a smaller change to keep the current code working in the meantime, I've opened #1098 with a requirements tweak to keep tzlocal 2.x for now. |
Still seeing these issues on ArchLinux when using the khal-git package at version Additionally when I edit an event via
|
The requirement tweak in my PR doesn't extend to the AUR package, which just depends on the latest python-tzlocal from the main repository. You'd need to do your own build of tzlocal 2.x using e.g. the previous PKGBUILD for that package. |
I experienced the same issue as @jinnko too, with this error on save:
Also on arch. Using the community repo package. I guess this project needs updating to support tzlocal v3+. Until then though, I downgraded my
And then prevent it getting upgraded again in
(In my case |
Same with |
@nicksellen Thanks for your (temporary) workaround!
|
If you're using ArchLinux, you need to re-build any AUR package that's still using python3.9. You may get a list of those using |
Yes I'm using ArchLinux. The only package which still uses python3.9 is Upgrading |
A python3.9 package won't work with python 3.10. If you need an older version of |
Thanks, this makes sense! Actually I don't need |
I just did:
It's not a good solution, as it replaces the package installed version. But enough for me for now! |
As I hinted at before, it's easy enough to just build your own copy of the package using the repo's PKGBUILD as a base: cd $(mktemp -d)
wget 'https://raw.githubusercontent.com/archlinux/svntogit-community/9bf3950/trunk/PKGBUILD' # python-tzlocal 2.1r3
makepkg -s
sudo pacman -U python-tzlocal-2.1-3-any.pkg.tar.zst This will target whichever version of Python you currently have installed. |
Also happening on the NixOS package. Is there any hope this get fixed? |
It is currently waiting on updates to dependencies. They have not been
working for some time with the replacement for pytz. The problem exists in
some of the newer versions of python. So using python 3.3 or something less
than 3.8/9 should at least get it to work.
…On Wed, Jan 26, 2022, 5:00 AM Pablo Ovelleiro Corral < ***@***.***> wrote:
Also happening on the NixOS package. Is there any hope this get fixed?
—
Reply to this email directly, view it on GitHub
<#1092 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHEDPO74LTXUEQPUVNSSJO3UX7A4LANCNFSM5GNYH3EQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@pjkaufman can you tell us which dependencies so? Maybe somebody is motivated to jump in and help there. |
The dependency is called icalendar (I believe). A couple of PRs have been
issued there to fix the issues in question that are preventing moving
forward, but it looks like the CI has labeled them as failing and the
person that issued the PRs is not interested in loading up the UTs the way
that they are run in that CI to see why they fail there, but not locally.
…On Sat, Jan 29, 2022, 7:59 AM Lucas Hoffmann ***@***.***> wrote:
@pjkaufman <https://github.com/pjkaufman> can you tell us which
dependencies so? Maybe somebody is motivated to jump in and help there.
—
Reply to this email directly, view it on GitHub
<#1092 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHEDPO2DPFOPD2ONBBYEO2DUYPQE3ANCNFSM5GNYH3EQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Manual intervention is no longer needed on Arch Linux, the python-tzlocal package is back to version 2.1. You can go ahead and remove it from your IgnorePkg list. |
For those like me on NixOS without flakes (which is linked above), here's an overlay to temporarily fix this issue by downgrading the tzlocal used by khal. Just put it in
|
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix #1092
If you can, please check if the workaround in #1126 is working for you. Thanks! |
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix #1092
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix #1092
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix #1092
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix #1092
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix #1092
Newer versions of tzlocal return tzinfo timezones, not pytz ones. Khal can't deal with tzinfo timezones for the moment, so we force pytz timezones when we use tzlocal. This should be removed when we completely migrate to tzinfo. Fix pimutils#1092
Uh oh!
There was an error while loading. Please reload this page.
Hello, I did a full system upgrade yesterday, and I now have those warnings when I'm trying to display events or calendars (
khal at
,khal list
,khal calendar
)Here's the link mentioned in the warning log for convenience : https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
The text was updated successfully, but these errors were encountered: