FTW Patch¶
fitzzftw.patch¶
This package provides high-level patching and introspection utilities for Python Protocols and callables. It dynamically adapts to the Python runtime to ensure consistent metadata extraction across versions.
Architecture:¶
The package uses a version-dispatching mechanism to handle significant changes in Python’s introspection capabilities:
Python 3.14+: Leverages PEP 649 (Deferred Evaluation) and ‘annotationlib’.
Python 3.12 - 3.13: Uses standard ‘inspect’ and ‘typing’ hints.
Python 3.11: Implements legacy workarounds for Protocol introspection.
Exported API:¶
The following classes are resolved dynamically based on sys.version_info:
FtwProtocolWrap: Metadata extractor for structural types.FtwMethFuncWrap: Signature and metadata wrapper for callables.
- Note:
Documentation is primarily linked to the
current_312_313implementation to provide a stable reference, though all versions adhere to the same public interface.
base |
|
Structural Protocols and Type Hints |
|
Unified Diff and Patch Parsing |
|
Patch Application Engine |
|
container |
|
exceptions |
|
FTW Patch |
|
lines |
|
static |
|
General Utilities and Configuration Handling |
|
legacy_311 |
|
Version-Specific Protocol Introspection (Python 3.12 - 3.13) |
|
Modern Protocol Introspection (Python 3.14+) |