Skip to content

stream: fix signatures of Stream classes & methods #5429

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

Merged
merged 2 commits into from
Jul 9, 2023

Conversation

bastimeyer
Copy link
Member

Two commits:

  1. A correction of d314c5b which shouldn't go into a stable release like this. The parameter removal is not a breaking change since it was only added to master so far.

    Any keywords arguments now get passed to HLSStream and MuxedHLSStream using the already existing variable keyword arguments (**kwargs) which then get filtered when making HTTP session calls.

    This also cleans up the API documentation a bit by having consistent names.

  2. A "light" breaking change:

    The session_ argument was named that way during the Livestreamer project because session was supposed to be included in the variable keyword arguments (**kwargs) because of (an old version of) requests (see 0308347 and 39008e9).

    Positional-only / keyword-only arguments have only become available with the drop of py37, so technically, all these classes/methods could've been called/initialized using the session_ keyword instead of just setting a positional argument, but that's very unlikely for 3rd party implementors to do that. I've decided against defining the arguments as positional-only / keyword-only now, because it's not really important.

    I'm going to add the name change to the list of breaking changes, even though it's a really minor change and basically just a fix for something annoying that should've been changed a long time ago.
    release: 6.0.0 tracking issue #5401

- Revert `keywords` arg added to `HLSStream.parse_variant_playlist()`
  in d314c5b
- Filter all variable keyword arguments before making any HTTP session
  calls or storing the request args dict
- Make variable keyword arguments of all common public Stream methods
  consistent by renaming them to "kwargs"
@bastimeyer bastimeyer merged commit e9a29c4 into streamlink:master Jul 9, 2023
@bastimeyer bastimeyer deleted the stream/signatures branch July 9, 2023 18:50
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.

2 participants