Skip to content

Sync python-microservices-with-grpc with the updated tutorial - #957

Merged
realpython-bot merged 1 commit into
masterfrom
maintenance/python-microservices-grpc-20261130
Nov 30, 2026
Merged

realpython-bot merged 1 commit into
masterfrom
maintenance/python-microservices-grpc-20261130

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Syncs python-microservices-with-grpc/ with the maintenance update of Python Microservices With gRPC.

What changed

  • marketplace/requirements.txt: flask==3.1.3, grpcio-tools==1.85.4, Jinja2==3.1.6, pytest==9.2.0. Flask 1.1 and Jinja2 2.11 no longer import alongside current MarkupSafe (soft_unicode was removed), and pytest 5.4 can't collect tests on Python 3.14 (ast.Str is gone).
  • recommendations/requirements.txt: grpc-interceptor==0.15.4, grpcio-tools==1.85.4, pytest==9.2.0. grpc-interceptor 0.11/0.12 ship testing protos that current protobuf refuses to load.
  • Regenerated recommendations_pb2.py / recommendations_pb2_grpc.py in both services with grpcio-tools 1.85.4 (protobuf 7 gencode). The old generated modules fail on the protobuf 7 runtime. I kept the # flake8: noqa header the old files had.
  • docker-compose.yaml: dropped the obsolete top-level version: "3.8" key, which current Compose warns about.
  • build_and_run.sh, integration_tests.sh: docker-compose changed to docker compose (Compose v2), the same change the tutorial got.

Draft article: https://realpython.com/pbjt/blog/post/2739/change/
Maintenance card: https://trello.com/c/uOraotsv

How it was verified

On Python 3.14.10, in a fresh venv with the pinned requirements of both services:

  • gen_certs.sh generated the CA and the client and server certs.
  • recommendations/ pytest: 1 passed.
  • Ran recommendations.py (mutual TLS on :443) and the Flask marketplace with RECOMMENDATIONS_HOST=recommendations. marketplace_integration_test.py passed: the home page returned HTTP 200 with three <li> items.
  • ruff format --check and ruff check (ruff 0.14.1, the repo's pin) both pass.

I couldn't test the Docker image builds and docker compose because there's no Docker in the verification VM.

🤖 Generated with Claude Code

…thon Microservices With gRPC

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realpython-bot
realpython-bot merged commit 10df10d into master Nov 30, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-microservices-grpc-20261130 branch November 30, 2026 07:01
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