diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ed7c94..3f180a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] env: CC: "gcc" CFLAGS: "-O2 -fno-plt" @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] target: [ { platform: 'linux/arm64', @@ -110,7 +110,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - run: rustup install --profile minimal ${{ env.RUST_TOOLCHAIN }} @@ -134,7 +134,7 @@ jobs: name: Build macOS universal wheel strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -172,7 +172,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - run: python -m pip install -U pip wheel maturin - run: pip install -r requirements.txt - run: maturin sdist diff --git a/pyproject.toml b/pyproject.toml index 6e87441..6037b2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ormsgpack" repository = "https://github.com/aviramha/ormsgpack" -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -11,7 +11,6 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -41,7 +40,7 @@ ignore_missing_imports = true [tool.ruff] line-length = 88 -target-version = "py38" +target-version = "py39" [tool.ruff.lint] select = [ diff --git a/tests/requirements.txt b/tests/requirements.txt index eed9930..f8df852 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,7 +3,6 @@ numpy;platform_machine!="armv7l" pendulum;platform_machine!="armv7l" and python_version<"3.13" pytest pytz -xxhash==1.4.3;sys_platform!="windows" and python_version<"3.9" # creates non-compact ASCII for test_str_ascii msgpack pydantic tzdata diff --git a/tests/test_datetime.py b/tests/test_datetime.py index 9977087..79407f2 100644 --- a/tests/test_datetime.py +++ b/tests/test_datetime.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import datetime -import sys +import zoneinfo from typing import Callable import msgpack @@ -21,15 +21,6 @@ pendulum_timezone = pendulum.timezone pendulum_UTC = pendulum.UTC -if sys.version_info >= (3, 9): - import zoneinfo - - ZoneInfo = zoneinfo.ZoneInfo - ZoneInfoUTC = zoneinfo.ZoneInfo("UTC") -else: - ZoneInfo = None - ZoneInfoUTC = None - TIMEZONE_PARAMS = ( pytest.param( @@ -42,11 +33,7 @@ ), pytest.param(pytz.timezone, id="pytz"), pytest.param(get_zonefile_instance().get, id="dateutil"), - pytest.param( - ZoneInfo, - id="zoneinfo", - marks=pytest.mark.skipif(ZoneInfo is None, reason="zoneinfo not available"), - ), + pytest.param(zoneinfo.ZoneInfo, id="zoneinfo"), ) @@ -133,11 +120,7 @@ def test_datetime_tz_assume() -> None: ), pytest.param(pytz.UTC, id="pytz"), pytest.param(tz.UTC, id="dateutil"), - pytest.param( - ZoneInfoUTC, - id="zoneinfo", - marks=pytest.mark.skipif(ZoneInfo is None, reason="zoneinfo not available"), - ), + pytest.param(zoneinfo.ZoneInfo("UTC"), id="zoneinfo"), ), ) def test_datetime_utc(timezone: datetime.tzinfo) -> None: diff --git a/tests/test_str.py b/tests/test_str.py index 9606532..c151275 100644 --- a/tests/test_str.py +++ b/tests/test_str.py @@ -42,13 +42,3 @@ def test_str_surrogates() -> None: ormsgpack.packb("\udc00") with pytest.raises(ormsgpack.MsgpackEncodeError): ormsgpack.packb("\ud83d\ude80") - - -def test_str_ascii() -> None: - """ - str is ASCII but not compact - """ - xxhash = pytest.importorskip("xxhash") - digest = xxhash.xxh32_hexdigest("12345") - for _ in range(2): - assert ormsgpack.unpackb(ormsgpack.packb(digest)) == "b30d56b4"