Skip to content

Commit 246da60

Browse files
authored
remove EOLed python 3.8 support (minio#1453)
Signed-off-by: Bala.FA <bala@minio.io>
1 parent 1b44255 commit 246da60

File tree

3 files changed

+20
-41
lines changed

3 files changed

+20
-41
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ matrix.os }}
3131
strategy:
3232
matrix:
33-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
33+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3434
os: [ubuntu-latest, windows-latest, macos-latest]
3535

3636
steps:
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
ignore_words_list: assertIn
4343
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v4
44+
uses: actions/setup-python@v5
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747
- name: Install dependencies

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
long_description_content_type="text/markdown",
4444
package_dir={"minio": "minio"},
4545
packages=["minio", "minio.credentials"],
46-
python_requires=">3.8",
46+
python_requires=">=3.9",
4747
install_requires=["certifi", "urllib3", "argon2-cffi",
4848
"pycryptodome", "typing-extensions"],
4949
tests_require=[],
@@ -55,11 +55,11 @@
5555
"Natural Language :: English",
5656
"Operating System :: OS Independent",
5757
"Programming Language :: Python",
58-
"Programming Language :: Python :: 3.8",
5958
"Programming Language :: Python :: 3.9",
6059
"Programming Language :: Python :: 3.10",
6160
"Programming Language :: Python :: 3.11",
6261
"Programming Language :: Python :: 3.12",
62+
"Programming Language :: Python :: 3.13",
6363
"Topic :: Software Development :: Libraries :: Python Modules",
6464
],
6565
long_description=readme,

tests/functional/tests.py

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,67 +1590,46 @@ def test_presigned_post_policy(log_entry):
15901590

15911591
def test_thread_safe(log_entry):
15921592
"""Test thread safety."""
1593-
1594-
# Create sha-sum value for the user provided
1595-
# source file, 'test_file'
1596-
test_file_sha_sum = _get_sha256sum(_LARGE_FILE)
1597-
1598-
# Get a unique bucket_name and object_name
15991593
bucket_name = _gen_bucket_name()
16001594
object_name = f"{uuid4()}"
1601-
16021595
log_entry["args"] = {
16031596
"bucket_name": bucket_name,
16041597
"object_name": object_name,
16051598
}
1599+
_CLIENT.make_bucket(bucket_name)
16061600

1607-
# A list of exceptions raised by get_object_and_check
1608-
# called in multiple threads.
1601+
test_file_sha256sum = _get_sha256sum(_LARGE_FILE)
16091602
exceptions = []
16101603

1611-
# get_object_and_check() downloads an object, stores it in a file
1612-
# and then calculates its checksum. In case of mismatch, a new
1613-
# exception is generated and saved in exceptions.
16141604
def get_object_and_check(index):
1605+
local_file = f"copied_file_{index}"
16151606
try:
1616-
local_file = f"copied_file_{index}"
16171607
_CLIENT.fget_object(bucket_name, object_name, local_file)
1618-
copied_file_sha_sum = _get_sha256sum(local_file)
1619-
# Compare sha-sum values of the source file and the copied one
1620-
if test_file_sha_sum != copied_file_sha_sum:
1608+
if _get_sha256sum(local_file) != test_file_sha256sum:
16211609
raise ValueError(
1622-
'Sha-sum mismatch on multi-threaded put and '
1623-
'get objects')
1610+
"checksum mismatch on multi-threaded put/get objects")
16241611
except Exception as exc: # pylint: disable=broad-except
16251612
exceptions.append(exc)
16261613
finally:
1627-
# Remove downloaded file
16281614
_ = os.path.isfile(local_file) and os.remove(local_file)
16291615

1630-
_CLIENT.make_bucket(bucket_name)
1631-
no_of_threads = 5
16321616
try:
1633-
# Put/Upload 'no_of_threads' many objects
1634-
# simultaneously using multi-threading
1635-
for _ in range(no_of_threads):
1617+
thread_count = 5
1618+
1619+
# Start threads for put object.
1620+
for _ in range(thread_count):
16361621
thread = Thread(target=_CLIENT.fput_object,
16371622
args=(bucket_name, object_name, _LARGE_FILE))
16381623
thread.start()
16391624
thread.join()
16401625

1641-
# Get/Download 'no_of_threads' many objects
1642-
# simultaneously using multi-threading
1643-
thread_list = []
1644-
for i in range(no_of_threads):
1645-
# Create dynamic/varying names for to be created threads
1646-
thread_name = f"thread_{i}"
1647-
vars()[thread_name] = Thread(
1648-
target=get_object_and_check, args=(i,))
1649-
vars()[thread_name].start()
1650-
thread_list.append(vars()[thread_name])
1651-
1652-
# Wait until all threads to finish
1653-
for thread in thread_list:
1626+
# Start threads for get object.
1627+
threads = []
1628+
for i in range(thread_count):
1629+
thread = Thread(target=get_object_and_check, args=(i,))
1630+
threads.append(thread)
1631+
thread.start()
1632+
for thread in threads:
16541633
thread.join()
16551634

16561635
if exceptions:

0 commit comments

Comments
 (0)