diff --git a/venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/PKG-INFO b/venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/PKG-INFO similarity index 97% rename from venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/PKG-INFO rename to venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/PKG-INFO index 94a15345e76bc228790681b32fc5219c33bc5bf2..c5bfe75661e8c5e0925fc5e09caf1546b843a27c 100644 --- a/venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/PKG-INFO +++ b/venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: wrapt -Version: 1.12.1 +Version: 1.11.2 Summary: Module for decorators, wrappers and monkey patching. Home-page: https://github.com/GrahamDumpleton/wrapt Author: Graham Dumpleton @@ -162,6 +162,5 @@ Classifier: Programming Language :: Python :: 3.4 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 :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy diff --git a/venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/SOURCES.txt b/venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/SOURCES.txt similarity index 100% rename from venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/SOURCES.txt rename to venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/SOURCES.txt diff --git a/venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/dependency_links.txt b/venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/dependency_links.txt similarity index 100% rename from venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/dependency_links.txt rename to venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/dependency_links.txt diff --git a/venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/installed-files.txt b/venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/installed-files.txt similarity index 100% rename from venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/installed-files.txt rename to venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/installed-files.txt diff --git a/venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/top_level.txt b/venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/top_level.txt similarity index 100% rename from venv/Lib/site-packages/wrapt-1.12.1-py3.8.egg-info/top_level.txt rename to venv/Lib/site-packages/wrapt-1.11.2-py3.8.egg-info/top_level.txt diff --git a/venv/Lib/site-packages/wrapt/__init__.py b/venv/Lib/site-packages/wrapt/__init__.py index 7be739bf65991e558888f8059f1ccbaeef5aec65..8e858a0a18c1e0be594d7cb779400845b266ce32 100644 --- a/venv/Lib/site-packages/wrapt/__init__.py +++ b/venv/Lib/site-packages/wrapt/__init__.py @@ -1,4 +1,4 @@ -__version_info__ = ('1', '12', '1') +__version_info__ = ('1', '11', '2') __version__ = '.'.join(__version_info__) from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper, diff --git a/venv/Lib/site-packages/wrapt/_wrappers.cp38-win_amd64.pyd b/venv/Lib/site-packages/wrapt/_wrappers.cp38-win_amd64.pyd index 2c5cb91a68d34ade405ebe0bc1a249232d680fb0..9420229052ab46e31122fe5f918fd60500d6b903 100644 Binary files a/venv/Lib/site-packages/wrapt/_wrappers.cp38-win_amd64.pyd and b/venv/Lib/site-packages/wrapt/_wrappers.cp38-win_amd64.pyd differ diff --git a/venv/Lib/site-packages/wrapt/decorators.py b/venv/Lib/site-packages/wrapt/decorators.py index 506303d7a3188a7e0f2db8b55e2e5d16c4b79e46..11e11deda4ff15d95cfbb799a6d7e75d899b1f1d 100644 --- a/venv/Lib/site-packages/wrapt/decorators.py +++ b/venv/Lib/site-packages/wrapt/decorators.py @@ -6,8 +6,16 @@ as well as some commonly used decorators. import sys PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 -if PY2: +if PY3: + string_types = str, + + import builtins + exec_ = getattr(builtins, "exec") + del builtins + +else: string_types = basestring, def exec_(_code_, _globs_=None, _locs_=None): @@ -22,14 +30,6 @@ if PY2: _locs_ = _globs_ exec("""exec _code_ in _globs_, _locs_""") -else: - string_types = str, - - import builtins - - exec_ = getattr(builtins, "exec") - del builtins - from functools import partial from inspect import ismethod, isclass, formatargspec from collections import namedtuple @@ -99,6 +99,11 @@ class _AdapterFunctionSurrogate(CallableObjectProxy): if 'signature' not in globals(): return self._self_adapter.__signature__ else: + # Can't allow this to fail on Python 3 else it falls + # through to using __wrapped__, but that will be the + # wrong function we want to derive the signature + # from. Thus generate the signature ourselves. + return signature(self._self_adapter) if PY2: @@ -112,13 +117,6 @@ class _BoundAdapterWrapper(BoundFunctionWrapper): return _AdapterFunctionSurrogate(self.__wrapped__.__func__, self._self_parent._self_adapter) - @property - def __signature__(self): - if 'signature' not in globals(): - return self.__wrapped__.__signature__ - else: - return signature(self._self_parent._self_adapter) - if PY2: im_func = __func__ @@ -498,7 +496,7 @@ def synchronized(wrapped): # desired context is held. If instance is None then the # wrapped function is used as the context. - with _synchronized_lock(instance if instance is not None else wrapped): + with _synchronized_lock(instance or wrapped): return wrapped(*args, **kwargs) class _FinalDecorator(FunctionWrapper): diff --git a/venv/Lib/site-packages/wrapt/importer.py b/venv/Lib/site-packages/wrapt/importer.py index 4665f38650cf98db0b1e24010ba0e30542f5e006..9e617cdddc8bfb68590978a9d44da93e7933afbd 100644 --- a/venv/Lib/site-packages/wrapt/importer.py +++ b/venv/Lib/site-packages/wrapt/importer.py @@ -7,12 +7,13 @@ import sys import threading PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 -if PY2: - string_types = basestring, -else: +if PY3: import importlib string_types = str, +else: + string_types = basestring, from .decorators import synchronized @@ -187,20 +188,7 @@ class ImportHookFinder: # Now call back into the import system again. try: - if PY2: - # For Python 2 we don't have much choice but to - # call back in to __import__(). This will - # actually cause the module to be imported. If no - # module could be found then ImportError will be - # raised. Otherwise we return a loader which - # returns the already loaded module and invokes - # the post import hooks. - - __import__(fullname) - - return _ImportHookLoader() - - else: + if PY3: # For Python 3 we need to use find_spec().loader # from the importlib.util module. It doesn't actually # import the target module and only finds the @@ -216,6 +204,18 @@ class ImportHookFinder: if loader: return _ImportHookChainedLoader(loader) + else: + # For Python 2 we don't have much choice but to + # call back in to __import__(). This will + # actually cause the module to be imported. If no + # module could be found then ImportError will be + # raised. Otherwise we return a loader which + # returns the already loaded module and invokes + # the post import hooks. + + __import__(fullname) + + return _ImportHookLoader() finally: del self.in_progress[fullname] diff --git a/venv/Lib/site-packages/wrapt/wrappers.py b/venv/Lib/site-packages/wrapt/wrappers.py index 18cf5e053eb6845dd7ee5c4d2c1ea2cdfb03a105..1d6131d8536fa2da54bd85f4690554b0fae143d2 100644 --- a/venv/Lib/site-packages/wrapt/wrappers.py +++ b/venv/Lib/site-packages/wrapt/wrappers.py @@ -6,11 +6,12 @@ import weakref import inspect PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 -if PY2: - string_types = basestring, -else: +if PY3: string_types = str, +else: + string_types = basestring, def with_metaclass(meta, *bases): """Create a base class with a metaclass.""" @@ -116,7 +117,7 @@ class ObjectProxy(with_metaclass(_ObjectProxyMetaType)): def __str__(self): return str(self.__wrapped__) - if not PY2: + if PY3: def __bytes__(self): return bytes(self.__wrapped__) @@ -129,14 +130,10 @@ class ObjectProxy(with_metaclass(_ObjectProxyMetaType)): def __reversed__(self): return reversed(self.__wrapped__) - if not PY2: + if PY3: def __round__(self): return round(self.__wrapped__) - if sys.hexversion >= 0x03070000: - def __mro_entries__(self, bases): - return (self.__wrapped__,) - def __lt__(self, other): return self.__wrapped__ < other @@ -739,34 +736,33 @@ def resolve_path(module, name): path = name.split('.') attribute = path[0] - # We can't just always use getattr() because in doing - # that on a class it will cause binding to occur which - # will complicate things later and cause some things not - # to work. For the case of a class we therefore access - # the __dict__ directly. To cope though with the wrong - # class being given to us, or a method being moved into - # a base class, we need to walk the class hierarchy to - # work out exactly which __dict__ the method was defined - # in, as accessing it from __dict__ will fail if it was - # not actually on the class given. Fallback to using - # getattr() if we can't find it. If it truly doesn't - # exist, then that will fail. - - def lookup_attribute(parent, attribute): - if inspect.isclass(parent): - for cls in inspect.getmro(parent): + original = getattr(parent, attribute) + for attribute in path[1:]: + parent = original + + # We can't just always use getattr() because in doing + # that on a class it will cause binding to occur which + # will complicate things later and cause some things not + # to work. For the case of a class we therefore access + # the __dict__ directly. To cope though with the wrong + # class being given to us, or a method being moved into + # a base class, we need to walk the class hierarchy to + # work out exactly which __dict__ the method was defined + # in, as accessing it from __dict__ will fail if it was + # not actually on the class given. Fallback to using + # getattr() if we can't find it. If it truly doesn't + # exist, then that will fail. + + if inspect.isclass(original): + for cls in inspect.getmro(original): if attribute in vars(cls): - return vars(cls)[attribute] + original = vars(cls)[attribute] + break else: - return getattr(parent, attribute) - else: - return getattr(parent, attribute) - - original = lookup_attribute(parent, attribute) + original = getattr(original, attribute) - for attribute in path[1:]: - parent = original - original = lookup_attribute(parent, attribute) + else: + original = getattr(original, attribute) return (parent, attribute, original)