Skip to main content
https://img.shields.io/pypi/v/jaraco.compat.svg https://img.shields.io/pypi/pyversions/jaraco.compat.svg tests Ruff https://readthedocs.org/projects/jaracocompat/badge/?version=latest https://img.shields.io/badge/skeleton-2026-informational

Forward compatibility for Python packages, allowing future constructs to be borrowed before they are available in the standard library.

♫ It’s going to be the future soon. It won’t always be this way, when the things that make me weak and strange get engineered away. ♫

Usage

Import functions from the appropriate compat.pyXX module in your python code. When a package is eventually ready to upgrade beyond pyXX, easily locate (with a grep) and replace those functions with the canonical implementations.

Example

Say you want a namedtuple (introduced in Python 2.6) in a project which supports Python 2.5 and greater:

from compat.py25 import namedtuple
MyTuple = namedtuple('MyTuple', 'a b c')
mt = MyTuple(1,2,3)

With jaraco.compat installed, this code will run on Python 2.5 and greater. When the project is ready to move to Python 2.6, one can easily grep for py25 and make the necessary replacements with minimal impact on the code. In this case:

from collections import namedtuple
MyTuple = namedtuple('MyTuple', 'a b c')
mt = MyTuple(1,2,3)

Metadata

Release files for jaraco.compat 4.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jaraco.compat 4.4.0
File Size Uploaded
jaraco_compat-4.4.0.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jaraco.compat 4.4.0
File Interpreter ABI Platform
jaraco_compat-4.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / jaraco_compat-4.4.0.tar.gz

Download URL jaraco_compat-4.4.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c0e3d11a4267a3ac98c58f3283eebd21472ec3e98facccc93263ceed13c9617c
BLAKE2b-256 checksum
How to use checksums
041a35b3679a31df41911297df963ab4c0db4f974ca723992474ac899009d323
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / jaraco_compat-4.4.0-py3-none-any.whl

Download URL jaraco_compat-4.4.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ed1c7e7affe768ea3aa839bfa2444cf18a32a949a247a3c2b624497efccc4d9
BLAKE2b-256 checksum
How to use checksums
8b37c350a629a8a35e11049484f957569a7983ad31e9eee6968a054e65d1bc4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

4.4.0 This release

2 release files

4.3.1

2 release files

4.3.0

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.1

2 release files

3.0

2 release files

2.2

2 release files

2.1

2 release files

2.0

2 release files

1.4.1

2 release files

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

0.9.1

1 release file

0.9

1 release file

0.8

1 release file

0.7.1

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

0.1dev

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page