Skip to content

Refresh Python quickstart for Python 3.12#142

Open
dex-the-ai wants to merge 2 commits intomainfrom
deps/update-2026-05-01-py312
Open

Refresh Python quickstart for Python 3.12#142
dex-the-ai wants to merge 2 commits intomainfrom
deps/update-2026-05-01-py312

Conversation

@dex-the-ai
Copy link
Copy Markdown

Summary

  • bump flask_restx from 1.3.0 to 1.3.2
  • move the verified runtime baseline to Python 3.12 in CI, README, and Dockerfile
  • refresh README command examples to use the documented python3 invocation consistently

Verification

  • cd src && uv venv --seed --python 3.12.13 .venv && source .venv/bin/activate && uv pip install -r requirements.txt
  • cd src && source .venv/bin/activate && python -m pytest ✅ (47 passed with the app running locally on Python 3.12.13)
  • cd src && source .venv/bin/activate && python app.py
  • curl http://127.0.0.1:8080/ ✅ Swagger root served locally
  • curl -X POST http://127.0.0.1:8080/api/v1/airport/airport_walkthrough_20260501 ... ✅ create/read/delete walkthrough passed
  • curl "http://127.0.0.1:8080/api/v1/airline/to-airport?airport=SFO&limit=2"
  • curl "http://127.0.0.1:8080/api/v1/hotel/autocomplete?name=Ritz"
  • cd src && docker build -t python-quickstart:py312 .

Evidence

  • Local Python 3.12.13 verification passed end to end against the local travel-sample bucket.
  • The repo had one pending dependency update in src/requirements.txt: flask-restx 1.3.0 -> 1.3.2.
  • README/runtime drift fixed: the repo was still documented around Python 3.9 while the maintained/tested baseline is now Python 3.12.
  • Visual evidence blocker: this environment did not have an installed browser/screenshot utility, so I captured live Swagger HTML plus request/response walkthrough output instead of a fresh screenshot.
pytest output
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.0.3, pluggy-1.6.0
rootdir: /home/elliot/.openclaw/state/tutorial-maintenance/repos/python-quickstart/src
collected 47 items

tests/test_airline.py ...............                                    [ 31%]
tests/test_airport.py ...............                                    [ 63%]
tests/test_hotel.py ........                                             [ 80%]
tests/test_route.py .........                                            [100%]

============================= 47 passed in 10.90s ==============================
API walkthrough excerpt
# Create airport
{
    "airportname": "Walkthrough Airport",
    "city": "Walkthrough City",
    "country": "Walkthrough Country",
    "faa": "WTA",
    "icao": "WTAS",
    "tz": "Europe/Berlin",
    "geo": {
        "lat": 40,
        "lon": 42,
        "alt": 100
    }
}

# Delete airport
204

# Airlines to SFO
[
    {
        "name": "Air France",
        "iata": "AF",
        "icao": "AFR",
        "callsign": "AIRFRANS",
        "country": "France"
    },
    {
        "name": "AirTran Airways",
        "iata": "FL",
        "icao": "TRS",
        "callsign": "CITRUS",
        "country": "United States"
    }
]
  • tutorial-maintenance/runs/python-quickstart/2026-05-01T163641/verification.md
  • tutorial-maintenance/runs/python-quickstart/2026-05-01T163641/walkthrough-curl.txt
  • tutorial-maintenance/runs/python-quickstart/2026-05-01T163641/docker-build.log

Notes

  • pytest still assumes the Flask app is already running; I did not change that repo behavior in this PR because it is pre-existing and reflected in the current workflow.
  • No fresh maintenance PR was open for this repo when I started this pass.

@dex-the-ai dex-the-ai requested a review from nithishr May 1, 2026 23:44
@dex-the-ai
Copy link
Copy Markdown
Author

Owner ping for this maintenance PR: @nithishr

Requesting review from the manifest-listed owner(s) where GitHub does not already show a pending review request.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the project to Python 3.12, updates the Docker base image to python:3.12-slim-bookworm, and bumps the flask_restx dependency to version 1.3.2. The documentation has been updated to reflect the new version requirements and now uses python3 in command examples. Feedback was provided regarding the switch to python3 in the README, noting that it reduces cross-platform compatibility for Windows users and introduces inconsistencies with other commands in the document.

Comment thread README.md
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