wrapt 2.0.1rc1__cp38-cp38-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wrapt might be problematic. Click here for more details.

@@ -0,0 +1,24 @@
1
+ Copyright (c) 2013-2025, Graham Dumpleton
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,215 @@
1
+ Metadata-Version: 2.1
2
+ Name: wrapt
3
+ Version: 2.0.1rc1
4
+ Summary: Module for decorators, wrappers and monkey patching.
5
+ Home-page: https://github.com/GrahamDumpleton/wrapt
6
+ Author: Graham Dumpleton
7
+ Author-email: Graham Dumpleton <Graham.Dumpleton@gmail.com>
8
+ License: Copyright (c) 2013-2025, Graham Dumpleton
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ * Redistributions of source code must retain the above copyright notice, this
15
+ list of conditions and the following disclaimer.
16
+
17
+ * Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
+ POSSIBILITY OF SUCH DAMAGE.
32
+
33
+ Project-URL: Homepage, https://github.com/GrahamDumpleton/wrapt
34
+ Project-URL: Bug Tracker, https://github.com/GrahamDumpleton/wrapt/issues/
35
+ Project-URL: Changelog, https://wrapt.readthedocs.io/en/latest/changes.html
36
+ Project-URL: Documentation, https://wrapt.readthedocs.io/
37
+ Keywords: wrapper,proxy,decorator
38
+ Platform: any
39
+ Classifier: Development Status :: 5 - Production/Stable
40
+ Classifier: Programming Language :: Python :: 3
41
+ Classifier: Programming Language :: Python :: 3.8
42
+ Classifier: Programming Language :: Python :: 3.9
43
+ Classifier: Programming Language :: Python :: 3.10
44
+ Classifier: Programming Language :: Python :: 3.11
45
+ Classifier: Programming Language :: Python :: 3.12
46
+ Classifier: Programming Language :: Python :: 3.13
47
+ Classifier: Programming Language :: Python :: 3.14
48
+ Classifier: Programming Language :: Python :: Implementation :: CPython
49
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
50
+ Requires-Python: >=3.8
51
+ Description-Content-Type: text/x-rst
52
+ License-File: LICENSE
53
+ Provides-Extra: dev
54
+ Requires-Dist: pytest; extra == "dev"
55
+ Requires-Dist: setuptools; extra == "dev"
56
+
57
+ wrapt
58
+ =====
59
+
60
+ |PyPI| |Documentation|
61
+
62
+ A Python module for decorators, wrappers and monkey patching.
63
+
64
+ Overview
65
+ --------
66
+
67
+ The **wrapt** module provides a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions.
68
+
69
+ The **wrapt** module focuses very much on correctness. It goes way beyond existing mechanisms such as ``functools.wraps()`` to ensure that decorators preserve introspectability, signatures, type checking abilities etc. The decorators that can be constructed using this module will work in far more scenarios than typical decorators and provide more predictable and consistent behaviour.
70
+
71
+ To ensure that the overhead is as minimal as possible, a C extension module is used for performance critical components. An automatic fallback to a pure Python implementation is also provided where a target system does not have a compiler to allow the C extension to be compiled.
72
+
73
+ Key Features
74
+ ------------
75
+
76
+ * **Universal decorators** that work with functions, methods, classmethods, staticmethods, and classes
77
+ * **Transparent object proxies** for advanced wrapping scenarios
78
+ * **Monkey patching utilities** for safe runtime modifications
79
+ * **C extension** for optimal performance with Python fallback
80
+ * **Comprehensive introspection preservation** (signatures, annotations, etc.)
81
+ * **Thread-safe decorator implementations**
82
+
83
+ Installation
84
+ ------------
85
+
86
+ Install from PyPI using pip::
87
+
88
+ pip install wrapt
89
+
90
+ Supported Python Versions
91
+ --------------------------
92
+
93
+ * Python 3.8+
94
+ * CPython and PyPy implementations
95
+
96
+ Documentation
97
+ -------------
98
+
99
+ For comprehensive documentation, examples, and advanced usage patterns, visit:
100
+
101
+ * https://wrapt.readthedocs.io/
102
+
103
+ Quick Start
104
+ -----------
105
+
106
+ To implement your decorator you need to first define a wrapper function.
107
+ This will be called each time a decorated function is called. The wrapper
108
+ function needs to take four positional arguments:
109
+
110
+ * ``wrapped`` - The wrapped function which in turns needs to be called by your wrapper function.
111
+ * ``instance`` - The object to which the wrapped function was bound when it was called.
112
+ * ``args`` - The list of positional arguments supplied when the decorated function was called.
113
+ * ``kwargs`` - The dictionary of keyword arguments supplied when the decorated function was called.
114
+
115
+ The wrapper function would do whatever it needs to, but would usually in
116
+ turn call the wrapped function that is passed in via the ``wrapped``
117
+ argument.
118
+
119
+ The decorator ``@wrapt.decorator`` then needs to be applied to the wrapper
120
+ function to convert it into a decorator which can in turn be applied to
121
+ other functions.
122
+
123
+ .. code-block:: python
124
+
125
+ import wrapt
126
+
127
+ @wrapt.decorator
128
+ def pass_through(wrapped, instance, args, kwargs):
129
+ return wrapped(*args, **kwargs)
130
+
131
+ @pass_through
132
+ def function():
133
+ pass
134
+
135
+ If you wish to implement a decorator which accepts arguments, then wrap the
136
+ definition of the decorator in a function closure. Any arguments supplied
137
+ to the outer function when the decorator is applied, will be available to
138
+ the inner wrapper when the wrapped function is called.
139
+
140
+ .. code-block:: python
141
+
142
+ import wrapt
143
+
144
+ def with_arguments(myarg1, myarg2):
145
+ @wrapt.decorator
146
+ def wrapper(wrapped, instance, args, kwargs):
147
+ return wrapped(*args, **kwargs)
148
+ return wrapper
149
+
150
+ @with_arguments(1, 2)
151
+ def function():
152
+ pass
153
+
154
+ When applied to a normal function or static method, the wrapper function
155
+ when called will be passed ``None`` as the ``instance`` argument.
156
+
157
+ When applied to an instance method, the wrapper function when called will
158
+ be passed the instance of the class the method is being called on as the
159
+ ``instance`` argument. This will be the case even when the instance method
160
+ was called explicitly via the class and the instance passed as the first
161
+ argument. That is, the instance will never be passed as part of ``args``.
162
+
163
+ When applied to a class method, the wrapper function when called will be
164
+ passed the class type as the ``instance`` argument.
165
+
166
+ When applied to a class, the wrapper function when called will be passed
167
+ ``None`` as the ``instance`` argument. The ``wrapped`` argument in this
168
+ case will be the class.
169
+
170
+ The above rules can be summarised with the following example.
171
+
172
+ .. code-block:: python
173
+
174
+ import inspect
175
+
176
+ @wrapt.decorator
177
+ def universal(wrapped, instance, args, kwargs):
178
+ if instance is None:
179
+ if inspect.isclass(wrapped):
180
+ # Decorator was applied to a class.
181
+ return wrapped(*args, **kwargs)
182
+ else:
183
+ # Decorator was applied to a function or staticmethod.
184
+ return wrapped(*args, **kwargs)
185
+ else:
186
+ if inspect.isclass(instance):
187
+ # Decorator was applied to a classmethod.
188
+ return wrapped(*args, **kwargs)
189
+ else:
190
+ # Decorator was applied to an instancemethod.
191
+ return wrapped(*args, **kwargs)
192
+
193
+ Using these checks it is therefore possible to create a universal decorator
194
+ that can be applied in all situations. It is no longer necessary to create
195
+ different variants of decorators for normal functions and instance methods,
196
+ or use additional wrappers to convert a function decorator into one that
197
+ will work for instance methods.
198
+
199
+ In all cases, the wrapped function passed to the wrapper function is called
200
+ in the same way, with ``args`` and ``kwargs`` being passed. The
201
+ ``instance`` argument doesn't need to be used in calling the wrapped
202
+ function.
203
+
204
+ Links
205
+ -----
206
+
207
+ * **Documentation**: https://wrapt.readthedocs.io/
208
+ * **Source Code**: https://github.com/GrahamDumpleton/wrapt
209
+ * **Bug Reports**: https://github.com/GrahamDumpleton/wrapt/issues/
210
+ * **Changelog**: https://wrapt.readthedocs.io/en/latest/changes.html
211
+
212
+ .. |PyPI| image:: https://img.shields.io/pypi/v/wrapt.svg?logo=python&cacheSeconds=3600
213
+ :target: https://pypi.python.org/pypi/wrapt
214
+ .. |Documentation| image:: https://img.shields.io/badge/docs-wrapt.readthedocs.io-blue.svg
215
+ :target: https://wrapt.readthedocs.io/
@@ -0,0 +1,18 @@
1
+ wrapt/__init__.py,sha256=qC0GcgnpDB1lbiC3qw7FEr14jJRPdoY9YuEa7zB3IVs,1547
2
+ wrapt/__init__.pyi,sha256=d3CBY392zYAgBJoUeaRzdOUDbwlHgCxiLROnd4LdSG8,9402
3
+ wrapt/__wrapt__.py,sha256=E_Yo7fIk51_OjMzlqXKtIhvplbYbJIPcTGD20b0GWM8,1431
4
+ wrapt/_wrappers.c,sha256=ux1b_-Me_8QpJ_QRWvCq9jt_1CZ-9TFA-cVSLqi4_Zg,115800
5
+ wrapt/_wrappers.cpython-38-x86_64-linux-gnu.so,sha256=vbhG0XJNWbmJDmbQWn9igOEA3kB6ke5KDHuEGTlDqrA,199784
6
+ wrapt/arguments.py,sha256=q4bxH7GoCXhTCgxy-AEyvSnOq0ovMSHjN7ru3HWxlhA,2548
7
+ wrapt/decorators.py,sha256=ePWsg43Q5uHYSBGvbybwIZpsYdIhLGX9twbGZ7ygous,21091
8
+ wrapt/importer.py,sha256=E16XxhomZuX5jM_JEH4ZO-MYpNou1t5RZLJHWLCtsgM,12135
9
+ wrapt/patches.py,sha256=WJAKwOEeozpqgLAq_BlEu2HWbjMg9yaR65szi8J4GRQ,9907
10
+ wrapt/proxies.py,sha256=0-N74mBM3tsC_zEQ83to3Y5OMqdxEu4BhXs3Hq1GDCU,12517
11
+ wrapt/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
12
+ wrapt/weakrefs.py,sha256=5HehYcKOKsRIghxLwnCZ4EJ67rhc0z1GH__pRILRLDc,4630
13
+ wrapt/wrappers.py,sha256=btpuNklFXdpnWlQVrgib1cY08M5tm1vTSd_XEjfEgxs,34439
14
+ wrapt-2.0.1rc1.dist-info/LICENSE,sha256=mrxBqmuGkMB-3ptEt8YjPQFCkO0eO1zMN-KSKVtdBY8,1304
15
+ wrapt-2.0.1rc1.dist-info/METADATA,sha256=5TR7nw13rJYeB4O00OZFBQW_1b60STGU0qCEVLBEhdM,8960
16
+ wrapt-2.0.1rc1.dist-info/WHEEL,sha256=AtKzrIIwO6LyEQPNa-CKogjoLSeXFnST8-hqmpwwZQA,110
17
+ wrapt-2.0.1rc1.dist-info/top_level.txt,sha256=Jf7kcuXtwjUJMwOL0QzALDg2WiSiXiH9ThKMjN64DW0,6
18
+ wrapt-2.0.1rc1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.3.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-cp38-musllinux_1_2_x86_64
5
+
@@ -0,0 +1 @@
1
+ wrapt