You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: DEVELOPMENT_GUIDE.md
+16-15
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ Gitpod is free for 50 hours per month - make sure to stop your workspace when yo
20
20
## Environment Setup
21
21
### 1. Prerequisites (Python Virtual Environment)
22
22
23
-
AWS SAM CLI is mainly written in Python 3 and we support Python 3.7 and 3.8.
24
-
So having a Python environment with aforementioned versions is required.
23
+
AWS SAM CLI is mainly written in Python 3 and we support Python 3.8 and above.
24
+
So, having a Python environment with this version is required.
25
25
26
26
Having a dedicated Python virtual environment ensures it won't "pollute" or get "polluted"
27
27
by other python packages. Here we introduce two ways of setting up a Python virtual environment:
@@ -163,26 +163,27 @@ contribute to the repository, there are a few more things to consider.
163
163
164
164
### Make Sure AWS SAM CLI Work in Multiple Python Versions
165
165
166
-
We support 3.7 and 3.8 versions. Our CI/CD pipeline is setup to run
166
+
We support version 3.8 and above. Our CI/CD pipeline is setup to run
167
167
unit tests against all Python versions. So make sure you test it
168
168
with all versions before sending a Pull Request.
169
-
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions-optional).
169
+
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions-optional).
170
+
This is most important if you are developing in a Python version greater than the minimum supported version (currently 3.8), as any new features released in 3.9+ will not work.
170
171
171
172
If you chose to use `pyenv` in the previous session, setting up a
172
173
different Python version should be easy:
173
174
174
-
(assuming you are in virtual environment `samcli38`)
175
+
(assuming you are in virtual environment named `samcli39` with Python version 3.9.x)
175
176
176
177
```sh
177
-
# Your shell now should looks like "(samcli38) $"
178
-
pyenv deactivate samcli38# "(samcli38)" will disappear
179
-
pyenv install 3.7.10# one time setup
180
-
pyenv virtualenv 3.7.10 samcli37# one time setup
181
-
pyenv activate samcli37
182
-
# Your shell now should looks like "(samcli37) $"
178
+
# Your shell now should look like "(samcli39) $"
179
+
pyenv deactivate samcli39# "(samcli39)" will disappear
180
+
pyenv install 3.8.9# one time setup
181
+
pyenv virtualenv 3.8.9 samcli38# one time setup
182
+
pyenv activate samcli38
183
+
# Your shell now should look like "(samcli38) $"
183
184
184
185
# You can verify the version of Python
185
-
python --version # Python 3.7.10
186
+
python --version # Python 3.8.9
186
187
187
188
make init # one time setup, this will put a file `samdev` available in $PATH
188
189
```
@@ -255,9 +256,9 @@ We also suggest to run `make pr` or `./Make -pr` in all Python versions.
255
256
#### Unit Testing with Multiple Python Versions (Optional)
256
257
257
258
Currently, SAM CLI only supports Python3 versions (see setup.py for exact versions). For the most
258
-
part, code that works in Python3.7 will work in Python3.8. You only run into problems if you are
259
-
trying to use features released in a higher version (for example features introduced into Python3.8
260
-
will not work in Python3.7). If you want to test in many versions, you can create a virtualenv for
259
+
part, code that works in Python3.8 will work in Python3.9. You only run into problems if you are
260
+
trying to use features released in a higher version (for example features introduced into Python3.9
261
+
will not work in Python3.8). If you want to test in many versions, you can create a virtualenv for
261
262
each version and flip between them (sourcing the activate script). Typically, we run all tests in
262
263
one python version locally and then have our ci (appveyor) run all supported versions.
0 commit comments