Qblox-deprecation
Useful decorators to mark functions, classes, parameters, etc, as deprecated.
Examples
from qblox_deprecation.deprecate import (
deprecate_positional_args_from,
deprecated,
deprecated_arg_alias,
)
def new_function(foo):
return foo + foo
# Emit a future warning and call new_function instead
@deprecated("1.0", new_function)
def deprecated_function():
return foo * foo
# Emit a future warning, extended with the message, and call the original function.
@deprecated("1.0", "Please use new_function instead.")
def deprecated_function():
return 2
class NewClass:
def __init__(self) -> None:
pass
# Emit a future warning and construct an instance of NewClass instead
@deprecated("1.0", NewClass)
class OldClass:
def __init__(self) -> None:
pass
# Emit a future warning, extended with the message, and use the original class.
@deprecated("1.0", "Please use NewClass instead.")
class OldClass:
def __init__(self) -> None:
self.foo = "foo"
# Emit a future warning, and replace any usage of 'quux' with 'baz'.
@deprecated_arg_alias("1.3", quux="baz")
def foo(bar, baz, qux):
pass
# Emit a future warning if any argument after 'b' is specified as a positional argument.
# This prepares for a refactor to `my_func(a, b, *, c, d)`
@deprecate_positional_args_from("c")
def my_func(a, b, c, d):
pass
# You can use it on classes too!
@deprecate_positional_args_from("c")
class MyClass:
def __init__(self, a, b, c, d):
pass
Metadata
Release files for qblox-deprecation 0.0.0
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 | Actions |
|---|---|---|---|---|
| qblox_deprecation-0.0.0.tar.gz | 86.3 kB | Without provenance | Details for qblox_deprecation-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qblox_deprecation-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for qblox_deprecation-0.0.0-py3-none-any.whl |
Total release size: 91.6 kB
Release files / qblox_deprecation-0.0.0.tar.gz
| Download URL | qblox_deprecation-0.0.0.tar.gz |
|---|---|
| Size | 86.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f9d608dbe974b799b757a4819efab3045d359ef5b85667334f9eb2b4cf8dde6
|
|
BLAKE2b-256 checksum How to use checksums |
51ad2114c361ce8edfe538603af8b5ae844830d17f4d32a8346e61e5daed3569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / qblox_deprecation-0.0.0-py3-none-any.whl
| Download URL | qblox_deprecation-0.0.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1aee416a905a96ff47a1da73c9241be41af3af1f67a68f55c396b9bdbd634d0
|
|
BLAKE2b-256 checksum How to use checksums |
7b909a41162609d9b91483745892c2af5f91cb7d71f457d9d95349e34c5c8fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for qblox-deprecation 0.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.