Skip to main content

Backward compatibility shims and deprecation wrappers

Project description

scitex-compat

SciTeX

Backward compatibility shims and deprecation wrappers for the SciTeX ecosystem.

Full Documentation · uv pip install scitex-compat[all]

pypi python docs

tests install-check cov


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 shimsnotify, 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

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. 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


SciTeX

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scitex_compat-0.1.7.tar.gz (8.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_compat-0.1.7-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

Details for the file scitex_compat-0.1.7.tar.gz.

File metadata

  • Download URL: scitex_compat-0.1.7.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

Hashes for scitex_compat-0.1.7.tar.gz
Algorithm Hash digest
SHA256 81e916e56b5192fe76f5a938a7f2ef5ac353c259936c2dd5301d629a28d4cddb
MD5 3c66d32e2632ef32ef039ed8546ffcbe
BLAKE2b-256 7cd7697500257707d390fe132a3f39c1e50068bd4d305dcd6976e4c6ef0edba3

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_compat-0.1.7.tar.gz:

Publisher: pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-compat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_compat-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: scitex_compat-0.1.7-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

Hashes for scitex_compat-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 57960f660f03a99fb390c3e236a92f2c2cf359d4d04bebb675c4fdc72d34ea24
MD5 aab75edb6e4e2dfb431e998cc5ed939d
BLAKE2b-256 e8a17853247fa91e5944849fc05cefba1f0100f9c7f14c6fae5d05293084804e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_compat-0.1.7-py3-none-any.whl:

Publisher: pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-compat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page