Skip to content

Commit a50449f

Browse files
committed
fix: Fix issue with urrlib3's Retry allowed_methods deprecated constructor parameter
Change base_url for Private Beta
1 parent 8b2ddde commit a50449f

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
## Documentation
88

9-
Please follow up the steps in the [Getting Started](https://beta.botanalytics.co/docs/integration/sdks/python/getting-started) section of Python SDK documentation.
9+
Please follow up the steps in the [Getting Started](https://docs.beta.botanalytics.co/docs/integration/sdks/python/getting-started){:target="_blank"} section of Python SDK documentation.

botanalytics/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ BA_API_KEY=""
1717

1818
# Base URL for the Botanalytics REST API
1919
# This default should not be changed unless you are directed to do so.
20-
BA_BASE_URL="https://api.botanalytics.co/v2/"
20+
BA_BASE_URL="https://api.beta.botanalytics.co/v2/"
2121

2222
# Global timeout for requests in milliseconds
2323
BA_REQUEST_TIMEOUT=30000

botanalytics/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
pattern = re.compile(regex)
6767

6868
default_log_level = 'INFO'
69-
default_base_url = 'https://api.botanalytics.co/v2/'
69+
default_base_url = 'https://api.beta.botanalytics.co/v2/'
7070
default_request_timeout = 30000
7171
default_request_retry_limit = 10
7272

@@ -176,7 +176,7 @@ def __init__(self, debug=None, api_key=None, base_url=None, channel=None,
176176
# Configure http client
177177
retries = CallbackRetry(total=request_retry_limit,
178178
backoff_factor=1,
179-
allowed_methods=["POST"],
179+
method_whitelist=["POST"],
180180
status_forcelist=[429, 500, 502, 503, 504],
181181
callback=partial(self.retry_callback, request_retry_limit))
182182
adapter = TimeoutHTTPAdapter(max_retries=retries, timeout=request_timeout)

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.black]
66
line-length = 88
7-
target-version = ["py37", "py38", "py39", "py310"]
7+
target-version = ["py36", "py37", "py38", "py39", "py310"]
88
exclude = "((.eggs | .git | .pytest_cache | build | dist))"
99

1010

@@ -16,7 +16,7 @@ authors = [ "Botanalytics, Inc. <hello@botanalytics.co>",]
1616
maintainers = [ "Enis Gayretli <enis@botanalytics.co>", "Deniz Acay <deniz@botanalytics.co>" ]
1717
homepage = "https://botanalytics.co"
1818
repository = "https://github.com/botanalytics/python-sdk"
19-
documentation = "https://beta.botanalytics.co/docs/integration/sdks/python/getting-started"
19+
documentation = "https://docs.beta.botanalytics.co/docs/integration/sdks/python/getting-started"
2020
classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: MIT :: Apache Software License", "Topic :: Software Development :: Libraries", ]
2121
keywords = [ "conversational-analytics", "conversational-agents", "conversational-ai", "bots", "chatbot", "chatbot", "botanalytics", "analytics", "rasa", "universal", ]
2222
include = [ "LICENSE.txt", "README.md",]
@@ -25,8 +25,8 @@ license = "MIT"
2525

2626

2727
[tool.poetry.dependencies]
28-
python = ">=3.7,<3.10"
29-
requests = "^2.28.0"
28+
python = ">=3.6,<3.10"
29+
requests = "^2.27.1"
3030
requests-toolbelt = "^0.9.1"
3131
python-dotenv = "^0.20.0"
3232
loguru = "^0.6.0"

0 commit comments

Comments
 (0)