Since Python 3.10, I have this warning when I create an event:
calendar-cli.py:366: 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 = _tz(args.timezone).localize(dtstart)
/usr/lib/python3.10/site-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.10/site-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
We still need to use pytz, until https://github.com/collective/icalendar/issues/333 has been resolved - but I think I've managed to tweak calendar-cli not to yield warnings in the head of the master branch.
Since Python 3.10, I have this warning when I create an event:
calendar-cli.py:366: 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 = _tz(args.timezone).localize(dtstart) /usr/lib/python3.10/site-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.10/site-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