-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
streamlink.plugins: replace global http session by self.session.http #1925
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
Codecov Report
@@ Coverage Diff @@
## master #1925 +/- ##
==========================================
- Coverage 51.57% 51.27% -0.31%
==========================================
Files 242 242
Lines 14246 14155 -91
==========================================
- Hits 7348 7258 -90
+ Misses 6898 6897 -1 |
|
I like it. But, why is this commit 32e2458 included? Shouldn't you rebase on the upstream master to get this included. |
c1caaea to
7722e67
Compare
|
you are still behind https://github.com/Billy2011/streamlink/tree/api-http-fix if you don't want to handle conflicts, this will REMOVE your last commit, but the files won't change small rebase guide update your master branch check the commit it should be change back to api-http-fix you will have to handle conflicts there |
a77f302 to
7722e67
Compare
Global http session obj should not be used because there may be problems with other applications.
|
All PR's end up with me - it is no longer possible to create a PR for streamlink??? |
|
I think it should work now, if you push something to |
|
What's happening here? :D |
|
I've been wondering the same thing all day (•ิ_•ิ)? |
|
How can I fix the test plugins garena + tvplayer? |
tests: fix tests to use session.http
|
Must the global var. |
back-to
left a comment
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.
because this PR basically blocks all other Plugin PR
the decision if a DeprecationWarning of from streamlink.plugin.api import http should be added or not could be done in a different PR,
which would also be better viewable in the commit history.
|
Anything that referrers to the global should be removed. While it won’t help with the thread safety, we will have more control - for example, we could create one session per thread ID (not sure if that’s actually a workable idea). |
|
I think the last reference to api.http is in streamlink.session, should I remove that? |
@Billy2011 Can you post a line reference? Maybe that one will have to be done separately :) |
|
@beardypig, in line 469 api.http = self.http |
|
@Billy2011 I believe that would make it a breaking change. We should open a separate PR for that, and probably keep it open until we are ready for With this PR, there should be nothing using it - but custom plugins might use it, as we provide an API that other people can use this should be considered a break change and will require a major version bump. If there are more breaking changes we want to make we should do those for |
|
OK, then I hope that this PR is ready to merge and no other member raises an objection :) |
beardypig
left a comment
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.
I think it looks OK.
|
Alright let's get this in then, thanks for the hard work @Billy2011, and for the feedback everyone! |
…treamlink#1925) * streamlink.plugins: replace global http session by self.session.http
…treamlink#1925) * streamlink.plugins: replace global http session by self.session.http
…treamlink#1925) * streamlink.plugins: replace global http session by self.session.http
Global http session obj should not be used because there may be problems
with other server/proxy applications.