This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Commit f78f8d9
committed
Don't require upstream patches for boto3
The AWS Python SDK, [boto3], has [resource] objects that provide
high-level interfaces to AWS services. The [DynamoDB resource]
greatly simplifies marshalling and unmarshalling data. We rely on
the resource method for [TransactWriteItems] among others that are
absent from boto3. We opened PR
boto/boto3#4010 to add that method.
The resource methods are synthesized at runtime from a data file.
Fortunately, boto3 has a [Loader] mechanism that allows the user to
add extra data files, and the [loader search path] is configurable.
In order to not depend upon our upstream PR for boto3, we distribute
the extra data files and fix up the loader search path by putting it
in a [.pth file] which Python executes automatically during startup.
The data and .pth file are now part of an external package,
[boto3-missing].
[boto3]: https://github.com/boto/boto3
[resource]: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html
[DynamoDB resource]: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#resources
[TransactWriteItems]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html
[Loader]: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/loaders.html
[loader search path]: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/loaders.html#the-search-path
[.pth file]: https://docs.python.org/3/library/site.html
[boto3-missing]: https://github.com/nasa-gcn/boto3-missing1 parent c6a4b29 commit f78f8d9
File tree
4 files changed
+17
-31
lines changed4 files changed
+17
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 39 | | |
49 | 40 | | |
50 | 41 | | |
| |||
53 | 44 | | |
54 | 45 | | |
55 | 46 | | |
56 | | - | |
| 47 | + | |
57 | 48 | | |
58 | 49 | | |
59 | | - | |
60 | | - | |
61 | 50 | | |
62 | 51 | | |
63 | 52 | | |
| |||
69 | 58 | | |
70 | 59 | | |
71 | 60 | | |
72 | | - | |
| 61 | + | |
73 | 62 | | |
74 | 63 | | |
75 | 64 | | |
| |||
117 | 106 | | |
118 | 107 | | |
119 | 108 | | |
120 | | - | |
| 109 | + | |
121 | 110 | | |
122 | 111 | | |
123 | 112 | | |
| |||
145 | 134 | | |
146 | 135 | | |
147 | 136 | | |
148 | | - | |
| 137 | + | |
149 | 138 | | |
150 | 139 | | |
151 | | - | |
| 140 | + | |
152 | 141 | | |
153 | 142 | | |
154 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
0 commit comments