-
-
Notifications
You must be signed in to change notification settings - Fork 0
♿ widen Python support #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR expands Python version support to CPython 3.8–3.14 and PyPy 3.8–3.11, updates development dependencies, adds Requirements documentation, introduces a Sphinx docs build testenv, and adds new unit tests for policy parameter string handling in query merging and transport operations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
.github/workflows/test.yml(3 hunks)CONTRIBUTING.md(2 hunks)README.rst(1 hunks)docs/index.rst(1 hunks)pyproject.toml(5 hunks)requirements_dev.txt(1 hunks)tests/unit/test_merge_query.py(1 hunks)tests/unit/test_transport.py(2 hunks)tox.ini(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/unit/test_merge_query.py (1)
src/httpx_qs/utils/merge_query.py (1)
merge_query(35-84)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Test (pypy3.11, pypy3.11)
- GitHub Check: Test (pypy3.10, pypy3.10)
- GitHub Check: Test (pypy3.8, pypy3.8)
- GitHub Check: Test (pypy3.9, pypy3.9)
🔇 Additional comments (16)
tests/unit/test_merge_query.py (1)
42-44: LGTM! Good test coverage for string policy values.This test correctly verifies that
merge_queryaccepts string policy values (e.g.,"replace"), complementing the existing parametrized tests that useMergePolicyenum values. The assertion properly validates the replace behavior.CONTRIBUTING.md (1)
14-16: Clear documentation of expanded Python support.The updated version support policy clearly communicates the CPython 3.8–3.14 and PyPy 3.8–3.11 range, and appropriately invites users to report issues with unsupported PyPy builds.
tests/unit/test_transport.py (2)
3-3: LGTM! Necessary imports for new test functionality.The new imports support the added test cases for custom encoding options.
77-108: Excellent test coverage additions.These three new tests effectively cover:
- String-based policy values (
"replace") for consistent API ergonomics- Baseline behavior when no extra params are provided
- Custom
EncodeOptionsapplication withListFormat.BRACKETSproducing URL-encoded bracket syntaxAll tests follow established patterns and include clear assertions.
docs/index.rst (1)
94-99: Well-placed Requirements documentation.The new Requirements section clearly documents supported Python versions and dependency constraints, helping users verify compatibility before installation.
README.rst (1)
94-99: LGTM! Consistent requirements documentation.This Requirements section matches the documentation in
docs/index.rst, ensuring consistent information across user-facing docs.tox.ini (3)
4-14: Well-structured environment expansion.The envlist correctly includes Python 3.8, 3.14, and PyPy 3.8–3.11 variants, aligning with the project's expanded version support goals.
22-32: Correct gh-actions mappings.The GitHub Actions mappings properly associate each Python version with its corresponding tox environment, ensuring CI matrix entries trigger the right test environments.
94-99: Useful docs testenv addition.The new
[testenv:docs]environment enables validation of Sphinx documentation builds, which is valuable for catching documentation build errors early..github/workflows/test.yml (1)
45-66: Comprehensive test matrix expansion.The CI matrix now covers Python 3.8, 3.14, and PyPy 3.8–3.11, ensuring the expanded version support is thoroughly tested. The matrix entries follow the established format and correctly align with the tox.ini configuration.
requirements_dev.txt (1)
2-5: Clarify the pytest version downgrade from 8.3.5 to 8.1.2.The changes are justified for Python 3.8 compatibility:
pytest-cov>=5.0.0(downgrade from 6.0.0): pytest-cov 6.0.0 requires >=3.9 while 5.0.0 requires >=3.8, maintaining Python 3.8 support ✓mypy>=1.10.0(downgrade from 1.15.0): mypy 1.15.0 requires >=3.9 while 1.10.0 requires >=3.8, maintaining Python 3.8 support ✓qs-codec>=1.3.1(upgrade) ✓However, both pytest 8.1.2 and 8.3.5 support >=3.8, so the downgrade to 8.1.2 is not driven by Python version constraints. Please confirm whether this is intentional or if 8.3.5 (or later) should be used instead.
pyproject.toml (5)
11-11: ✓ Python minimum version correctly set to 3.8.Aligns with PR objective to support Python 3.8–3.14 and PyPy 3.8–3.11.
Also applies to: 11-11
20-45: ✓ Classifiers comprehensively updated for expanded version support.Added Python 3.8, 3.14, PyPy implementation, and relevant topic classifiers (CGI Tools/Libraries, Python Modules, Text Processing, Utilities). Development status upgraded to Beta. All changes align with the PR objective.
92-92: ✓ Black target-version correctly expanded for 3.8–3.14 coverage.Configuration now includes py38 through py314, ensuring consistent code formatting across the entire supported Python range.
Also applies to: 92-92
130-130: ✓ MyPy python_version set to minimum supported version.Setting python_version to 3.8 ensures type checking is performed against the minimum supported Python version, which is a best practice for broad version support.
Also applies to: 130-130
48-48: No compatibility issues found.qs-codec 1.3.1 supports CPython 3.8, confirming the version bump from >=1.2.3 to >=1.3.1 is compatible with the minimum Python version.
This pull request expands Python version support and updates documentation, packaging, and tests to reflect these changes. It also adds new test cases and improves development dependencies. The most significant changes are grouped below.
Python Version Support and CI:
.github/workflows/test.yml,tox.ini,pyproject.toml,README.rst,docs/index.rst,CONTRIBUTING.md). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Documentation and Metadata Improvements:
pyproject.toml.README.rstanddocs/index.rstto reflect new Python support. [1] [2]CONTRIBUTING.md.Dependency Updates:
qs-codec,pytest,pytest-cov, andmypyinpyproject.tomlandrequirements_dev.txt. [1] [2]Testing Enhancements:
tests/unit/test_merge_query.pyandtests/unit/test_transport.pyto cover string policy values, unchanged URLs, and custom encode options. [1] [2]testenv:docstotox.inifor building documentation with Sphinx.Tooling:
tool.blackandtool.mypyconfigurations for Python 3.8 compatibility inpyproject.toml. [1] [2]These changes ensure broader compatibility, improved documentation, and better test coverage for the project.
Summary by CodeRabbit
Documentation
Tests
Chores