Repository navigation
Upgrade to Python 3.12 base layer - #80
Merged
Merged
Conversation
- Base image baseevalutionfunctionlayer:main-3.8 -> main-3.12 (AL2023: dnf git+findutils, PYTHONPATH, pytest for healthcheck, module-style CMD) - Rename evaluation_test.py/preview_test.py -> *_tests.py so the base layer healthcheck can import them - Workflows copied from survey: Python 3.12, deploy.yml@main, PR-triggered test-lint, database tests on production deploy; staging/production target master (default branch) - Add pytest.ini Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sympy 1.10.1's parse_expr mishandles '!' (factorial) and some unicode tokens under Python 3.12's new tokenize module (PEP 701), failing test_exclamation_mark_for_factorial and test_error_inappropriate_symbol[-inf]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These are pytest-style test classes; under the *_tests.py names the base layer's unittest-based healthcheck imports and instantiates them and errors with 'TestEvaluationFunction() takes no arguments'. CI still collects them via pytest.ini. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reject non-identifier symbols on Python 3.12 (stacked on #80)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves off
baseevalutionfunctionlayer:main-3.8(Python 3.8 runtime, deprecated; the base layer has stopped building the 3.8 image).app/Dockerfile:main-3.12, the same recipe as survey.yum install gitbecomesdnf install git findutils; also addsPYTHONPATH=/app, pytest, andCMD ["app.handler"]sympy1.10.1 changed to 1.12.1 for Python 3.12 tokenizer compatibility (fixes3!factorial parsing)evaluation_test.py/preview_test.pynames. These are pytest-style classes, and the base layer's unittest healthcheck can't run them; CI collects them viapytest.inideploy.yml@maininstead of@deploy-request(main already contains everything from it), andrun-database-tests: trueon production deploymaster(the repo's default branch; it used to trigger onmain). The productionbranchinput now defaults tomasterpytest.iniand updated the README Python versionMerge #81 into this branch first. It fixes the last 3.12 test failure (
-∞with strict syntax).Testing (the branch, together with #81, deployed to staging; not tested locally):
3!and-∞e^(-x)(A cos x + B sin x)case hit the 30s gateway limit). The harness then crashed while saving its 495 feedback-text warnings to Firestore (an empty-key bug in Database-Testing). Warnings at that level are normal (compareExpressions logs thousands)TEST_API_ENDPOINTrepo secret set to thesymbolicEqual-stagingURL sopre_production_tests.ymlworks🤖 Generated with Claude Code