{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/7"}],"enrichment":{"capability":"Provides a decorator to wrap legacy function APIs, allowing you to convert positional parameters to keyword-only while maintaining backward compatibility with a deprecation warning.","skillfed_tags":["api-migration","deprecation-handling"],"use_cases":["Migrate a library function from positional to keyword-only parameters while warning existing users to update their code.","Reorder function parameters for better API design without breaking code that calls the function with positional arguments.","Add new parameters to a function signature while maintaining backward compatibility with old calling patterns.","Gradually deprecate an old function API by wrapping it with warnings before removing it entirely.","Support both old and new calling conventions during a library version transition period."],"what_it_does":"Legacy API Wrap is a single-purpose decorator library for managing the migration of function signatures from older Python code to modern conventions. It solves the problem of breaking backward compatibility when you want to convert positional parameters to keyword-only parameters\u2014a common refactoring when updating legacy codebases. The decorator lets you specify which parameters were positional in the old API, then wraps the new function to accept calls using the old signature while emitting a DeprecationWarning to guide users toward the new calling convention.\n\nThe package has no runtime dependencies and is designed for library maintainers who need to evolve their APIs gradually. It works by intercepting calls to the decorated function, mapping old positional arguments to their new keyword-only positions, and forwarding them to the updated function signature. This is particularly useful for APIs defined before keyword-only parameters existed in Python, allowing you to reorder parameters and add new ones without immediately breaking existing code.","worth_installing":"Yes, if you maintain a library with legacy function signatures and need to evolve them safely. The package is actively maintained, has no dependencies, and solves a specific refactoring problem well. The MPL-2.0 copyleft license is straightforward for library use. Install it only if you have functions to migrate; it is not a general-purpose utility."},"id":"legacy-api-wrap","links":{"html":"https://skillfed.io/packages/legacy-api-wrap","md":"https://skillfed.io/packages/legacy-api-wrap.md","pypi":"https://pypi.org/project/legacy-api-wrap/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-11-03","license_spdx":"MPL-2.0","license_treatment":"copyleft","name":"legacy-api-wrap","python_support":"supports_current","summary":"Legacy API wrapper."},"popularity":{"monthly_downloads":1197820,"position":4231,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.5"}
