Modernize project tooling and align urllib3 usage with best practices - #13
Merged
johnbrandborg merged 3 commits intoFeb 20, 2026
Merged
Conversation
Migrate build configuration from setup.cfg/setup.py/ruff.toml into a single pyproject.toml. Adopt uv as the package manager, replacing pip in the Makefile and GitHub Actions workflows. Upgrade minimum Python version from 3.9 (EOL) to 3.10 and add 3.13 to the CI matrix. Integrate Astral's ty static type checker, modernize type hints to Python 3.10+ syntax (X | None, dict, list, tuple), and resolve all 32 reported diagnostics across source and test files. Fix several urllib3 issues identified against current best practices: - Bug: delete() used self.host + uri instead of the normalised url - Bug: auth.py status range < 499 excluded valid 499 client errors - Set cert_reqs explicitly so verify_ssl=False actually disables TLS - Replace global urllib3.request() in auth.py with per-instance PoolManager to avoid shared side effects - Use urllib3.make_headers() for basic auth encoding in core.py - Add allowed_methods to Retry so POST/PATCH operations are retried Co-authored-by: Cursor <cursoragent@cursor.com>
v4 is no longer supported and contains a security vulnerability per the deprecation notice from SonarSource. Co-authored-by: Cursor <cursoragent@cursor.com>
Minor version bump for dropping Python 3.9 support, modernized tooling (pyproject.toml, uv, ty), and urllib3 best-practice fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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.



Summary
pyproject.toml, removingsetup.cfg,setup.py, andruff.toml. Adoptuvas the package manager acrossMakefileand GitHub Actions (both CI and release workflows).tystatic type checker with all 32 diagnostics resolved. Type hints modernised to 3.10+ syntax throughout.delete(), fix an off-by-one status range inauth.py, add explicitcert_reqsforverify_ssl=False, replace the globalurllib3.request()with a per-instancePoolManagerin OAuth2, useurllib3.make_headers()for basic auth, and include POST/PATCH in the retryallowed_methods.Test plan
ruff check-- all checks passedruff format --check-- all files formattedty check-- all checks passedpytest-- 144 tests passed, 99% coverageuv buildMade with Cursor