Skip to content

Commit

Permalink
Merge commit '0b1eab14ca39c3a3bfb4e915347e07495171dcba' into upgrade-…
Browse files Browse the repository at this point in the history
…zappa-0.57.0

* commit '0b1eab14ca39c3a3bfb4e915347e07495171dcba': (27 commits)
  updating workflow actions to remove deprecation warnings (zappa#1243)
  📝 CHANGELOG.md update for 0.57.0 (zappa#1246)
  fixing compatibility with Django 4.2 (zappa#1237)
  Update Readme with patreon and donors (zappa#1234)
  adding support for Python 3.10 (zappa#1231)
  Nose to pytest (zappa#1239)
  lint: updating code style with `make black` (zappa#1238)
  Alternative way to check if running in Docker (zappa#1204)
  📝 CHANGELOG.md update for 0.56.0 release (zappa#1187)
  Improve `get_best_match_zone()` to match by most matched components instead of by length of domain (zappa#1193)
  Bypass python version runtime check when code run in docker (zappa#1180)
  Be able to pass in a batch window when using batch size (zappa#1118)
  Correction to README. (zappa#1177)
  (zappa#908) Update BINARY_SUPPORT to use Content-Encoding to identify if data is binary (zappa#1155)
  Remove special check for Django<1.7, fix for zappa#1158  (zappa#1159)
  Resolve (zappa#410) Logs are missing query strings (zappa#1165)
  Handle spaces in x-forwared-for/remove six (zappa#1127) (zappa#1163)
  add feature (zappa#704) Check if args/kwargs are JSON Serializable while running locally (zappa#1154)
  docs: Add documentation for s3 event object key_filters (zappa#1169)
  Add feature pyenv virtualenv detecting .python-version file (zappa#1153)
  ...

# Conflicts:
#	zappa/cli.py
  • Loading branch information
BarNehemia committed Aug 10, 2023
2 parents c7459f6 + 0b1eab1 commit 93295d2
Show file tree
Hide file tree
Showing 42 changed files with 2,292 additions and 2,231 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--- Provide a general summary of the issue in the Title above -->
## Context
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->
<!--- Also, please make sure that you are running Zappa _from a virtual environment_ and are using Python 3.6/3.7/3.8 -->
<!--- Also, please make sure that you are running Zappa _from a virtual environment_ and are using Python 3.7/3.8/3.9/3.10 -->

## Expected Behavior
<!--- Tell us what should happen -->
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Before you submit this PR, please make sure that you meet these criteria:
* Did you **make sure this code actually works on Lambda**, as well as locally?
* Did you test this code with all of **Python 3.6**, **Python 3.7** and **Python 3.8** ?
* Did you test this code with all of **Python 3.7**, **Python 3.8**, **Python 3.9** and **Python 3.10** ?
* Does this commit ONLY relate to the issue at hand and have your linter shit all over the code?
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CD

on: # yamllint disable-line rule:truthy
# From documentation:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# on.push.tags: If you define only tags/tags-ignore or only branches/branches-ignore, the workflow won't run for events affecting the undefined Git ref.
#
# This workflow will only run when a tag matching the criteria is pushed
push:
tags: ["v?[0-9]+.[0-9]+.[0-9]+"]

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install `pypa/build`
run: python -m pip install build
- name: Build sdist and wheel
run: python -m build --sdist --wheel --outdir ./dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]
python: [3.7, 3.8, 3.9, "3.10"]
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip${{ matrix.python }}-${{ hashFiles('requirements.txt') }}
key: ${{ runner.os }}-pip${{ matrix.python }}-${{ hashFiles('Pipfile') }}
restore-keys: ${{ runner.os }}-pip${{ matrix.python }}-
- name: make sure we have version tags
run: git fetch --unshallow --tags
- name: Setup Virtualenv
run: python -m venv .venv
- name: Install
Expand All @@ -44,7 +46,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
- name: Finalise Coverage
run: pip3 install --upgrade coveralls && coveralls --service=github --finish
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*~
*.zip
Pipfile.lock

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -45,7 +46,6 @@ htmlcov/
.coveragerc
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# Zappa Changelog

## 0.57.0

* Python 3.10 support (#1124, #1160)
* Remove patron link from README (#1200)
* migrate test framework from nose to pytest (#1146)
* Upgrading Django to 4.2 crashes the zappa based deployment with Error 500 (#1230)

## 0.56.1

* Fix FileNotFoundError in running_in_docker (#1201)
* Use ZAPPA_RUNNING_IN_DOCKER environment variable to use any Python version inside Docker container (#1140)

## 0.56.0
* Not recognizing virtaulenv created with pyenv (#1132)
* Remove six from zappa dependencies (#1164)
* Handle optional space in x-forwarded-for header (#1127)
* [Migrated] #2077 Fix url decoding for query string (#879)
* [Migrated] [async] Check if args/kwargs are JSON Serializable while running locally (#704)
* [Migrated] Add on Docs: event_source from S3 with key_filters (#446)
* [Migrated] Logs are missing query strings (#410)
* [Migrated] Update BINARY_SUPPORT to use Content-Encoding to identify if data is binary (#908)
* Remove obsolete check for Django version < 1.7 (#1158)
* [Migrated] s3 zip includes files that should be matched by the exclude setting (#422)
* Add exclude_glob documentation (#1052)
* Unable to schedule SQS Batch Size of greater than 10 (#1117)
* [Migrated] s3 zip includes files that should be matched by the exclude setting (#422)
* Allow any Python version if using Docker image for Lambda (#1140)
* Incorrect hosted zone match (#1190)
* Issue while trying to install or download zappa without binary file (#1199)

## 0.55.0
* Fix "cd workflow fired event outside of the create tags event" (#1152)
* Remove 'futures' package requirement (#826,#808)
* Remove function invoke command does not need quotes around function (#900)
* Add python_requires to setup.py (#1111)
* Remove python 3.6 support (#1151)
* Update handler to be global if INSTANTIATE_LAMBDA_HANDLER_ON_IMPORT=True (#1096)
* Fix async invocation in Python 3 (#1006)
* Drastically reduce cold start times by calling LambdaHandler externally (#982)
* Support Newest Manylinux Version for dependencies (#1083)
* Decode zappa invoke output regardless of --no-color option (#1069)
* Convert project to using 'pipenv' to manage dependencies (#1077)
* Ensure unique scheduled event names (#1080)
* Check isort in CI (#1078)
* Use 'black' everywhere (#1076)
* Update setup.py (#1050)

## 0.54.2
* Update documentation to reflect python 3.9 support (#1137)

## 0.54.1
* Increase Lambda client read timeout to 15m (#1065)
* Unpin `Werkzeug` from `v0.x` (#1067)
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.md LICENSE requirements.txt test_requirements.txt requirements.in test_requirements.in
include README.md LICENSE Pipfile
recursive-include zappa *.py
44 changes: 31 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
rm -rf .mypy_cache dist build *.egg-info
rm -f .coverage
coverage erase

requirements:
pip install pipenv==2021.11.09
pip install pipenv>2021.11.15
pipenv lock
pipenv sync --dev

build: clean requirements-install
build: clean requirements
python setup.py sdist
python setup.py bdist_wheel

mypy:
mypy --show-error-codes --pretty --ignore-missing-imports --strict zappa tests

black:
black .
black --line-length 127 .

black-check:
black . --check
black --line-length 127 . --check
@echo "If this fails, simply run: make black"

isort:
Expand All @@ -53,24 +53,42 @@ isort-check:

flake:
flake8 zappa --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 zappa --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 zappa --count --exit-zero --max-complexity=55 --max-line-length=127 --statistics --ignore F403,F405,E203,E231,E252,W503

test-docs:
nosetests tests/tests_docs.py --with-coverage --cover-package=zappa --with-timer
pytest tests/tests_docs.py --cov=zappa --durations=0

test-handler:
nosetests tests/test_handler.py --with-coverage --cover-package=zappa --with-timer
pytest tests/test_handler.py --cov=zappa --durations=0

test-middleware:
nosetests tests/tests_middleware.py --with-coverage --cover-package=zappa --with-timer
pytest tests/tests_middleware.py --cov=zappa --durations=0

test-placebo:
nosetests tests/tests_placebo.py --with-coverage --cover-package=zappa --with-timer
pytest tests/tests_placebo.py --cov=zappa --durations=0

test-async:
nosetests tests/tests_async.py --with-coverage --cover-package=zappa --with-timer
pytest tests/tests_async.py --cov=zappa --durations=0

test-general:
nosetests tests/tests.py --with-coverage --cover-package=zappa --with-timer
pytest tests/tests.py --cov=zappa --durations=0

test-utilities:
pytest tests/tests_utilities.py --cov=zappa --durations=0

coverage-report:
coverage report --include="*/zappa*"

tests:
make clean
pytest \
tests/tests_docs.py \
tests/test_handler.py \
tests/tests_middleware.py \
tests/tests_placebo.py \
tests/tests_async.py \
tests/tests.py \
tests/tests_utilities.py \
--cov=zappa
--durations=0

tests: clean test-docs test-handler test-middleware test-placebo test-async test-general
13 changes: 5 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Flask = "*"
isort = "*"
mock = "*"
mypy = "*"
nose = "*"
nose-timer = "*"
pipenv = "==2021.11.09"
pipenv = ">2021.11.15"
packaging = "*"
pytest = "*"
pytest-cov = "*"

[packages]
argcomplete = "*"
boto3 = ">=1.17.28"
durationpy = "*"
future = "*"
hjson = "*"
jmespath = "*"
kappa = "==0.6.0"
Expand All @@ -35,14 +35,11 @@ python-slugify = "*"
PyYAML = "*"
# previous versions don't work with urllib3 1.24
requests = ">=2.20.0"
six = "*"
toml = "*"
tqdm = "*"
troposphere = ">=3.0"
Werkzeug = "*"
wheel = "*"
wsgi-request-logger = "*"

[pipenv]
# Required for 'black' since all of its release tags contain 'b'
allow_prereleases = true
allow_prereleases = false
Loading

0 comments on commit 93295d2

Please sign in to comment.