Skip to content
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

Fix incompatibility with httpx>=0.28 #52

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

daniel-k
Copy link
Member

In httpx==0.28.0, the handling of GET query parameters has changed in a backwards-incompatible way. The new behaviour is to replace query parameters in the URL when parameters are passed via the params kwarg. Our pagination code expects that parameters in the URL get merged with the additional parameters of the params kwarg. This PR explicitly implements the old behaviour of merging params to fix compatibility with recent releases of httpx.

refs:

In version 0.28` of `httpx`, the handling of GET query parameters has
changed in a backwards-incompatible way. The new behaviour is to replace
query parameters in the URL when parameters are passed via the `params`
kwarg. Our pagination code expects that parameters in the URL get merged
with the additional parameters of the `params` kwarg. This PR explicitly
implements the old behaviour of merging params to fix compatibility with
recent releases of `httpx`.
Copy link

Coverage results

This is the coverage report for commit 517b6a3

Name                                                                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------------------------------------
.tox/py/lib/python3.12/site-packages/enlyze/__init__.py                                 4      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/base.py                        71      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/production_runs/client.py      20      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/production_runs/models.py      52      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/timeseries/client.py           19      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/timeseries/models.py           44      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/auth.py                                    13      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/client.py                                 108      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/constants.py                                8      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/errors.py                                   4      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/iterable_tools.py                           7      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/models.py                                 117      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/schema.py                                  25      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/validators.py                              38      0   100%
-----------------------------------------------------------------------------------------------------------------
TOTAL                                                                                 530      0   100%

4 empty files skipped.

@daniel-k daniel-k merged commit b188f07 into master Jan 16, 2025
12 checks passed
@daniel-k daniel-k deleted the fix/httpx-regression branch January 16, 2025 14:52
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.

2 participants