Browse Source

rename steam.util to steam.utils

pull/254/head
Rossen Georgiev 5 years ago
parent
commit
e5e1130e6b
  1. 3
      CHANGES.md
  2. 2
      docs/api/steam.rst
  3. 24
      docs/api/steam.utils.rst
  4. 2
      steam/client/__init__.py
  5. 2
      steam/client/builtins/apps.py
  6. 2
      steam/client/builtins/gameservers.py
  7. 4
      steam/client/builtins/leaderboards.py
  8. 2
      steam/client/builtins/unified_messages.py
  9. 2
      steam/client/builtins/user.py
  10. 2
      steam/client/builtins/web.py
  11. 2
      steam/client/cdn.py
  12. 2
      steam/client/gc.py
  13. 2
      steam/core/cm.py
  14. 2
      steam/core/manifest.py
  15. 2
      steam/core/msg/headers.py
  16. 2
      steam/core/msg/structs.py
  17. 2
      steam/game_servers.py
  18. 2
      steam/guard.py
  19. 2
      steam/steamid.py
  20. 0
      steam/utils/__init__.py
  21. 0
      steam/utils/binary.py
  22. 0
      steam/utils/throttle.py
  23. 0
      steam/utils/web.py
  24. 2
      steam/webapi.py
  25. 2
      steam/webauth.py

3
CHANGES.md

@ -2,13 +2,14 @@
## 1.0.0 ## 1.0.0
This release brings some breaking changes This release brings breaking changes
### General ### General
- Replaced `cryptography` library with `pycryptodomex` - Replaced `cryptography` library with `pycryptodomex`
- Updated all enums - Updated all enums
- Removed imports from 'steam' namespace - Removed imports from 'steam' namespace
- Renamed `steam.util` to `steam.utils`
### steam.steamid ### steam.steamid

2
docs/api/steam.rst

@ -14,4 +14,4 @@ API Reference
steam.steamid steam.steamid
steam.webapi steam.webapi
steam.webauth steam.webauth
steam.util steam.utils

24
docs/api/steam.util.rst → docs/api/steam.utils.rst

@ -1,31 +1,31 @@
util utils
==== =====
.. automodule:: steam.util .. automodule:: steam.utils
:members: :members:
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
util.binary utils.binary
----------- ------------
.. automodule:: steam.util.binary .. automodule:: steam.utils.binary
:members: :members:
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
util.throttle utils.throttle
------------- --------------
.. automodule:: steam.util.throttle .. automodule:: steam.utils.throttle
:members: :members:
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
util.web utils.web
-------- ---------
.. automodule:: steam.util.web .. automodule:: steam.utils.web
:members: :members:
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:

2
steam/client/__init__.py

@ -31,7 +31,7 @@ from steam.core.crypto import sha1_hash
from steam.steamid import SteamID from steam.steamid import SteamID
from steam.exceptions import SteamError from steam.exceptions import SteamError
from steam.client.builtins import BuiltinBase from steam.client.builtins import BuiltinBase
from steam.util import ip_from_int, ip_to_int, proto_fill_from_dict from steam.utils import ip_from_int, ip_to_int, proto_fill_from_dict
if six.PY2: if six.PY2:
_cli_input = raw_input _cli_input = raw_input

2
steam/client/builtins/apps.py

@ -2,7 +2,7 @@ import vdf
from steam.enums import EResult, EServerType from steam.enums import EResult, EServerType
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.core.msg import MsgProto from steam.core.msg import MsgProto
from steam.util import ip_from_int, proto_fill_from_dict from steam.utils import ip_from_int, proto_fill_from_dict
class Apps(object): class Apps(object):

2
steam/client/builtins/gameservers.py

@ -38,7 +38,7 @@ from steam.steamid import SteamID
from steam.core.msg import MsgProto from steam.core.msg import MsgProto
from steam.enums import EResult from steam.enums import EResult
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.util import ip_to_int, ip_from_int, proto_to_dict from steam.utils import ip_to_int, ip_from_int, proto_to_dict
class GameServers(object): class GameServers(object):

4
steam/client/builtins/leaderboards.py

@ -5,8 +5,8 @@ import logging
from steam.core.msg import MsgProto from steam.core.msg import MsgProto
from steam.enums import EResult, ELeaderboardDataRequest, ELeaderboardSortMethod, ELeaderboardDisplayType from steam.enums import EResult, ELeaderboardDataRequest, ELeaderboardSortMethod, ELeaderboardDisplayType
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.util import _range, chunks from steam.utils import _range, chunks
from steam.util.throttle import ConstantRateLimit from steam.utils.throttle import ConstantRateLimit
class Leaderboards(object): class Leaderboards(object):

2
steam/client/builtins/unified_messages.py

@ -27,7 +27,7 @@ The backend might error out, but we still get response. Here is how to check for
""" """
from steam.core.msg import MsgProto, get_um from steam.core.msg import MsgProto, get_um
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.util import proto_fill_from_dict from steam.utils import proto_fill_from_dict
class UnifiedMessages(object): class UnifiedMessages(object):

2
steam/client/builtins/user.py

@ -3,7 +3,7 @@ from steam.client.user import SteamUser
from steam.enums import EPersonaState, EChatEntryType, EType, EClientUIMode from steam.enums import EPersonaState, EChatEntryType, EType, EClientUIMode
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.core.msg import MsgProto from steam.core.msg import MsgProto
from steam.util import proto_fill_from_dict from steam.utils import proto_fill_from_dict
class User(object): class User(object):
EVENT_CHAT_MESSAGE = 'chat_message' EVENT_CHAT_MESSAGE = 'chat_message'

2
steam/client/builtins/web.py

@ -5,7 +5,7 @@ from steam import webapi
from steam.core.msg import MsgProto from steam.core.msg import MsgProto
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.core.crypto import generate_session_key, symmetric_encrypt from steam.core.crypto import generate_session_key, symmetric_encrypt
from steam.util.web import make_requests_session, generate_session_id from steam.utils.web import make_requests_session, generate_session_id
class Web(object): class Web(object):

2
steam/client/cdn.py

@ -99,7 +99,7 @@ from steam.exceptions import SteamError
from steam.core.msg import MsgProto from steam.core.msg import MsgProto
from steam.enums import EResult, EType from steam.enums import EResult, EType
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.util.web import make_requests_session from steam.utils.web import make_requests_session
from steam.core.crypto import symmetric_decrypt, symmetric_decrypt_ecb from steam.core.crypto import symmetric_decrypt, symmetric_decrypt_ecb
from steam.core.manifest import DepotManifest, DepotFile from steam.core.manifest import DepotManifest, DepotFile
from steam.protobufs.content_manifest_pb2 import ContentManifestPayload from steam.protobufs.content_manifest_pb2 import ContentManifestPayload

2
steam/client/gc.py

@ -40,7 +40,7 @@ protobufs needed to (de)serialize message for communication with GC.
import logging import logging
import gevent import gevent
from eventemitter import EventEmitter from eventemitter import EventEmitter
from steam.util import set_proto_bit, clear_proto_bit, is_proto from steam.utils import set_proto_bit, clear_proto_bit, is_proto
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.enums import EResult from steam.enums import EResult
from steam.core.msg import GCMsgHdr, GCMsgHdrProto, MsgProto from steam.core.msg import GCMsgHdr, GCMsgHdrProto, MsgProto

2
steam/core/cm.py

@ -19,7 +19,7 @@ from steam.core import crypto
from steam.core.connection import TCPConnection from steam.core.connection import TCPConnection
from steam.core.msg import Msg, MsgProto from steam.core.msg import Msg, MsgProto
from eventemitter import EventEmitter from eventemitter import EventEmitter
from steam.util import ip_from_int, is_proto, clear_proto_bit from steam.utils import ip_from_int, is_proto, clear_proto_bit
class CMClient(EventEmitter): class CMClient(EventEmitter):

2
steam/core/manifest.py

@ -9,7 +9,7 @@ import os.path
from steam.enums import EDepotFileFlag from steam.enums import EDepotFileFlag
from steam.core.crypto import symmetric_decrypt from steam.core.crypto import symmetric_decrypt
from steam.util.binary import StructReader from steam.utils.binary import StructReader
from steam.protobufs.content_manifest_pb2 import (ContentManifestMetadata, from steam.protobufs.content_manifest_pb2 import (ContentManifestMetadata,
ContentManifestPayload, ContentManifestPayload,
ContentManifestSignature) ContentManifestSignature)

2
steam/core/msg/headers.py

@ -3,7 +3,7 @@ import struct
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.protobufs import steammessages_base_pb2 from steam.protobufs import steammessages_base_pb2
from steam.protobufs import gc_pb2 from steam.protobufs import gc_pb2
from steam.util import set_proto_bit, clear_proto_bit from steam.utils import set_proto_bit, clear_proto_bit
class MsgHdr: class MsgHdr:

2
steam/core/msg/structs.py

@ -5,7 +5,7 @@ import vdf
from six.moves import range from six.moves import range
from steam.enums import EResult, EUniverse from steam.enums import EResult, EUniverse
from steam.enums.emsg import EMsg from steam.enums.emsg import EMsg
from steam.util.binary import StructReader from steam.utils.binary import StructReader
_emsg_map = {} _emsg_map = {}

2
steam/game_servers.py

@ -132,7 +132,7 @@ from re import match as _re_match
from struct import pack as _pack, unpack_from as _unpack_from from struct import pack as _pack, unpack_from as _unpack_from
from time import time as _time from time import time as _time
from enum import IntEnum from enum import IntEnum
from steam.util.binary import StructReader as _StructReader from steam.utils.binary import StructReader as _StructReader
__all__ = ['query_master', 'a2s_info', 'a2s_players', 'a2s_rules', 'a2s_ping'] __all__ = ['query_master', 'a2s_info', 'a2s_players', 'a2s_rules', 'a2s_ping']

2
steam/guard.py

@ -58,7 +58,7 @@ from steam.steamid import SteamID
from steam.core.crypto import hmac_sha1, sha1_hash from steam.core.crypto import hmac_sha1, sha1_hash
from steam.enums.common import EResult from steam.enums.common import EResult
from steam.webauth import MobileWebAuth from steam.webauth import MobileWebAuth
from steam.util import proto_to_dict from steam.utils import proto_to_dict
class SteamAuthenticator(object): class SteamAuthenticator(object):

2
steam/steamid.py

@ -4,7 +4,7 @@ import re
import requests import requests
from steam.enums.base import SteamIntEnum from steam.enums.base import SteamIntEnum
from steam.enums import EType, EUniverse, EInstanceFlag from steam.enums import EType, EUniverse, EInstanceFlag
from steam.util.web import make_requests_session from steam.utils.web import make_requests_session
if sys.version_info < (3,): if sys.version_info < (3,):
intBase = long intBase = long

0
steam/util/__init__.py → steam/utils/__init__.py

0
steam/util/binary.py → steam/utils/binary.py

0
steam/util/throttle.py → steam/utils/throttle.py

0
steam/util/web.py → steam/utils/web.py

2
steam/webapi.py

@ -31,7 +31,7 @@ All globals params (``key``, ``https``, ``format``, ``raw``) can be specified on
} }
""" """
import json as _json import json as _json
from steam.util.web import make_requests_session as _make_session from steam.utils.web import make_requests_session as _make_session
class APIHost(object): class APIHost(object):
"""Enum of currently available API hosts.""" """Enum of currently available API hosts."""

2
steam/webauth.py

@ -63,7 +63,7 @@ import requests
from steam import webapi from steam import webapi
from steam.steamid import SteamID from steam.steamid import SteamID
from steam.util.web import make_requests_session, generate_session_id from steam.utils.web import make_requests_session, generate_session_id
from steam.core.crypto import rsa_publickey, pkcs1v15_encrypt from steam.core.crypto import rsa_publickey, pkcs1v15_encrypt
if six.PY2: if six.PY2:

Loading…
Cancel
Save