1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
From: =?utf-8?q?Tarcza_L=C3=ADdia?=
<100163235+diatrcz@users.noreply.github.com>
Date: Tue, 18 Nov 2025 13:04:37 +0100
Subject: build: bump python versions (#228)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
* build: bump python versions and adjust tests
Signed-off-by: LĂdia Tarcza <100163235+diatrcz@users.noreply.github.com>
Origin: upstream, https://github.com/IBM/python-sdk-core/commit/2b453f1fea975c37c51ed9bc4631125334e1c1bf
Bug-Debian: https://bugs.debian.org/1123255
Last-Update: 2026-01-28
---
.github/workflows/build.yaml | 2 +-
README.md | 2 +-
pyproject.toml | 4 ++--
test/test_base_service.py | 13 +++++--------
4 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 076950f..810351e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
+ python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- name: Checkout repository
diff --git a/README.md b/README.md
index 76ae4a2..8ce0bc0 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ This project contains core functionality required by Python code generated by th
(openapi-sdkgen).
# Python Version
-The current minimum Python version supported is 3.9.
+The current minimum Python version supported is 3.10.
## Installation
diff --git a/pyproject.toml b/pyproject.toml
index 612f29d..550344d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,15 +6,15 @@ authors = [
]
description = "Core library used by SDKs for IBM Cloud Services"
readme = "README.md"
-requires-python = ">=3.9"
+requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
+ "Programming Language :: Python :: 3.14",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
diff --git a/test/test_base_service.py b/test/test_base_service.py
index f7a97fb..a90f79e 100644
--- a/test/test_base_service.py
+++ b/test/test_base_service.py
@@ -605,7 +605,7 @@ def test_http_client():
auth = BasicAuthenticator('my_username', 'my_password')
service = AnyServiceV1('2018-11-20', authenticator=auth)
assert isinstance(service.get_http_client(), requests.sessions.Session)
- assert service.get_http_client().headers.get('Accept-Encoding') == 'gzip, deflate'
+ assert service.get_http_client().headers.get('Accept-Encoding').startswith('gzip, deflate')
new_http_client = requests.Session()
new_http_client.headers.update({'Accept-Encoding': 'gzip'})
@@ -677,7 +677,6 @@ def test_gzip_compression():
def test_gzip_compression_file_input():
service = AnyServiceV1('2018-11-20', authenticator=NoAuthAuthenticator())
service.set_enable_gzip_compression(True)
-
# Should return file-like object with the compressed data when compression is on
# and the input is a file, opened for reading in binary mode.
raw_data = b'rawdata'
@@ -686,7 +685,7 @@ def test_gzip_compression_file_input():
tmp_file.seek(0)
prepped = service.prepare_request('GET', url='', data=tmp_file)
- assert prepped['data'].read() == gzip.compress(raw_data)
+ assert prepped['data'].read() == gzip.compress(raw_data, mtime=None)
assert prepped['headers'].get('content-encoding') == 'gzip'
assert prepped['data'].read() == b''
@@ -694,13 +693,12 @@ def test_gzip_compression_file_input():
with tempfile.TemporaryFile(mode='w+b') as tmp_file:
tmp_file.write(raw_data)
tmp_file.seek(0)
-
prepped = service.prepare_request('GET', url='', data=tmp_file)
compressed = b''
for chunk in prepped['data']:
compressed += chunk
- assert compressed == gzip.compress(raw_data)
+ assert compressed == gzip.compress(raw_data, mtime=None)
# Make sure the decompression works fine.
assert gzip.decompress(compressed) == raw_data
@@ -714,7 +712,7 @@ def test_gzip_compression_file_input():
tmp_file.seek(0)
prepped = service.prepare_request('GET', url='', data=tmp_file)
- assert prepped['data'].read() == gzip.compress(text_data.encode())
+ assert prepped['data'].read() == gzip.compress(text_data.encode(), mtime=None)
assert prepped['headers'].get('content-encoding') == 'gzip'
assert prepped['data'].read() == b''
@@ -722,13 +720,12 @@ def test_gzip_compression_file_input():
with tempfile.TemporaryFile(mode='w+') as tmp_file:
tmp_file.write(text_data)
tmp_file.seek(0)
-
prepped = service.prepare_request('GET', url='', data=tmp_file)
compressed = b''
for chunk in prepped['data']:
compressed += chunk
- assert compressed == gzip.compress(text_data.encode())
+ assert compressed == gzip.compress(text_data.encode(), mtime=None)
# Make sure the decompression works fine.
assert gzip.decompress(compressed).decode() == text_data
|