diff --git a/.woodpecker.yml b/.woodpecker.yml index 1a14ba3..09ea912 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,16 +1,9 @@ pipeline: - pre-commit: - group: pre-commit-test - image: python:3.11 - commands: - - pip install pre-commit==2.20.0 - - pre-commit run --all-files - python-3.7: group: test image: python:3.7-alpine commands: - - pip install pipenv==2022.10.25 + - pip install pipenv==2023.8.20 - pipenv install --dev --deploy - pipenv run almake test-pytest # We only test with pytest on 3.7 @@ -18,7 +11,7 @@ pipeline: group: test image: python:3.8 commands: - - pip install pipenv==2022.10.25 + - pip install pipenv==2023.8.20 - pipenv install --dev --deploy - pipenv run almake test - pipenv run almake build-dist @@ -28,7 +21,7 @@ pipeline: group: test image: python:3.9 commands: - - pip install pipenv==2022.10.25 + - pip install pipenv==2023.8.20 - pipenv install --dev --deploy - pipenv run almake test - pipenv run almake build-dist @@ -38,7 +31,7 @@ pipeline: group: test image: python:3.10 commands: - - pip install pipenv==2022.10.25 + - pip install pipenv==2023.8.20 - pipenv install --dev --deploy - pipenv run almake test - pipenv run almake build-dist @@ -48,7 +41,7 @@ pipeline: group: test image: python:3.11 commands: - - pip install pipenv==2022.10.25 + - pip install pipenv==2023.8.20 - pipenv install --dev --deploy - pipenv run almake test - pipenv run almake build-dist diff --git a/CHANGELOG.md b/CHANGELOG.md index daa4f23..ed36642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Nothing yet. +## [10.6.3 - 2023-09-18] + +## Changed + +- Bumped httpx timeouts from 5 seconds to 60 seconds (this may be fine-tuned in the future). + ## [10.6.2 - 2023-07-07] ## Changed diff --git a/src/sporestack/__init__.py b/src/sporestack/__init__.py index 05e3d78..e2aafd0 100644 --- a/src/sporestack/__init__.py +++ b/src/sporestack/__init__.py @@ -1,5 +1,5 @@ -"""SporeStack API and CLI for launching servers with Monero or Bitcoin""" +"""SporeStack API library and CLI for launching servers with Monero or Bitcoin""" __all__ = ["api", "api_client", "exceptions"] -__version__ = "10.6.2" +__version__ = "10.6.3" diff --git a/src/sporestack/api_client.py b/src/sporestack/api_client.py index 96f5c09..47a9861 100644 --- a/src/sporestack/api_client.py +++ b/src/sporestack/api_client.py @@ -20,9 +20,7 @@ TOR_ENDPOINT = ( API_ENDPOINT = CLEARNET_ENDPOINT -GET_TIMEOUT = 60 -POST_TIMEOUT = 90 -USE_TOR_PROXY = "auto" +TIMEOUT = httpx.Timeout(60.0) HEADERS = {"User-Agent": f"sporestack-python/{__version__}"} @@ -102,7 +100,9 @@ class APIClient: proxy = None if _is_onion_url(self.api_endpoint): proxy = _get_tor_proxy() - self._httpx_client = httpx.Client(headers=headers, proxies=proxy) + self._httpx_client = httpx.Client( + headers=headers, proxies=proxy, timeout=TIMEOUT + ) def server_launch( self,