From 4ae90ef6bcd089cb6066837486c56b60b5b0b4e1 Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Tue, 8 Sep 2020 20:53:56 -0600 Subject: [PATCH] Remove gevent monkeypatching. 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. --- CHANGES.md | 9 +++++++++ steam/client/__init__.py | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e6fcbbb..67569bf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,14 @@ # Change notes +## 2.0.0 (in progress) + +This release brings breaking changes + +### steam.client + +- Importing `steam.client` no longer automatically patches `socket or `ssl` to + use gevent. + ## 1.0.0 This release brings breaking changes diff --git a/steam/client/__init__.py b/steam/client/__init__.py index 1a21d21..11706c2 100644 --- a/steam/client/__init__.py +++ b/steam/client/__init__.py @@ -8,11 +8,6 @@ Implementation of Steam client based on ``gevent`` Optional features are available as :mod:`.mixins`. This allows the client to remain light yet flexible. """ -import gevent -import gevent.monkey -gevent.monkey.patch_socket() -gevent.monkey.patch_ssl() - import os import json from random import random