From Fedora Project Wiki

< Changes

Revision as of 12:32, 12 February 2021 by Churchyard (talk | contribs)

Deprecate pytz


The Package-x-generic-16.pngpytz (Package-x-generic-16.pngpython3-pytz) package will be deprecated in Fedora 35. Packages in Fedora should use Python standard library modules, such as 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.


Current status

  • Targeted release: Fedora 35
  • Last updated: 2021-02-12
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description


How to migrate to the standard library


Support for older Pythons

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:


In code, it is used via an try-import mechanism, such as:

    import zoneinfo
except ImportError:
    from backports import zoneinfo


Positive feedback from Anaconda developers:

Benefit to Fedora

More packages will use the standard library over a potentially dangerous third party package.

Eventually, we might be able to drop pytz from Fedora.


  • Proposal owners: Deprecate Package-x-generic-16.pngpython3-pytz and update the package description. Provide help migrating to the standard library to other packagers who ask for it.
  • Other developers: No action needed. Don't add new dependencies on Package-x-generic-16.pngpython3-pytz. If interested, migrate existing packages to the standard library (feel free to ask for help). Upstream work is recommended.
  • Release engineering: no impact on Release Engineering is anticipated
  • Policies and guidelines: N/A (not a System Wide Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives: Minimization: By dropping the extra dependency (e.g. from anaconda), we can have smaller systems.

Upgrade/compatibility impact

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 Package-x-generic-16.pngpython3-libs, because it cannot work as drop-in replacement. The package will eventually be obsoleted by Package-x-generic-16.pngfedora-obsolete-packages once Python is updated to 3.N+1 after the removal to avoid broken upgrades.

How To Test

$ repoquery --repo=rawhide --provides python3-pytz

User Experience

No changes.


N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No
  • Blocks product? product


N/A (not a System Wide Change)

Release Notes