From Fedora Project Wiki
(Initial change proposal, WIP)
 
mNo edit summary
Line 7: Line 7:
Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->
Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->


The {{package|pytz}} ({{package|python3-pytz}}) package will be [https://docs.fedoraproject.org/en-US/packaging-guidelines/deprecating-packages/ deprecated] in [[Releases/35|Fedora 35]]. Packages in Fedora should use Python standard library modules, such as `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 upstream to switch to the standard library for newer Python versions.
The {{package|pytz}} ({{package|python3-pytz}}) package will be [https://docs.fedoraproject.org/en-US/packaging-guidelines/deprecating-packages/ deprecated] in [[Releases/35|Fedora 35]]. Packages in Fedora should use Python standard library modules, such as `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.


== Owner ==
== Owner ==

Revision as of 12:32, 12 February 2021


Deprecate pytz

Summary

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 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.

Owner

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:

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

Feedback

Positive feedback from Anaconda developers: https://listman.redhat.com/archives/anaconda-devel-list/2021-February/msg00020.html

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.

Scope

  • 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
...
deprecated()
...

User Experience

No changes.

Dependencies

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

Documentation

N/A (not a System Wide Change)

Release Notes