Skip to main content

Utilities for Maintenance

Project description

maintenance.py: Utilities for Maintenance

Usage

todo(fn: Optional[Callable[P, R]] = None) -> Callable[P, NoReturn] | NoReturn
deprecated(
    message: Optional[str] = None,
    *,
    since: Optional[str] = None,
    new: Any = None,
    add_sphinx_directive: bool = False
) -> Callable[[Callable[P, R]], Callable[P, R]]

Parameters

message

Overrides the default warn message.

since

The version since when the object is deprecated.

new

The new object that replaces the deprecated one. This may be the object itself or its name as a string.

add_sphinx_directive

Adds the deprecated directive to the beginning of the docstring of the object.

Examples

def new():
    return 1

@deprecated(since="1.2.3.post4", new=new)
def old():
    return None
unstable(
    message: Optional[str] = None,
    *,
    until: Optional[str] = None
) -> Callable[[Callable[P, R]], Callable[P, R]]

Links

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

maintenance.py-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

maintenance.py-0.2.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file maintenance.py-0.2.0.tar.gz.

File metadata

  • Download URL: maintenance.py-0.2.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for maintenance.py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 55961fe023a972e9fbf3bd61ab8c21334db1d6ea06717902c9d3bddeec5ecbb3
MD5 ad18dff74fd413c06f8b38d3a59e1771
BLAKE2b-256 fb4dc7dfb777385969c7ce7513e82a91df6096d0f760fad38c4797d686c7eaac

See more details on using hashes here.

File details

Details for the file maintenance.py-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for maintenance.py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2084dcf088c53fa61adb1d24b4ddb038fa2df030b81a9c19a1492ae1926fa1b7
MD5 179faf534faea1510fe4cdcd7d1784f2
BLAKE2b-256 5abd391825346976f7f3e1f62db95ac2fb0bdb833db591e112a34147904649b9

See more details on using hashes here.

Supported by

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