Skip to content

Commit

Permalink
Drop support for python 3.8
Browse files Browse the repository at this point in the history
Signed-off-by: Emanuele Giaquinta <[email protected]>
  • Loading branch information
exg committed Nov 23, 2024
1 parent d23d362 commit 74bbfa3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 39 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -41,7 +40,7 @@ ignore_missing_imports = true

[tool.ruff]
line-length = 88
target-version = "py38"
target-version = "py39"

[tool.ruff.lint]
select = [
Expand Down
1 change: 0 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 3 additions & 20 deletions tests/test_datetime.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import datetime
import sys
import zoneinfo
from typing import Callable

import msgpack
Expand All @@ -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(
Expand All @@ -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"),
)


Expand Down Expand Up @@ -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:
Expand Down
10 changes: 0 additions & 10 deletions tests/test_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 74bbfa3

Please sign in to comment.