Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
<!-- This file is generated, please add to it using `knope document-change` in the client-library-templates repo -->
# Changelog

## 3.22.0 (2026-10-26)

### Features

#### Add a `timeout` client option, with a 60 second default

`Client` now accepts a `timeout` argument that is passed to `requests` on every call, so a request that gets no response in time raises `requests.Timeout`. It takes seconds, or a `(connect, read)` tuple to set the two limits separately, or `None` to wait indefinitely.

```python
client = gocardless_pro.Client(access_token=token, environment='live', timeout=10)
```

Previously requests had no timeout, so a stalled connection could hang forever. Requests now time out after 60 seconds by default. If you rely on requests taking longer than that, pass a larger `timeout` or `None`.

Requests that time out are retried by the library's existing automatic retry logic before the error is raised.

## 3.21.0 (2026-10-12)

### Features
Expand Down
2 changes: 1 addition & 1 deletion gocardless_pro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from .client import Client

__version__ = '3.21.0'
__version__ = '3.22.0'

4 changes: 2 additions & 2 deletions gocardless_pro/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _default_headers(self):
'Authorization': 'Bearer {0}'.format(self.access_token),
'Content-Type': 'application/json',
'GoCardless-Client-Library': 'gocardless-pro-python',
'GoCardless-Client-Version': '3.21.0',
'GoCardless-Client-Version': '3.22.0',
'User-Agent': self._user_agent(),
'GoCardless-Version': '2015-07-06',
}
Expand All @@ -210,7 +210,7 @@ def _user_agent(self):
python_version = '.'.join(platform.python_version_tuple()[0:2])
vm_version = '{}.{}.{}-{}{}'.format(*sys.version_info)
return ' '.join([
'gocardless-pro-python/3.21.0',
'gocardless-pro-python/3.22.0',
'python/{0}'.format(python_version),
'{0}/{1}'.format(platform.python_implementation(), vm_version),
'{0}/{1}'.format(platform.system(), platform.release()),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name = 'gocardless_pro',
version = '3.21.0',
version = '3.22.0',
packages = find_packages(exclude=['tests']),
install_requires = ['requests>=2.34.2'],
python_requires = '>=3.6',
Expand Down
Loading