File tree 2 files changed +7
-5
lines changed
src/aws_encryption_sdk/internal
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Installation
59
59
60
60
The `[MPL] ` suffix also installs the `AWS Cryptographic Material Providers Library (MPL) `_.
61
61
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.
63
63
However, if you do not wish to install the MPL, omit the `[MPL] ` suffix.
64
64
65
65
Concepts
Original file line number Diff line number Diff line change 3
3
4
4
def deprecated (reason ):
5
5
def decorator (cls ):
6
- # Define a new constructor that issues a deprecation warning
6
+ original_init = cls .__init__ # Save the original __init__
7
+
7
8
@functools .wraps (cls .__init__ )
8
9
def new_init (self , * args , ** kwargs ):
10
+ # Emit the deprecation warning whenever the class is instantiated
9
11
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
+
13
15
cls .__init__ = new_init
14
16
return cls
15
17
return decorator
You can’t perform that action at this time.
0 commit comments