Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres 16/python 3.12 #858

Merged
merged 15 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
version: 2.1
orbs:
codecov: codecov/codecov@3.1.0
aws-cli: circleci/aws-cli@3.1
slack: circleci/slack@4.1
codecov: codecov/codecov@3.3.0
aws-cli: circleci/aws-cli@3.2.0
slack: circleci/slack@4.12.5

jobs:
install_and_update_dependencies:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "Pipfile.lock" }}
- run: &install-pipenv pip install -U pipenv==2023.6.26 urllib3 wheel==0.38.4 pip --quiet --no-input
- run: pipenv install --dev
- run: pipenv sync --dev
- run: pipenv run pipenv check # before save_cache so an insecure cache is never saved
- run: make lambda-layers/DependenciesLayer/requirements.txt
- run: pipenv run collectstatic
Expand All @@ -33,11 +33,11 @@ jobs:

test:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
environment:
CIRCLECI: true
PGHOST: 127.0.0.1
- image: cimg/postgres:12.15
- image: cimg/postgres:16.3
environment:
POSTGRES_USER: postgres
POSTGRES_DB: democracy_club
Expand All @@ -62,11 +62,9 @@ jobs:
path: test-reports
destination: test-reports

# Support for python 3.10 is not yet available for aws-lambda-base-images
# https://github.com/aws/aws-lambda-base-images/issues/31
sam_build:
docker:
- image: public.ecr.aws/sam/build-python3.10:latest
- image: public.ecr.aws/sam/build-python3.12:latest
working_directory: ~/repo
steps:
- checkout
Expand All @@ -82,7 +80,7 @@ jobs:

sam_deploy:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
working_directory: ~/repo/
parameters:
dc-environment:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.12
6 changes: 4 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ markdown-headdown = "==0.1.3"
psycopg2-binary = "==2.9.9"
sentry-sdk = "==1.45.0"
sorl-thumbnail = "==12.10.0"
Django = "==4.2.11"
Pillow = "==10.3.0"
Markdown = "==3.3.7"
feedparser = "==6.0.11"
pytz = "==2024.1"
urllib3 = "<3.0.0"
pre-commit = "*"
django = "==4.2.15"
zipp = "*"
certifi = "*"
Copy link
Member Author

@chris48s chris48s Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Pipenv makes it really hard to upgrade only one package in the lockfile these days


[dev-packages]
vcrpy = "==6.0.1"
Expand All @@ -44,7 +46,7 @@ ruff = "*"
pytest-ruff = "*"

[requires]
python_version = "3.10"
python_version = "3.12"

[scripts]
pytest = "pytest"
Expand Down
37 changes: 20 additions & 17 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 0 additions & 35 deletions deploy.sh

This file was deleted.

3 changes: 0 additions & 3 deletions package-lock.json

This file was deleted.

6 changes: 3 additions & 3 deletions sam-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Resources:
Properties:
ContentUri: ./lambda-layers/DependenciesLayer/
CompatibleRuntimes:
- python3.10
- python3.12
Metadata:
BuildMethod: makefile
RetentionPolicy: Delete
Expand All @@ -101,7 +101,7 @@ Resources:
Handler: democracy_club.lambda_wsgi.handler
Layers:
- !Ref DependenciesLayer
Runtime: python3.10
Runtime: python3.12
MemorySize: 512
Environment:
Variables:
Expand Down Expand Up @@ -138,7 +138,7 @@ Resources:
Handler: democracy_club.lambda_manage.management_handler
Layers:
- !Ref DependenciesLayer
Runtime: python3.10
Runtime: python3.12
MemorySize: 512
Environment:
Variables:
Expand Down
71 changes: 0 additions & 71 deletions zappa_settings.json

This file was deleted.