--- id: pytz-deprecation-shim version: "0.1.0.post0" license: Apache-2.0 license_treatment: permissive maintenance: abandoned --- # pytz-deprecation-shim — Shims to make deprecation of pytz easier License: permissive · Maintenance: abandoned · Downloads: 3.0M/mo ## What it is and what it does pytz_deprecation_shim provides timezone objects that bridge the gap between pytz's non-standard interface and the modern PEP 495 standard. It wraps timezone data to accept both the old pytz methods (localize, normalize) and the standard datetime fold attribute, emitting deprecation warnings when legacy methods are called. This allows library maintainers to remove their pytz dependency without immediately breaking code that still uses pytz-style timezone handling. The package is explicitly designed as a temporary migration tool, not a long-term solution. It depends on python-dateutil, tzdata, and backports.zoneinfo to provide the underlying timezone data and compatibility layer. However, the project has been abandoned since June 2020 with no updates since March 2022, making it risky for new projects or those requiring ongoing support. Use it for: - Migrate a library away from pytz while maintaining backward compatibility with users still calling localize() and normalize(). - Provide a deprecation path for applications that have embedded pytz zones in their public API. - Test datetime arithmetic across daylight saving time transitions using standard PEP 495 semantics instead of pytz's non-standard behavior. - Gradually transition codebases from pytz to zoneinfo by using shim zones that work with both interfaces. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides drop-in timezone shims that support both the standard PEP 495 datetime interface and pytz's legacy localize/normalize methods, allowing libraries to deprecate pytz gradually. No, except in narrow circumstances. The package is abandoned and has not been updated in over four years. While it has low install friction and a permissive license, its core purpose—helping libraries deprecate pytz—is now better served by directly migrating to zoneinfo (Python 3.9+) or backports.zoneinfo (earlier versions). Use this only if you are actively maintaining a library that has already exposed pytz zones to users and need a temporary bridge; for new projects, migrate directly to zoneinfo. ## Install pip install pytz-deprecation-shim uv add pytz-deprecation-shim poetry add pytz-deprecation-shim ## Installing pytz-deprecation-shim Before you install: Low install friction with three stable runtime dependencies. However, the package is abandoned as of March 2022 with no releases since June 2020, making it unsuitable for new projects or long-term maintenance. License in practice: Apache-2.0 is permissive and poses no restriction on use or redistribution, making licensing a non-issue for adoption. Quickstart: pip install pytz-deprecation-shim import pytz_deprecation_shim as pds from datetime import datetime LA = pds.timezone("America/Los_Angeles") dt = datetime(2020, 10, 31, 12, tzinfo=LA) print(dt) # 2020-10-31 12:00:00-07:00 Requires Python 2.7 or 3.6+; the package is abandoned and receives no maintenance. Verify before relying: - Whether the package still works correctly with current versions of python-dateutil, tzdata, and backports.zoneinfo. - Whether the shim's behavior remains compatible with modern zoneinfo implementations across all supported Python versions. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 3.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pytz migration helper, timezone shim deprecation, replace pytz safely, datetime timezone compatibility, pytz to zoneinfo transition, timezone-migration, deprecated-tool [View on SkillFed](https://skillfed.io/packages/pytz-deprecation-shim) · [View on PyPI](https://pypi.org/project/pytz-deprecation-shim/)