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

Remove gevent monkeypatching. #287

Open
wants to merge 1 commit into
base: master
from

Conversation

@tomprince
Copy link

@tomprince tomprince commented Sep 9, 2020

For somebody using this package as a library, it would be preferable to leave
whether to monkeypatch gevent into the standard library up to the user, rather
than forcing it on every consumer.

As far as I can tell, the only place that monkeypatching is used, is for
interacting with requests. The only place this is directly used by
the client is in steam.core.CMClient.boostrap_from_webapi, which is
only called on the initial connection. Letting that call be synchronous,
if the user doesn't want to use gevent directly seems reasonable.

For somebody using this package as a library, it would be preferable to leave
whether to monkeypatch gevent into the standard library up to the user, rather
than forcing it on every consumer.

As far as I can tell, the only place that monkeypatching is used, is for
interacting with requests. The only place this is *directly* used by
the client is in `steam.core.CMClient.boostrap_from_webapi`, which is
only called on the initial connection. Letting that call be synchronous,
if the user doesn't want to use gevent directly seems reasonable.
@sonarcloud
Copy link

@sonarcloud sonarcloud bot commented Sep 9, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rossengeorgiev
Copy link
Contributor

@rossengeorgiev rossengeorgiev commented Sep 9, 2020

You are correct. I've been intending to remove monkey patch to make the code easier to use in conjunction with other libraries and features of python. That webapi call, and another webapi method, are the only places where library might needed. Of course the user could be using requests, but it would be more flexible to let them monkey patch if they need to.

@rossengeorgiev
Copy link
Contributor

@rossengeorgiev rossengeorgiev commented Sep 16, 2020

This will also affect CDNClient, which uses requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.