Skip to content

Commit 5aa5067

Browse files
Increase default timeout value
1 parent a65e9b0 commit 5aa5067

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.0] - 2020-07-05
11+
### Changed
12+
- Increase maximum timeout to 15s from 3s.
13+
1014
## [1.1.0] - 2019-10-27
1115
### Changed
1216
- Decrease the default cache period to 10min from 24h.

ipregistry/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _isApiError(self, data):
9898
return 'code' in data
9999

100100
class IpregistryConfig:
101-
def __init__(self, key, apiUrl="https://api.ipregistry.co", timeout=3):
101+
def __init__(self, key, apiUrl="https://api.ipregistry.co", timeout=15):
102102
self.apiKey = key
103103
self.apiUrl = apiUrl
104104
self.timeout = timeout

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_default_config(self):
2828
print(requestHandler._config)
2929
self.assertEqual("tryout", requestHandler._config.apiKey)
3030
self.assertEqual("https://api.ipregistry.co", requestHandler._config.apiUrl)
31-
self.assertEqual(3, requestHandler._config.timeout)
31+
self.assertEqual(15, requestHandler._config.timeout)
3232

3333
def test_config_optional_parameters(self):
3434
"""

0 commit comments

Comments
 (0)