Файловый менеджер - Редактировать - /home/skymarketplace/public_html/uploads/wrapt-1.15.0.dist-info.tar
Назад
INSTALLER 0000644 00000000004 15004346453 0006022 0 ustar 00 pip LICENSE 0000644 00000002430 15004346453 0005554 0 ustar 00 Copyright (c) 2013-2023, Graham Dumpleton All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. METADATA 0000644 00000015123 15004346453 0005655 0 ustar 00 Metadata-Version: 2.1 Name: wrapt Version: 1.15.0 Summary: Module for decorators, wrappers and monkey patching. Home-page: https://github.com/GrahamDumpleton/wrapt Author: Graham Dumpleton Author-email: Graham.Dumpleton@gmail.com License: BSD Project-URL: Bug Tracker, https://github.com/GrahamDumpleton/wrapt/issues/ Project-URL: Changelog, https://wrapt.readthedocs.io/en/latest/changes.html Project-URL: Documentation, https://wrapt.readthedocs.io/ Keywords: wrapper,proxy,decorator Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7 Description-Content-Type: text/x-rst License-File: LICENSE wrapt ===== |Actions| |PyPI| The aim of the **wrapt** module is to provide a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions. The **wrapt** module focuses very much on correctness. It therefore 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. 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. Documentation ------------- For further information on the **wrapt** module see: * http://wrapt.readthedocs.org/ Quick Start ----------- To implement your decorator you need to first define a wrapper function. This will be called each time a decorated function is called. The wrapper function needs to take four positional arguments: * ``wrapped`` - The wrapped function which in turns needs to be called by your wrapper function. * ``instance`` - The object to which the wrapped function was bound when it was called. * ``args`` - The list of positional arguments supplied when the decorated function was called. * ``kwargs`` - The dictionary of keyword arguments supplied when the decorated function was called. The wrapper function would do whatever it needs to, but would usually in turn call the wrapped function that is passed in via the ``wrapped`` argument. The decorator ``@wrapt.decorator`` then needs to be applied to the wrapper function to convert it into a decorator which can in turn be applied to other functions. .. code-block:: python import wrapt @wrapt.decorator def pass_through(wrapped, instance, args, kwargs): return wrapped(*args, **kwargs) @pass_through def function(): pass If you wish to implement a decorator which accepts arguments, then wrap the definition of the decorator in a function closure. Any arguments supplied to the outer function when the decorator is applied, will be available to the inner wrapper when the wrapped function is called. .. code-block:: python import wrapt def with_arguments(myarg1, myarg2): @wrapt.decorator def wrapper(wrapped, instance, args, kwargs): return wrapped(*args, **kwargs) return wrapper @with_arguments(1, 2) def function(): pass When applied to a normal function or static method, the wrapper function when called will be passed ``None`` as the ``instance`` argument. When applied to an instance method, the wrapper function when called will be passed the instance of the class the method is being called on as the ``instance`` argument. This will be the case even when the instance method was called explicitly via the class and the instance passed as the first argument. That is, the instance will never be passed as part of ``args``. When applied to a class method, the wrapper function when called will be passed the class type as the ``instance`` argument. When applied to a class, the wrapper function when called will be passed ``None`` as the ``instance`` argument. The ``wrapped`` argument in this case will be the class. The above rules can be summarised with the following example. .. code-block:: python import inspect @wrapt.decorator def universal(wrapped, instance, args, kwargs): if instance is None: if inspect.isclass(wrapped): # Decorator was applied to a class. return wrapped(*args, **kwargs) else: # Decorator was applied to a function or staticmethod. return wrapped(*args, **kwargs) else: if inspect.isclass(instance): # Decorator was applied to a classmethod. return wrapped(*args, **kwargs) else: # Decorator was applied to an instancemethod. return wrapped(*args, **kwargs) Using these checks it is therefore possible to create a universal decorator that can be applied in all situations. It is no longer necessary to create different variants of decorators for normal functions and instance methods, or use additional wrappers to convert a function decorator into one that will work for instance methods. In all cases, the wrapped function passed to the wrapper function is called in the same way, with ``args`` and ``kwargs`` being passed. The ``instance`` argument doesn't need to be used in calling the wrapped function. Repository ---------- Full source code for the **wrapt** module, including documentation files and unit tests, can be obtained from github. * https://github.com/GrahamDumpleton/wrapt .. |Actions| image:: https://img.shields.io/github/workflow/status/GrahamDumpleton/wrapt/Test/develop?logo=github&cacheSeconds=600 :target: https://github.com/GrahamDumpleton/wrapt/actions .. |PyPI| image:: https://img.shields.io/pypi/v/wrapt.svg?logo=python&cacheSeconds=3600 :target: https://pypi.python.org/pypi/wrapt RECORD 0000644 00000002401 15004346453 0005446 0 ustar 00 wrapt-1.15.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 wrapt-1.15.0.dist-info/LICENSE,sha256=WXTvu8i2JrIFCBDWPDqQfuIckr9ks3QPxiOtBes0SKs,1304 wrapt-1.15.0.dist-info/METADATA,sha256=NXeWsQUcY9owhRxlX25FL2FeWcJEAQmzXtFkV0GTHvQ,6739 wrapt-1.15.0.dist-info/RECORD,, wrapt-1.15.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 wrapt-1.15.0.dist-info/WHEEL,sha256=lRwwqpjhiHuoVUOc2Rvh2nffYndwJ9upIgh7nelu2Ug,225 wrapt-1.15.0.dist-info/top_level.txt,sha256=Jf7kcuXtwjUJMwOL0QzALDg2WiSiXiH9ThKMjN64DW0,6 wrapt/__init__.py,sha256=W0Uw_PT2IItZNrCGm7M1dbApccnvsLlqPtZTL8S7g_s,1200 wrapt/__pycache__/__init__.cpython-311.pyc,, wrapt/__pycache__/arguments.cpython-311.pyc,, wrapt/__pycache__/decorators.cpython-311.pyc,, wrapt/__pycache__/importer.cpython-311.pyc,, wrapt/__pycache__/wrappers.cpython-311.pyc,, wrapt/_wrappers.cpython-311-x86_64-linux-gnu.so,sha256=QS8yKp0upR8SXUDeSuIFSASx0F1Nf1S2ZZMXmvS1vbY,190760 wrapt/arguments.py,sha256=RF0nTEdPzPIewJ-jnSY42i4JSzK3ctjPABV1SJxLymg,1746 wrapt/decorators.py,sha256=gNy1PVq9NNVDAB9tujaAVhb0xtVKSSzqT-hdGFeWM34,21332 wrapt/importer.py,sha256=SUC6gNKXYI6lrDBBpNCNCFiEwqh8h8bsHn9Qm-ZlrAw,10782 wrapt/wrappers.py,sha256=bxHYZi0CONYAi4m45h1YC0FKEGlR6sNBt_aGrKZX2Sk,36161 REQUESTED 0000644 00000000000 15004346453 0006022 0 ustar 00 WHEEL 0000644 00000000341 15004346453 0005335 0 ustar 00 Wheel-Version: 1.0 Generator: bdist_wheel (0.38.4) Root-Is-Purelib: false Tag: cp311-cp311-manylinux_2_5_x86_64 Tag: cp311-cp311-manylinux1_x86_64 Tag: cp311-cp311-manylinux_2_17_x86_64 Tag: cp311-cp311-manylinux2014_x86_64 top_level.txt 0000644 00000000006 15004346453 0007276 0 ustar 00 wrapt
| ver. 1.4 |
Github
|
.
| PHP 8.1.31 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка