From c0697ccff68b5437e5628d296090175f26ac41f5 Mon Sep 17 00:00:00 2001 From: Ryan Gibson Date: Thu, 5 Oct 2023 14:45:16 -0400 Subject: [PATCH] Add support and testing for Python 3.12 --- .github/workflows/python-package.yml | 3 ++- setup.py | 3 ++- tests/test_wavsteg.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 26a64cd..dfdb18b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -28,6 +28,7 @@ jobs: python -m pip install --upgrade pip python -m venv env source env/bin/activate + pip install setuptools pip install cython flake8 pytest python setup.py install - name: Lint with flake8 diff --git a/setup.py b/setup.py index 94ba251..d6a7c76 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ author="Ryan Gibson", author_email="ryan.alex.gibson@gmail.com", name="stego-lsb", - version="1.5.3", + version="1.5.4", description="Least Significant Bit Steganography for bitmap images (.bmp " "and .png), WAV sound files, and byte sequences. Simple LSB " "Steganalysis (LSB extraction) for bitmap images.", @@ -43,6 +43,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", ], ) diff --git a/tests/test_wavsteg.py b/tests/test_wavsteg.py index e6f4c89..1d83fe6 100644 --- a/tests/test_wavsteg.py +++ b/tests/test_wavsteg.py @@ -28,7 +28,7 @@ def write_random_wav(self, filename: str, num_channels: int, sample_width: int, data = np.random.randint(0, 2 ** (8 * sample_width), dtype=dtype, size=num_frames * num_channels) # note: typing does not recognize that "writeframes() accepts any bytes-like object" (see documentation) - file.writeframes(data) # type: ignore + file.writeframes(data) # type: ignore[arg-type,unused-ignore] def write_random_file(self, filename: str, num_bytes: int) -> None: with open(filename, "wb") as file: