Fix httpx usage so it follows redirects #808
Open
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.
Fix httpx usage so it follows redirects
Description
Earlier today, I bumped the
httpx
dependency from version 0.19.0 to the latest version 0.23.1.From Spleeter’s point of view, that version bump includes a breaking change, because since version 0.20.0, httpx no longer follows redirects by default. Instead, it treats the 3xx status family as a hard error. (See issue #686 for a real-life example.)
This PR sets the
follow_redirects
flag to prepare for that breaking change.It also bumps httpx to the latest stable version in order to make sure the latest features and bugfixes are present.
Update: Fixed the description after I realized that I bumped the version of httpx.
How this patch was tested
This PR fixes the
tests/test_separator.py
tests, which failed reliably for me without the patch.poetry run pytest tests/
(Tests already exist, seetest_separator.py
)poetry run black spleeter
Documentation link and external references
For more details, see: https://www.python-httpx.org/compatibility/#redirects