Skip to content

Commit 64aa166

Browse files
committed
Update wrapt
1 parent f9ab47b commit 64aa166

File tree

13 files changed

+4275
-2408
lines changed

13 files changed

+4275
-2408
lines changed

newrelic/packages/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# to the New Relic Python Agent's dependencies in newrelic/packages/.
55
opentelemetry_proto==1.32.1
66
urllib3==1.26.19
7-
wrapt==1.16.0
7+
wrapt==2.0.0
88
asgiref==3.6.0 # We only vendor asgiref.compatibility.py
Lines changed: 61 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,63 @@
1-
__version_info__ = ('1', '16', '0')
2-
__version__ = '.'.join(__version_info__)
3-
4-
from .__wrapt__ import (ObjectProxy, CallableObjectProxy, FunctionWrapper,
5-
BoundFunctionWrapper, PartialCallableObjectProxy)
6-
7-
from .patches import (resolve_path, apply_patch, wrap_object, wrap_object_attribute,
8-
function_wrapper, wrap_function_wrapper, patch_function_wrapper,
9-
transient_function_wrapper)
10-
1+
"""
2+
Wrapt is a library for decorators, wrappers and monkey patching.
3+
"""
4+
5+
__version_info__ = ("2", "0", "0")
6+
__version__ = ".".join(__version_info__)
7+
8+
from .__wrapt__ import (
9+
BaseObjectProxy,
10+
BoundFunctionWrapper,
11+
CallableObjectProxy,
12+
FunctionWrapper,
13+
PartialCallableObjectProxy,
14+
partial,
15+
)
16+
from .decorators import AdapterFactory, adapter_factory, decorator, synchronized
17+
from .importer import (
18+
discover_post_import_hooks,
19+
notify_module_loaded,
20+
register_post_import_hook,
21+
when_imported,
22+
)
23+
from .patches import (
24+
apply_patch,
25+
function_wrapper,
26+
patch_function_wrapper,
27+
resolve_path,
28+
transient_function_wrapper,
29+
wrap_function_wrapper,
30+
wrap_object,
31+
wrap_object_attribute,
32+
)
33+
from .proxies import AutoObjectProxy, LazyObjectProxy, ObjectProxy, lazy_import
1134
from .weakrefs import WeakFunctionProxy
1235

13-
from .decorators import (adapter_factory, AdapterFactory, decorator,
14-
synchronized)
15-
16-
from .importer import (register_post_import_hook, when_imported,
17-
notify_module_loaded, discover_post_import_hooks)
18-
19-
# Import of inspect.getcallargs() included for backward compatibility. An
20-
# implementation of this was previously bundled and made available here for
21-
# Python <2.7. Avoid using this in future.
22-
23-
from inspect import getcallargs
24-
25-
# Variant of inspect.formatargspec() included here for forward compatibility.
26-
# This is being done because Python 3.11 dropped inspect.formatargspec() but
27-
# code for handling signature changing decorators relied on it. Exposing the
28-
# bundled implementation here in case any user of wrapt was also needing it.
29-
30-
from .arguments import formatargspec
36+
__all__ = (
37+
"AutoObjectProxy",
38+
"BaseObjectProxy",
39+
"BoundFunctionWrapper",
40+
"CallableObjectProxy",
41+
"FunctionWrapper",
42+
"LazyObjectProxy",
43+
"ObjectProxy",
44+
"PartialCallableObjectProxy",
45+
"partial",
46+
"AdapterFactory",
47+
"adapter_factory",
48+
"decorator",
49+
"synchronized",
50+
"discover_post_import_hooks",
51+
"notify_module_loaded",
52+
"register_post_import_hook",
53+
"when_imported",
54+
"apply_patch",
55+
"function_wrapper",
56+
"patch_function_wrapper",
57+
"resolve_path",
58+
"transient_function_wrapper",
59+
"wrap_function_wrapper",
60+
"wrap_object",
61+
"wrap_object_attribute",
62+
"WeakFunctionProxy",
63+
)

0 commit comments

Comments
 (0)