Skip to content

Move to Python 3.12 base image - #20

Merged
m-messer merged 4 commits into
masterfrom
python-3.12
Nov 6, 2026
Merged

m-messer merged 4 commits into
masterfrom
python-3.12

Conversation

@m-messer

@m-messer m-messer commented Nov 6, 2026

Copy link
Copy Markdown
Member

Why

Changes

  • app/Dockerfile: base image main-3.8 → main-3.12.
  • .github/workflows/staging-deploy.yml: staging test job runs on 3.12 instead of 3.8. test-lint.yml was already on 3.12.
  • readme.md: prerequisite changed to Python 3.12.

Notes

  • On 3.12, pip installs numpy 2.x (3.8 was capped at 1.24). I checked evaluation.py, and shape.py from Size mismatch feedback #19, for numpy APIs removed in 2.0 and found none.
  • numpy and evaluation-function-utils install and import on 3.12, and the local tests pass. pytest only collects test_blank from the current evaluation_test.py; that was already the case before this change.
  • Not verified: I couldn't build the Docker image locally. Deploy to staging and check it before deploying to production.

🤖 Generated with Claude Code

Python 3.8 is out of support on AWS Lambda, and the rolling main-3.8
base image broke prod when 3.9+ syntax landed in the base layer.
Switch to main-3.12 (as compareExpressions uses) and run the staging
test job on 3.12 to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
m-messer and others added 3 commits November 6, 2026 11:34
The Python 3.12 Lambda base image is Amazon Linux 2023, which doesn't
include find, so the chmod step failed with 'find: command not found'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python 3.12's Lambda runtime imports the handler as a module name, so
CMD /app/app.handler became import_module('.app.app') and crashed on
startup (every request returned 500). Use CMD app.handler with
PYTHONPATH=/app, as compareExpressions does, and install pytest for
the healthcheck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base layer's healthcheck imports app.evaluation_tests, so since
the rename in 88052af the deployed healthcheck has reported
tests_passed: false. Add a pytest.ini so CI still discovers the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant