Skip to content

chore(examples): move the App Engine example to python311 - #1603

Merged
mwbrooks merged 4 commits into
slackapi:mainfrom
davidmreed:emudhra-53119/python-gae
Oct 27, 2026
Merged

mwbrooks merged 4 commits into
slackapi:mainfrom
davidmreed:emudhra-53119/python-gae

Conversation

@davidmreed

@davidmreed davidmreed commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Opened as draft because this moves the App Engine example's language runtime by more than two minor versions (Python 3.8 -> 3.11), and it could not be deployed to App Engine from here.

What changes

  • examples/google_app_engine/flask/app.yaml:1: runtime: python38 -> runtime: python311.
  • Why python311: App Engine's support schedule (updated 2026-10-20) lists the runtimes below.
    • python38 and python39 run on Ubuntu 18.04 (bionic), which has no fixed ca-certificates package.
    • python310 reached end of support on 2026-10-04.
    • python311 runs on Ubuntu 22.04 (jammy), is supported until 2027-10-24, and is the smallest supported step. Google manages the OS image.

Where it ships

  • This is a user template; nothing in this repo deploys it.

Not covered by this PR

  • Pre-existing problem: requirements.txt's Flask>=1.1,<2 already fails to import on the current python38 runtime. Jinja2 2.x imports markupsafe.soft_unicode, which current MarkupSafe removed, so Flask>=3.1.3,<4 (matching requirements/adapter_dev.txt:41) is an owner follow-up.
    • This PR does not change it, because the failure does not depend on the runtime: import flask fails the same way on Python 3.8, 3.10, 3.11 and 3.12.
  • examples/aws_lambda/*_config.yaml:6 still use python3.8 on Amazon Linux 2. There is no fixed package to gate on, and the fix depends on AWS. Owner follow-up.
  • The example Dockerfile base moves are in a separate draft PR (Docker), and the Cloud Functions certifi floor is in a separate PR (Python).

Verification

  • ubuntu:22.04: apt-cache policy ca-certificates shows candidate 20260816ubuntu0.22.04.1, the fixed jammy version. Whether App Engine's python311 image has picked it up is up to Google and was not verified.
  • pip install slack_bolt "Flask>=1.1,<2", then importing flask and slack_bolt.adapter.flask:
    • Result on python:3.8-slim, 3.10-slim, 3.11-slim and 3.12-slim: ImportError: cannot import name 'soft_unicode' from 'markupsafe'.
    • This confirms the Flask failure exists already and does not depend on the runtime.
  • Not verified: an actual App Engine deploy. CI: Python CI is waiting for maintainer approval (fork PR), and it does not cover this example.

🤖 Generated with Claude Code
Part of the eMudhra 53119 CA-distrust remediation (CVE-2026-111943).

…python313

The python38 runtime is EOL and runs on Ubuntu 18.04 (bionic), which has no
fixed ca-certificates package. Flask<2 does not import on Python 3.13
(Jinja2 2.x vs MarkupSafe), so the example's Flask range moves to >=3.1.3,<4,
matching requirements/adapter_dev.txt.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
… keep Flask pin

python311 is the oldest App Engine Python runtime that is still in
support and on Ubuntu 22.04, which has the fixed ca-certificates
package. python39 is on Ubuntu 18.04, and python310 reached end of
support on 2026-10-04. Revert the Flask 1 -> 3 bump: Flask<2 already
fails to import on python38 today (current MarkupSafe has no
soft_unicode), so that breakage is unrelated to the runtime move.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@davidmreed davidmreed changed the title [eMudhra 53119][Python] Move the App Engine example from python38 to python313 [eMudhra 53119][Python] Move the App Engine example from python38 to python311 Oct 22, 2026
@davidmreed
davidmreed marked this pull request as ready for review October 22, 2026 19:57
@davidmreed
davidmreed requested a review from a team as a code owner October 22, 2026 19:57
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.57%. Comparing base (b915daa) to head (00b9281).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1603   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files         228      228           
  Lines        7285     7285           
=======================================
  Hits         6671     6671           
  Misses        614      614           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@zimeg zimeg added area:examples issues related to example or sample code semver:patch labels Oct 26, 2026
@zimeg zimeg added this to the next milestone Oct 26, 2026
@zimeg zimeg changed the title [eMudhra 53119][Python] Move the App Engine example from python38 to python311 chore(examples): move the App Engine example to python311 Oct 26, 2026

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐍 @davidmreed Thanks for calling out adjacent issues in packaging here we might want to address. I think for now this is alright to merge without adding a regression!

@mwbrooks
mwbrooks merged commit 7dd4bb4 into slackapi:main Oct 27, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:examples issues related to example or sample code cla:signed semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants