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

tests: fix Accept-Encoding headers in stream_json #4022

Merged

Conversation

bastimeyer
Copy link
Member

Fixes #4021


requests 2.26.0:
psf/requests@5351469

When the brotli or brotlicffi packages are installed,
urllib3.util.make_headers() inserts ',br' in the Accept-Encoding header
and decodes br from the answers.

Copy link
Collaborator

@back-to back-to left a comment

Choose a reason for hiding this comment

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

sidenote: tests will fail with lower requests version

it is set requests>=2.26.0 so it might be okay.

https://github.com/streamlink/streamlink/blob/master/setup.py#L13

@bastimeyer
Copy link
Member Author

If someone installs/packages streamlink with invalid dependencies, then this is not our problem.
The change was introduced in requests 2.26.0, and Streamlink requires at least requests 2.26.0, so this will be fine.

@bastimeyer bastimeyer merged commit 57023b1 into streamlink:master Sep 16, 2021
@bastimeyer bastimeyer deleted the tests/requests-accept-encoding branch September 16, 2021 08:07
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests failing on tests/test_stream_json.py
2 participants