Skip to content

fix(python)!: require patched HTTP dependencies and Python 3.10 - #2145

Merged
ChiragAgg5k merged 2 commits into
mainfrom
fix/python-secure-dependency-minimums
Oct 24, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
fix/python-secure-dependency-minimums

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Generated Python packages currently permit arbitrary Requests versions and allow Requests to resolve older urllib3 versions. Existing environments can therefore retain dependency versions with known advisories even when installing the latest SDK.

Require Requests >=2.34.2,<3 and urllib3 >=2.8.0,<3 in both packaging formats and the generated test requirements. These patched releases require Python 3.10+, so raise the SDK interpreter minimum consistently in packaging metadata, README, publishing workflow, formatter configuration and CI. Existing Python 3.10–3.13 E2E coverage remains.

Breaking compatibility change: Python 3.9 is no longer supported. The downstream Python SDK rollout must use a major release; this PR does not claim the currently published SDK has been remediated.

Validation:

  • Regenerated Python output; Black checks pass for 73 generated files.
  • Generation: 171 tests, 2,187 assertions, four skips. The Python metadata regression fails with the previous templates and passes after the change.
  • Python 3.10 E2E: 207 assertions pass against the mock API.
  • Built a wheel and inspected Requires-Python and Requires-Dist; both dependency minimums are present.
  • Installation at the exact Requests/urllib3 minimums succeeds. Resolver checks reject Requests 2.32.5, urllib3 2.6.3 and Python 3.9.
  • pip-audit: zero matches across 21 auditable packages; the generated local fixture package (appwrite 0.0.0) is skipped because it is not on PyPI. OSV queries also return no matches for the two selected dependency floors.
  • Changed-path PHPStan, PHP_CodeSniffer, Rector and Twig lint pass. Standards and Spec reviews found no blockers.

CI follow-up: refreshed the Web lockfile with ./scripts/update-lockfiles.sh web to fix the serialize-javascript audit failure (7.1.2 → 7.1.4; the script also resolves ignore 7.0.14). The root Python support table now matches the 3.10 minimum. Web client and console validation both pass locally, including npm ci, npm audit, formatting, lint, types, build and CDN build. Hansi approved final head at Tier S with the documentation finding resolved and zero remaining findings. Node and React Native register separate lockfile templates and are unaffected by this lockfile refresh.

No redirect/TLS transport behavior is changed here; that remains in separately owned #2131. The older Snyk PRs in sdk-for-python target historical exact pins and are not a substitute for enforcing current package minimums.

References: Requests advisory, urllib3 streaming advisory. Applicability depends on affected API usage; no production exploit is claimed.

Security tracker: https://github.com/appwrite-labs/cloud/issues/6887

Tracks appwrite-labs/cloud#6887

@hansi-codes

hansi-codes Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The current changes address the outstanding README support-table mismatch and introduce no additional issues.

The Python SDK packaging templates now require Python 3.10+ and enforce minimum versions for Requests and urllib3 in both packaging formats and generated test requirements. The Python 3.9 E2E target was removed, and generation coverage checks the emitted metadata. The README support table now reflects the new Python floor, and the Web lockfile includes updated transitive dependency versions.

Latest changes: The newest commits update the repository support table to Python 3.10+ and refresh the Web lockfile's ignore and serialize-javascript dependencies.

Verdict New comments Fixed Still open
✅ Approved 0 1 0
📂 Walkthrough · 10
File Change
.github/workflows/ci.yml Removes Python 3.9 from the E2E CI matrix.
README.md Updates the listed minimum Python version to 3.10.
templates/python/.github/workflows/publish.yml.twig Runs Python package publishing with Python 3.10.
templates/python/README.md.twig Documents Python 3.10+ as the generated SDK requirement.
templates/python/pyproject.toml.twig Raises the Python minimum and constrains Requests and urllib3 versions.
templates/python/requirements.txt.twig Adds Requests and urllib3 minimums to generated test requirements.
templates/python/setup.py.twig Raises the Python minimum and constrains Requests and urllib3 versions.
templates/web/package-lock.json.twig Refreshes locked versions of ignore and serialize-javascript.
tests/e2e/Python39Test.php Removes the Python 3.9 E2E test target.
tests/generation/GenerationTest.php Checks generated Python metadata and test requirements for the new floors.
✅ Fixed since the last review · 1
  • Update the top-level Python support table too · templates/python/README.md.twig:24

Reviewed the commits since 0869db7 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · Looks good to merge. Summary

Comment thread templates/python/README.md.twig
@ChiragAgg5k ChiragAgg5k self-assigned this Oct 24, 2026

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit be65dd1 into main Oct 24, 2026
60 checks passed
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