Skip to content

Commit

Permalink
Merge branch 'develop' into add-docker-build-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey authored Nov 15, 2024
2 parents a403fbd + fe9835e commit a18782a
Show file tree
Hide file tree
Showing 14 changed files with 260 additions and 260 deletions.
31 changes: 16 additions & 15 deletions DEVELOPMENT_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Gitpod is free for 50 hours per month - make sure to stop your workspace when yo
## Environment Setup
### 1. Prerequisites (Python Virtual Environment)

AWS SAM CLI is mainly written in Python 3 and we support Python 3.7 and 3.8.
So having a Python environment with aforementioned versions is required.
AWS SAM CLI is mainly written in Python 3 and we support Python 3.8 and above.
So, having a Python environment with this version is required.

Having a dedicated Python virtual environment ensures it won't "pollute" or get "polluted"
by other python packages. Here we introduce two ways of setting up a Python virtual environment:
Expand Down Expand Up @@ -163,26 +163,27 @@ contribute to the repository, there are a few more things to consider.

### Make Sure AWS SAM CLI Work in Multiple Python Versions

We support 3.7 and 3.8 versions. Our CI/CD pipeline is setup to run
We support version 3.8 and above. Our CI/CD pipeline is setup to run
unit tests against all Python versions. So make sure you test it
with all versions before sending a Pull Request.
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions-optional).
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions-optional).
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.

If you chose to use `pyenv` in the previous session, setting up a
different Python version should be easy:

(assuming you are in virtual environment `samcli38`)
(assuming you are in virtual environment named `samcli39` with Python version 3.9.x)

```sh
# Your shell now should looks like "(samcli38) $"
pyenv deactivate samcli38 # "(samcli38)" will disappear
pyenv install 3.7.10 # one time setup
pyenv virtualenv 3.7.10 samcli37 # one time setup
pyenv activate samcli37
# Your shell now should looks like "(samcli37) $"
# Your shell now should look like "(samcli39) $"
pyenv deactivate samcli39 # "(samcli39)" will disappear
pyenv install 3.8.9 # one time setup
pyenv virtualenv 3.8.9 samcli38 # one time setup
pyenv activate samcli38
# Your shell now should look like "(samcli38) $"

# You can verify the version of Python
python --version # Python 3.7.10
python --version # Python 3.8.9

make init # one time setup, this will put a file `samdev` available in $PATH
```
Expand Down Expand Up @@ -255,9 +256,9 @@ We also suggest to run `make pr` or `./Make -pr` in all Python versions.
#### Unit Testing with Multiple Python Versions (Optional)

Currently, SAM CLI only supports Python3 versions (see setup.py for exact versions). For the most
part, code that works in Python3.7 will work in Python3.8. You only run into problems if you are
trying to use features released in a higher version (for example features introduced into Python3.8
will not work in Python3.7). If you want to test in many versions, you can create a virtualenv for
part, code that works in Python3.8 will work in Python3.9. You only run into problems if you are
trying to use features released in a higher version (for example features introduced into Python3.9
will not work in Python3.8). If you want to test in many versions, you can create a virtualenv for
each version and flip between them (sourcing the activate script). Typically, we run all tests in
one python version locally and then have our ci (appveyor) run all supported versions.

Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ regex!=2021.10.8
tzlocal==5.2

#Adding cfn-lint dependency for SAM validate
cfn-lint~=1.18.4
cfn-lint~=1.19.0

# Type checking boto3 objects
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.35.56
5 changes: 3 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

coverage==7.6.4; python_version>="3.9"
coverage==7.6.1; python_version<"3.9"
pytest-cov==5.0.0
pytest-cov==6.0.0; python_version>="3.9"
pytest-cov==5.0.0; python_version<"3.9"


# type checking and related stubs
# mypy adds new rules in new minor versions, which could cause our PR check to fail
# here we fix its version and upgrade it manually in the future
mypy==1.11.2
mypy==1.13.0
types-pywin32==308.0.0.20241029
types-PyYAML==6.0.12.20240917
types-chevron==0.14.2.20240310
Expand Down
207 changes: 97 additions & 110 deletions requirements/reproducible-linux.txt

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions requirements/reproducible-mac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ cffi==1.17.1 \
--hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \
--hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b
# via cryptography
cfn-lint==1.18.4 \
--hash=sha256:73dadc33d6a91c69651cb08fe919138ab4e2f6cf1be1e361f7c6dcbccd1527ba \
--hash=sha256:76741e76fa26f31bfacc3eb465eddd93ad535838d84fbc6dd092817d8e22d57f
cfn-lint==1.19.0 \
--hash=sha256:63835e083f7831e54c512bce4808754df221b5895aed9a114c71879d1cc4ebff \
--hash=sha256:9c43a6b866915df6d2ac5584000ef05e53c67624809808c2cebd3dc6154b7c14
# via aws-sam-cli (setup.py)
chardet==5.2.0 \
--hash=sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 \
Expand Down Expand Up @@ -1081,9 +1081,9 @@ werkzeug==3.0.6 \
--hash=sha256:1bc0c2310d2fbb07b1dd1105eba2f7af72f322e1e455f2f93c993bee8c8a5f17 \
--hash=sha256:a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d
# via flask
wheel==0.44.0 \
--hash=sha256:2376a90c98cc337d18623527a97c31797bd02bad0033d41547043a1cbfbe448f \
--hash=sha256:a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49
wheel==0.45.0 \
--hash=sha256:52f0baa5e6522155090a09c6bd95718cc46956d1b51d537ea5454249edb671c7 \
--hash=sha256:a57353941a3183b3d5365346b567a260a0602a0f8a635926a7dede41b94c674a
# via aws-lambda-builders
zipp==3.20.2 \
--hash=sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350 \
Expand Down
Loading

0 comments on commit a18782a

Please sign in to comment.