Skip to main content

Deprecated Params

PyPI version PyPI - Downloads License: MIT License: Appache-2.0 NO AI

Inspired after python's warning.deprecated wrapper, deprecated_params is made to serve the single purpose of deprecating parameter names to warn users about incoming changes as well as retaining typehinting.

How to Deprecate Parameters

Parameters should be keyword arguments, not positional, Reason for this implementation is that in theory you should've already planned an alternative approach to an argument you wish to deprecate. Most of the times these arguments will most likely be one of 3 cases.

  • misspellings
  • better functionality that replaces old arguments with better ones.
  • removed parameters but you want to warn developers to move without being aggressive about it.
from deprecated_params import deprecated_params

@deprecated_params(['x'])
def func(y, *, x:int = 0):
    pass

# DeprecationWarning: Parameter "x" is deprecated
func(None, x=20)

# NOTE: **kw is accepted but also you could put down more than one 
# parameter if needed...
@deprecated_params(['foo'], {"foo":"foo was removed in ... don't use it"}, display_kw=False)
class MyClass:
    def __init__(self, spam:object, **kw):
        self.spam = spam
        self.foo = kw.get("foo", None)

# DeprecationWarning: foo was removed in ... don't use it
mc = MyClass("spam", foo="X")

Why I wrote Deprecated Params

I got tired of throwing random warnings in my code and wanted something cleaner that didn't interfere with a function's actual code and didn't blind anybody trying to go through it. Contributors and Reviewers should be able to utilize a library that saves them from these problems while improving the readability of a function. After figuring out that the functionality I was looking for didn't exist I took the opportunity to implement it.

Goals With this library

  • Keep up to date and maintained until sometime around 2040 or when something new obsoletes the need for it
    • Example: If the standard python library were to introduce it's own adaptation of deprecated-params
  • Remain tiny or as a single module with no additional dependencies unless needed for backwards compatible versions of python example: typing-extensions.
  • This Library will Never Be Vibe Coded. It is simplistic enough for anybody with a decent understanding of python to understand the underlying mechanics behind how the classes and functions work. Under this philosophy, AI will never be relied on and will continue to remain human-made & maintained for the rest of time.

Metadata

Release files for deprecated-params 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deprecated-params 0.9.0
File Size Uploaded Provenance Actions
deprecated_params-0.9.0.tar.gz 10.3 kB With provenance Details for deprecated_params-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deprecated-params 0.9.0
File Interpreter ABI Platform Actions
deprecated_params-0.9.0-py3-none-any.whl Python 3 none any Details for deprecated_params-0.9.0-py3-none-any.whl

Total release size: 19.2 kB

Release files / deprecated_params-0.9.0.tar.gz

Download URL deprecated_params-0.9.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eefbfe6065bc64cbd309e8c640dc6c732c47d0d6c78f46df5d506d4ed6592baf
BLAKE2b-256 checksum
How to use checksums
af9b70ca5faeaedfd11e76f35f24c28b60049a0229c04c640808399338356eca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 19, 2026.

Transparency log

Release files / deprecated_params-0.9.0-py3-none-any.whl

Download URL deprecated_params-0.9.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9d057c90af519b5ffa99de79406d994aa4d55925f3c59b4ef776ae41039b171
BLAKE2b-256 checksum
How to use checksums
c5ac9182b464ed4aab003ab1ace0baff952cb81ef1210dc2fcba04d48fb06188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 19, 2026.

Transparency log

Security for deprecated-params 0.9.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deprecated_params-0.9.0.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 Jul 19, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page