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
