scitex-compat
Backward compatibility shims and deprecation wrappers for the SciTeX ecosystem.
Full Documentation · uv pip install scitex-compat[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Renaming a public API silently breaks users — there's no stdlib way to say "this still works but is deprecated" | @deprecated decorator — emits DeprecationWarning with a reason= hint; optional forward_to= redirects the call to the replacement so old code-paths keep working transparently |
| 2 | Migrating legacy notify() calls — old scripts reference functions whose home moved |
Compat shims — notify, notify_async still callable, forward to the new home, warn once |
| 3 | Layer-0 leaves can't pull numpy just to mark an API deprecated |
scitex-compat has zero runtime deps (pure stdlib). It is the canonical home for @deprecated in the SciTeX ecosystem — see ADR-0001 |
Installation
pip install scitex-compat
Architecture
scitex-compat is the SSOT (single source of truth) for the
@deprecated decorator across the SciTeX ecosystem. Other packages
(notably scitex-decorators) re-export from here, so there is exactly
one implementation to fix bugs in or extend.
scitex-compat/
├── src/scitex_compat/
│ ├── __init__.py # deprecated, notify, notify_async
│ └── _compat.py # @deprecated impl + notify/notify_async shims
├── docs/adr/
│ └── 0001-canonical-deprecated-decorator.md # SSOT decision
└── tests/
See also: scitex-decorators ADR-0001
documenting the re-export contract from the other side.
Quick Start
from scitex_compat import deprecated
# 1. Warn-only form
@deprecated(reason="use new_function instead; removed in 3.0")
def old_function():
pass
# 2. Forwarding form — redirects calls to the new location
@deprecated(reason="moved to scitex.session.start", forward_to="..session.start")
def start():
pass
1 Interfaces
Python API
from scitex_compat import deprecated, notify, notify_async
# Warn-only: emits DeprecationWarning, still calls the wrapped body.
@deprecated(reason="use new_func instead")
def old_func(*args, **kwargs):
...
# Forwarding: warning + transparent redirect via importlib.
# forward_to may be absolute ("pkg.mod.func") or relative ("..mod.func")
# resolved against the decorated function's __module__.
@deprecated(reason="moved", forward_to="scitex_other.mod.replacement")
def renamed_func(*args, **kwargs):
...
# Compat shims (forward to scitex.notify if installed)
notify("hello")
await notify_async("hello")
Demo
sequenceDiagram
participant U as user code
participant O as old_func (deprecated)
participant N as new_func
participant W as warnings
U->>O: old_func(x=1)
O->>W: DeprecationWarning("old_func is deprecated: <reason>")
O->>N: importlib resolves forward_to → new_func(x=1)
N-->>U: result
Note over U,N: One release later, old_func can be removed.
Part of SciTeX
scitex-compat is part of SciTeX. Install via
the umbrella with pip install scitex[compat] to use as
scitex.compat (Python) or scitex compat ... (CLI).
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
License
AGPL-3.0
Metadata
Release files for scitex-compat 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scitex_compat-0.1.9.tar.gz | 8.8 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scitex_compat-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 MB
Release files / scitex_compat-0.1.9.tar.gz
| Download URL | scitex_compat-0.1.9.tar.gz |
|---|---|
| Size | 8.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7be4ef6725e3df51e5f3759342f194c996ddff7b4eb89e5f89d6af00417ab798
|
|
BLAKE2b-256 checksum How to use checksums |
f8333d7ecc2ab42468dbe598a5bf0842574f389c3dda80c4378bd26e9df2ee6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / scitex_compat-0.1.9-py3-none-any.whl
| Download URL | scitex_compat-0.1.9-py3-none-any.whl |
|---|---|
| Size | 8.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
317cbcae8624545b1aa3fc70ac4a24c7d9e0e9f3a80f0c5950f497bb60a00af3
|
|
BLAKE2b-256 checksum How to use checksums |
175a55ce9a8f0f0a6297023222f098f4e87697b312e3879a3ac9c24ffe7970f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logSecurity for scitex-compat 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scitex_compat-0.1.9.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.