The
(pytz
) package will be deprecated in Fedora 35. Packages in Fedora should use Python standard library modules, such as python3-pytz
dateutil.tz
and zoneinfo
(available since Python 3.9) instead. Some packages still depend on pytz
, so we cannot remove it yet. Packagers are encouraged to work with upstreams to switch to the standard library for newer Python versions.
The
package is a 3rd party Python package to work with TZ (time zone) data.
pytz
Since Python 3.9 and PEP 615, the package is no longer necessary. The zoneinfo module was added to Python standard library to provide a concrete time zone implementation supporting the IANA time zone database. By default, zoneinfo uses use the system's time zone data from
. Moreover, the usage of pytz can lead to unexpected results if not used very carefully.
tzdata
Fedora has recent enough versions of Python, hence using pytz is no longer necessary. Eventually, we'd like to drop it from Fedora entirely, if possible. Before we attempt to remove the package, we need to stop new packages to (Build)Require
, hence we want to have it deprecated.
python3-pytz
Note that the change owners maintain
in Fedora and RHEL. The package was already marked as unwanted for RHEL 10+.
pytz
... How indeed? ...
When support for older Python versions is desired in upstream, it can be added via the backports.zoneinfo package.
In the metadata, the package is required like this:
backports.zoneinfo;python_version<"3.9"
In code, it is used via an try-import
mechanism, such as:
try: import zoneinfo except ImportError: from backports import zoneinfo
$ (repoquery --repo=koji{,-source} --whatrequires python3-pytz | grep src$; repoquery --repo=koji --whatrequires python3-pytz --source) | pkgname | sort | uniq anaconda babel certbot cinnamon copr-backend copr-frontend cozy fedora-messaging gnome-feeds jrnl khal limnoria oraculum prewikka python-acme python-APScheduler python-arrow python-astral python-astroplan python-bravado-core python-celery python-ciso8601 python-convertdate python-cryptography python-dateparser python-dateutils python-django python-django-helpdesk python-django-timezone-field python-fastavro python-fedmsg-meta-fedora-infrastructure python-feedgenerator python-flask-babel python-flask-restful python-flask-restplus python-flask-restx python-fs python-geopy python-google-api-core python-graphene python-hass-data-detective python-hdate python-icalendar python-inema python-influxdb python-kajiki python-kombu python-marshmallow python-Mastodon python-matplotlib python-metno python-moksha-common python-neotime python-oslo-serialization python-oslo-utils python-OWSLib python-pandas python-pelican python-pygrocy python-pyrfc3339 python-pysaml2 python-pyvirtualize python-ring-doorbell python-serpent python-snaptime python-sqlalchemy-utils python-subliminal python-tasklib python-tempora python-twilio python-tzlocal python-wikitcms python-xmp-toolkit python-zeep rpy vertica-python vit
Positive feedback from Anaconda developers: https://listman.redhat.com/archives/anaconda-devel-list/2021-February/msg00020.html
More packages will use the standard library over a potentially dangerous third party package.
Eventually, we might be able to drop pytz from Fedora.
python3-pytz
and update the package description. Provide help migrating to the standard library to other packagers who ask for it.
python3-pytz
. If interested, migrate existing packages to the standard library (feel free to ask for help). Upstream work is recommended.The package will remain available. Only new packages cannot depend on it.
Once retired (in distant future), we don't plan to obsolete/provide python3-pytz
from
, because it cannot work as drop-in replacement. The package will eventually be obsoleted by python3-libs
once Python is updated to 3.N+1 after the removal to avoid broken upgrades.
fedora-obsolete-packages
$ repoquery --repo=rawhide --provides python3-pytz ... deprecated() ...
No changes.
N/A (not a System Wide Change)
N/A (not a System Wide Change)
This is a community maintained site. Red Hat is not responsible for content.
© 2025 Red Hat, Inc. and others. Content is available under Attribution-Share Alike 4.0 International unless otherwise noted.
Fedora is sponsored by Red Hat. Learn more about the relationship between Red Hat and Fedora »