Skip to content

Commit 9e267b0

Browse files
test
1 parent c92fe2a commit 9e267b0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Installation
5959
6060
The `[MPL]` suffix also installs the `AWS Cryptographic Material Providers Library (MPL)`_.
6161
This is a library that contains interfaces for encrypting and decrypting your data.
62-
It is highly recommended to install this library with the MPL.
62+
We highly recommend installing the MPL.
6363
However, if you do not wish to install the MPL, omit the `[MPL]` suffix.
6464

6565
Concepts

src/aws_encryption_sdk/internal/deprecation.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
def deprecated(reason):
55
def decorator(cls):
6-
# Define a new constructor that issues a deprecation warning
6+
original_init = cls.__init__ # Save the original __init__
7+
78
@functools.wraps(cls.__init__)
89
def new_init(self, *args, **kwargs):
10+
# Emit the deprecation warning whenever the class is instantiated
911
warnings.warn(f"{cls.__name__} is deprecated: {reason}",
10-
category=DeprecationWarning, stacklevel=2)
11-
cls.__init__(self, *args, **kwargs)
12-
# Update the constructor of the class
12+
category=DeprecationWarning, stacklevel=2)
13+
original_init(self, *args, **kwargs) # Call the original __init__
14+
1315
cls.__init__ = new_init
1416
return cls
1517
return decorator

0 commit comments

Comments
 (0)