Bug 2192148

Summary: khal print error about localize method
Product: [Fedora] Fedora Reporter: Ulf Volmer <u.volmer>
Component: khalAssignee: Michele Baldessari <michele>
Status: ON_QA --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: fedora, michele
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ulf Volmer 2023-04-29 22:43:45 UTC
If I use khal from the fedora repos, I got the warning below.

The version from pip (khal==0.11.1, tzlocal==4.3 works as expected.
Please consider to update the khal package.

/usr/lib/python3.11/site-packages/khal/controllers.py:253: 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
  original_start = conf['locale']['local_timezone'].localize(start)
/usr/lib/python3.11/site-packages/khal/controllers.py:176: 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
  start_local = locale['local_timezone'].localize(start)
/usr/lib/python3.11/site-packages/khal/controllers.py:177: 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
  end_local = locale['local_timezone'].localize(end)
/usr/lib/python3.11/site-packages/khal/khalendar/event.py:458: 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
  start_local_datetime = self._locale['local_timezone'].localize(
/usr/lib/python3.11/site-packages/khal/khalendar/event.py:460: 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
  end_local_datetime = self._locale['local_timezone'].localize(
/usr/lib/python3.11/site-packages/khal/khalendar/event.py:463: 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
  day_start = self._locale['local_timezone'].localize(datetime.combine(relative_to_start, time.min))
/usr/lib/python3.11/site-packages/khal/khalendar/event.py:464: 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
  day_end = self._locale['local_timezone'].localize(datetime.combine(relative_to_end, time.max))



Reproducible: Always

Comment 1 Fedora Update System 2023-08-09 18:21:37 UTC
FEDORA-2023-49bb6e3cd3 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-49bb6e3cd3

Comment 2 Fedora Update System 2023-08-10 01:03:13 UTC
FEDORA-2023-49bb6e3cd3 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-49bb6e3cd3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-49bb6e3cd3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.