diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c89285..bf226af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.10](https://github.com/janaSunrise/HypixelIO/releases/tag/v1.2.10) - 27-05-2021 + +## Fixes + +- Fix import errors when not using Caching, By installing caching modules without backend + to prevent bloat. +- Fix the caching issues in the library internally and fix them. + ## [1.2.9](https://github.com/janaSunrise/HypixelIO/releases/tag/v1.2.9) - 27-05-2021 ## Fixes diff --git a/README.md b/README.md index 2700da5..5ad2a1b 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,10 @@ A Modern Efficient and Easy way of interacting with the Hypixel API! - Full API coverage ## 🚀 Installing -Note: **Python 3.7 or above is required!** +**Note**: **Python 3.7 or above is required!** +**Note**: This library has caching modules downloaded when installed. If you need more + adapters support, You should refer to the extra requires below. + ```bash # Windows py -3 -m pip install -U HypixelIO @@ -102,10 +105,10 @@ python3 -m pip install -U git+https://github.com/janaSunrise/HypixelIO # Or use [speedups] to speed up only for async features python3 -m pip install -U "HypixelIO[speedups]" -# Take advantage of caching +# Take advantage of caching by installing caching backends python3 -m pip install -U "HypixelIO[cache]" -# If you need async caching for AsyncClient +# If you need async caching for AsyncClient by installing caching backends python3 -m pip install -U "HypixelIO[async-cache]" # Or get all the features! diff --git a/hypixelio/__init__.py b/hypixelio/__init__.py index 59a5a85..934a5f9 100644 --- a/hypixelio/__init__.py +++ b/hypixelio/__init__.py @@ -7,7 +7,7 @@ __author__ = "Sunrit Jana" __email__ = "warriordefenderz@gmail.com" -__version__ = "1.2.9" +__version__ = "1.2.10" __license__ = "MIT License" __copyright__ = "Copyright 2021 Sunrit Jana" diff --git a/hypixelio/lib/client.py b/hypixelio/lib/client.py index 14a9d16..be8608e 100644 --- a/hypixelio/lib/client.py +++ b/hypixelio/lib/client.py @@ -72,7 +72,7 @@ def __init__( self, api_key: t.Union[str, list], cache: bool = False, - cache_config: caching.Caching = None, + cache_config: t.Optional[caching.Caching] = None, ) -> None: """ Parameters diff --git a/hypixelio/models/caching/caching.py b/hypixelio/models/caching/caching.py index c658bf8..7d07651 100644 --- a/hypixelio/models/caching/caching.py +++ b/hypixelio/models/caching/caching.py @@ -4,7 +4,7 @@ class Caching: - """The Caching model for the Hypixel requests to be made and cached to save the request calls..""" + """The Caching model for the Hypixel requests to be made and cached to save the request calls.""" def __init__( self, diff --git a/setup.py b/setup.py index 182d4e0..c40bd03 100644 --- a/setup.py +++ b/setup.py @@ -21,25 +21,37 @@ extras_require = { "speedups": ["aiodns>=1.1", "Brotli==1.0.9", "cchardet==2.1.7"], - "cache": ["requests-cache==0.6.3", "boto3==1.17.82", "pymongo==3.11.4", "redis==3.5.3"], - "async-cache": ["aiohttp-client-cache==0.4.0", "aiosqlite==0.17.0", "motor==2.4.0", "aioredis==1.3.1"], + "cache": ["boto3==1.17.82", "pymongo==3.11.4", "redis==3.5.3"], + "async-cache": ["aiosqlite==0.17.0", "motor==2.4.0", "aioredis==1.3.1"], } extras_require["all"] = list(chain.from_iterable(extras_require.values())) setuptools.setup( name="HypixelIO", version=VERSION, + author="Sunrit Jana", author_email="warriordefenderz@gmail.com", + description="A modern, efficient and faster way of interacting with the Hypixel API!", long_description=README, long_description_content_type="text/markdown", + license="GPL v3", + url=URL, project_urls={"Documentation": URL, "Issue tracker": f"{URL}/issues"}, + packages=setuptools.find_packages(exclude=["tests", "tests.*", "tools", "tools.*"]), - install_requires=["requests==2.25.1", "aiohttp==3.7.4.post0"], + + install_requires=[ + "requests==2.25.1", + "aiohttp==3.7.4.post0", + "requests-cache==0.6.3", + "aiohttp-client-cache==0.4.0", + ], extras_require=extras_require, + classifiers=[ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6",