Backward compatibility shims and deprecation wrappers
Project description
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 replacement hint, keeps the old name working one release |
| 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 |
Installation
pip install scitex-compat
Architecture
scitex-compat/
├── src/scitex_compat/
│ ├── __init__.py # deprecated, notify, notify_async
│ ├── _deprecated.py # @deprecated decorator (warns once,
│ │ # forwards to replacement, removal_version)
│ └── _shims/
│ ├── _notify.py # legacy notify() -> scitex.notify
│ └── _notify_async.py # legacy notify_async() -> scitex.notify
└── tests/
Quick Start
from scitex_compat import deprecated
@deprecated("new_function_name", removal_version="3.0")
def old_function():
pass
1 Interfaces
Python API
from scitex_compat import deprecated, notify, notify_async
@deprecated("new_func", removal_version="2.0")
def old_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("use new_func; removal_version=2.0")
O->>N: new_func(x=1)
N-->>U: result
Note over U,N: One release later, old_func is 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_compat-0.1.8.tar.gz.
File metadata
- Download URL: scitex_compat-0.1.8.tar.gz
- Upload date:
- Size: 8.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a8c2316d42b5a6e0d399499ad98be4cc48c5777d724fd641451bf06c5c3008
|
|
| MD5 |
daad598db624bf43a9121a5a71724ed0
|
|
| BLAKE2b-256 |
ea90ebb970c7dab42dc39297c86b6a6b15d099e0eacc5dd58c376fa73c47bb22
|
Provenance
The following attestation bundles were made for scitex_compat-0.1.8.tar.gz:
Publisher:
pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-compat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_compat-0.1.8.tar.gz -
Subject digest:
b0a8c2316d42b5a6e0d399499ad98be4cc48c5777d724fd641451bf06c5c3008 - Sigstore transparency entry: 1571586369
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-compat@955b9a352403feabae1e03eabd32c1223852656d -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-and-github-release-on-tag.yml@955b9a352403feabae1e03eabd32c1223852656d -
Trigger Event:
push
-
Statement type:
File details
Details for the file scitex_compat-0.1.8-py3-none-any.whl.
File metadata
- Download URL: scitex_compat-0.1.8-py3-none-any.whl
- Upload date:
- Size: 8.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b9ebd13d0cad4d279c9a650a8d1e3cc02ef707f959c79ae631fd0fd15cf9ea
|
|
| MD5 |
a524cf401e1dde3acab076a45037f9e1
|
|
| BLAKE2b-256 |
937f2bb03bbb631a5ccb98f2eeba5d80ab5972d8c2e85af1e6213d4679c84c9d
|
Provenance
The following attestation bundles were made for scitex_compat-0.1.8-py3-none-any.whl:
Publisher:
pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-compat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_compat-0.1.8-py3-none-any.whl -
Subject digest:
92b9ebd13d0cad4d279c9a650a8d1e3cc02ef707f959c79ae631fd0fd15cf9ea - Sigstore transparency entry: 1571586385
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-compat@955b9a352403feabae1e03eabd32c1223852656d -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-and-github-release-on-tag.yml@955b9a352403feabae1e03eabd32c1223852656d -
Trigger Event:
push
-
Statement type: