Skip to content

Commit

Permalink
move monkey module to steam.monkey; ValvePython#364
Browse files Browse the repository at this point in the history
  • Loading branch information
rossengeorgiev committed Oct 22, 2021
1 parent 3275225 commit 1cb46e1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions docs/api/steam.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ API Reference
steam.game_servers
steam.globalid
steam.guard
steam.monkey
steam.steamid
steam.webapi
steam.webauth
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------
Expand Down
2 changes: 1 addition & 1 deletion steam/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. 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.
Expand Down
6 changes: 3 additions & 3 deletions steam/client/cdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
.. 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
Expand Down
4 changes: 2 additions & 2 deletions steam/client/monkey.py → steam/monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.. 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
Expand Down

0 comments on commit 1cb46e1

Please sign in to comment.