Commit e8f74f5
authored
* feat: add support for Python 3 (#428)
* refactor: Updated imports to by Py3 compliant
* refactor: Move class variable creation to constructor in globals.py
Without moving this to the __init__, the globals.py file will not run
in Py3 because it can't reference the constants.
* refactor: Update update_policy.py to be Py3 compliant
In Py3, the function .iteritems() on a dict was removed and replaced
with .items().
* refactor: Update deployment_preference_collection.py to be Py3 compliant
In Py3, .itervalues() and .iteritems() was replaced with .values() and
.items(), respectfully.
* refactor: Update swagger.py to be Py3 compliant
In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.
* refactor: Update intrinsics.py to be Py3 compliant
In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.
* Staging translator.py changes
Updated .iteritems() to items()
* refactor: More updating to be Py3 compliant
* refactor: Make hashing constisent between py2 and py3
* refactor: Make exceptions sortable to allow error case tests to pass in Py3
* fix: add support for Python 3 (#445)
* refactor: Updated imports to by Py3 compliant
* refactor: Move class variable creation to constructor in globals.py
Without moving this to the __init__, the globals.py file will not run
in Py3 because it can't reference the constants.
* refactor: Update update_policy.py to be Py3 compliant
In Py3, the function .iteritems() on a dict was removed and replaced
with .items().
* refactor: Update deployment_preference_collection.py to be Py3 compliant
In Py3, .itervalues() and .iteritems() was replaced with .values() and
.items(), respectfully.
* refactor: Update swagger.py to be Py3 compliant
In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.
* refactor: Update intrinsics.py to be Py3 compliant
In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.
* Staging translator.py changes
Updated .iteritems() to items()
* refactor: More updating to be Py3 compliant
* refactor: Make hashing constisent between py2 and py3
* refactor: Make exceptions sortable to allow error case tests to pass in Py3
* feat: Run tox from Travis-CI
* feat: Update tox to run in Py2 and Py3
* refactor: Force sorting behavior to be Py2 compatible and update Deployment logicalid hash
* fix: Update tox to run tests against Py27 and Py36
* Update Travis config to run Py2 and Py3 tests in parallel
* Setting region env var in tox file for Travis to pick up
* Set AWS region in travis file
* Pass AWS_* env vars to tox
* Fixing ordering of resource types in Globals error message
* Py2/3 compatible implementation of string encoding for logicalId generator
Also added lots of comments explaining why/how the deep sorting of lists
work in unit tests
* Removing redundant usage of bytes
1 parent a3a6d52 commit e8f74f5
File tree
29 files changed
+243
-85
lines changed- samtranslator
- intrinsics
- model
- eventsources
- preferences
- s3_utils
- plugins
- api
- globals
- policies
- policy_template_processor
- sdk
- swagger
- translator
- validator
- tests
- policy_template_processor
- translator
- output
29 files changed
+243
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
5 | 15 | | |
6 | 16 | | |
7 | 17 | | |
| |||
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
13 | | - | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | | - | |
16 | 20 | | |
17 | | - | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
21 | | - | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments