Browse Source

move monkey module to steam.monkey; #364

pull/374/head
Rossen Georgiev 4 years ago
parent
commit
1cb46e181d
  1. 5
      CHANGES.md
  2. 0
      docs/api/steam.monkey.rst
  3. 1
      docs/api/steam.rst
  4. 2
      docs/user_guide.rst
  5. 2
      steam/client/__init__.py
  6. 6
      steam/client/cdn.py
  7. 4
      steam/monkey.py

5
CHANGES.md

@ -4,9 +4,10 @@
This release brings breaking changes
### steam.cleint
### steam.client
- Removed monkey patching by default. See `steam.client.monkey` for details
- Add `steam.monkey` module for applying gevent monkey patches
- Removed monkey patching by default. See `steam.monkey` for details
## 1.0.0

0
docs/api/steam.client.monkey.rst → docs/api/steam.monkey.rst

1
docs/api/steam.rst

@ -11,6 +11,7 @@ API Reference
steam.game_servers
steam.globalid
steam.guard
steam.monkey
steam.steamid
steam.webapi
steam.webauth

2
docs/user_guide.rst

@ -155,7 +155,7 @@ The library comes with some Steam client features implemented, see :doc:`api/ste
.. warning::
:class:`.SteamClient` no longer applies gevent monkey patches by default.
See :mod:`steam.client.monkey` for details how make stdlib gevent cooperative.
See :mod:`steam.monkey` for details how make stdlib gevent cooperative.
CLI example
-----------

2
steam/client/__init__.py

@ -4,7 +4,7 @@ Implementation of Steam client based on ``gevent``
.. warning::
``steam.client`` no longer patches stdlib to make it gevent cooperative.
This provides flexibility if you want to use :class:`.SteamClient` with async or other modules.
If you want to monkey patch anyway use :meth:`steam.client.monkey.patch_minimal()`
If you want to monkey patch anyway use :meth:`steam.monkey.patch_minimal()`
.. note::
Additional features are located in separate submodules. All functionality from :mod:`.builtins` is inherited by default.

6
steam/client/cdn.py

@ -5,12 +5,12 @@ Initializing :class:`.CDNClient` requires a logged in :class:`.SteamClient` inst
.. warning::
This module uses :mod:`requests` library, which is not gevent cooperative by default.
It is high recommended that you use :meth:`steam.client.monkey.patch_minimal()`.
It is high recommended that you use :meth:`steam.monkey.patch_minimal()`.
See example below
.. code:: python
import steam.client.monkey
steam.client.monkey.patch_minimal()
import steam.monkey
steam.monkey.patch_minimal()
from steam.client import SteamClient, EMsg
from steam.client.cdn import CDNClient

4
steam/client/monkey.py → steam/monkey.py

@ -7,8 +7,8 @@ See :mod:`gevent.monkey` for details
.. code:: python
import steam.client.monkey
steam.client.monkey.patch_minimal()
import steam.monkey
steam.monkey.patch_minimal()
import requests
from steam.client import SteamClient, EMsg
Loading…
Cancel
Save