{"id":28736518,"url":"https://github.com/vizonex/deprecated-params","last_synced_at":"2026-02-12T10:02:01.639Z","repository":{"id":298976422,"uuid":"1001727582","full_name":"Vizonex/deprecated-params","owner":"Vizonex","description":"A Python wrapper for labeling deprecated keyword arguments","archived":false,"fork":false,"pushed_at":"2026-02-11T17:00:18.000Z","size":119,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T01:23:33.909Z","etag":null,"topics":["deprecating","parameter-deprecation","python-warnings","python3","warning","warnings"],"latest_commit_sha":null,"homepage":"https://deprecated-params.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vizonex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-13T22:41:31.000Z","updated_at":"2026-02-11T17:00:21.000Z","dependencies_parsed_at":"2025-07-18T20:29:59.549Z","dependency_job_id":"8648d564-d2c8-47c3-9a48-465eef738325","html_url":"https://github.com/Vizonex/deprecated-params","commit_stats":null,"previous_names":["vizonex/deprecated-params"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Vizonex/deprecated-params","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2Fdeprecated-params","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2Fdeprecated-params/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2Fdeprecated-params/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2Fdeprecated-params/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vizonex","download_url":"https://codeload.github.com/Vizonex/deprecated-params/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2Fdeprecated-params/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecating","parameter-deprecation","python-warnings","python3","warning","warnings"],"created_at":"2025-06-16T01:40:21.138Z","updated_at":"2026-02-12T10:02:01.634Z","avatar_url":"https://github.com/Vizonex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecated Params \r\n[![PyPI version](https://badge.fury.io/py/deprecated-params.svg)](https://badge.fury.io/py/deprecated-params)\r\n![PyPI - Downloads](https://img.shields.io/pypi/dm/deprecated-params)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![License: Appache-2.0](https://img.shields.io/badge/License-Appache-yellow.svg)](https://opensource.org/licenses/Appache-2-0)\r\n\r\n\r\nInspired after python's warning.deprecated wrapper, deprecated_params is made to serve the single purpose of deprecating parameter names to warn users\r\nabout incoming changes as well as retaining typehinting.\r\n\r\n\r\n\r\n## How to Deprecate Parameters\r\nParameters should be keyword arguments, not positional, Reason\r\nfor this implementation is that in theory you should've already \r\nplanned an alternative approach to an argument you wish \r\nto deprecate. Most of the times these arguments will most \r\nlikely be one of 3 cases.\r\n- misspellings\r\n- better functionality that replaces old arguments with better ones.\r\n- removed parameters but you want to warn developers\r\n  to move without being aggressive about it.\r\n\r\n\r\n```python\r\nfrom deprecated_params import deprecated_params\r\n\r\n@deprecated_params(['x'])\r\ndef func(y, *, x:int = 0):\r\n    pass\r\n\r\n# DeprecationWarning: Parameter \"x\" is deprecated\r\nfunc(None, x=20)\r\n\r\n# NOTE: **kw is accepted but also you could put down more than one \r\n# parameter if needed...\r\n@deprecated_params(['foo'], {\"foo\":\"foo was removed in ... don't use it\"}, display_kw=False)\r\nclass MyClass:\r\n    def __init__(self, spam:object, **kw):\r\n        self.spam = spam\r\n        self.foo = kw.get(\"foo\", None)\r\n\r\n# DeprecationWarning: foo was removed in ... don't use it\r\nmc = MyClass(\"spam\", foo=\"X\")\r\n```\r\n\r\n## Why I wrote Deprecated Params\r\nI got tired of throwing random warnings in my code and wanted something cleaner that didn't \r\ninterfere with a function's actual code and didn't blind anybody trying to go through it. \r\nContributors and Reviewers should be able to utilize a library that saves them from these problems\r\nwhile improving the readability of a function. After figuring out that the functionality I was \r\nlooking for didn't exist I took the opportunity to implement it.\r\n\r\n## Deprecated Params used in real-world Examples \r\nDeprecated-params is now used with two of my own libraries by default. \r\n\r\n- [aiothreading (up until 0.1.6)](https://github.com/Vizonex/aiothreading)\r\n  - Originally aiothreading had it's own wrapper but I split it off to this library along with a rewrite after finding out that\r\n    parameter names were not showing up ides such as vs-code. The rewrite felt a bit bigger and knowing that users would want to utilize\r\n    this concept in other places was how this library ultimately got started.\r\n  - Lots of interior changes were made and with many arguments being suddenly dropped to increase the performance, the best solution was to warn\r\n    developers to stop using certain parameters as they will be deleted in the future.\r\n  - It is planned to be dropped as many of the things we wanted to remove have been slowly removed from the library which means this library will\r\n    be removed from it but that doesn't mean I won't keep maintaining it, it is invented for short-use cases and can be added and removed freely\r\n    without needing additional dependencies. \r\n\r\n- [aiocallback (mainly used in version 1.6)](https://github.com/Vizonex/aiocallback)\r\n  - Same situation as aiothreading but I decided to buy users more time due to how fast some releases were going and it also allowed\r\n  - Currently I removed deprecated-params from aiocallback since it wasn't needed anymore but this is what deprecated-param's purpose \r\n    was for, being there only when its need. I desired nothing more or less.\r\n\r\nIf you would like to add examples of your own libraries that have used this library feel free to throw me an issue or send me a pull request.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizonex%2Fdeprecated-params","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvizonex%2Fdeprecated-params","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizonex%2Fdeprecated-params/lists"}