Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
exclude: # https://github.com/actions/setup-python/issues/875
- os: macos-latest
python-version: "3.10"
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]
max-parallel: 3
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ authors = [
description = "ImplicitDict base class that turns a subclass into a dict indexing attributes, making [de]serialization easy for complex typing-annotated data types."
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
Expand All @@ -56,7 +56,7 @@ dev = [


[tool.ruff]
target-version = "py310"
target-version = "py311"

# Default + isort + pyupgrade
lint.select = [
Expand Down
4 changes: 2 additions & 2 deletions tests/test_string_based_date_time.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime, timedelta, timezone
from datetime import UTC, datetime, timedelta

import arrow
import pytest
Expand Down Expand Up @@ -74,6 +74,6 @@ def test_non_mutation():
def test_zulu_default():
"""When a non-string datetime is provided, expect the string representation to use Z as the UTC timezone."""

assert StringBasedDateTime(datetime.now(timezone.utc)).endswith("Z")
assert StringBasedDateTime(datetime.now(UTC)).endswith("Z")
assert StringBasedDateTime(arrow.utcnow().datetime).endswith("Z")
assert StringBasedDateTime(arrow.utcnow()).endswith("Z")
6 changes: 3 additions & 3 deletions tests/test_types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file use old typing style on purpose to test compatibiliy (noqa
# comments)
import enum
from datetime import datetime, timezone
from datetime import UTC, datetime
from typing import List, Optional # noqa UP035

from implicitdict import ImplicitDict, StringBasedDateTime, StringBasedTimeDelta
Expand Down Expand Up @@ -189,7 +189,7 @@ class SpecialTypesData(ImplicitDict):
@staticmethod
def example_value():
return ImplicitDict.parse(
{"datetime": datetime.now(timezone.utc).isoformat(), "timedelta": "12h", "yesno": "Yes", "boolean": "true"},
{"datetime": datetime.now(UTC).isoformat(), "timedelta": "12h", "yesno": "Yes", "boolean": "true"},
SpecialTypesData,
)

Expand All @@ -202,7 +202,7 @@ def example_value():
return ImplicitDict.parse(
{
"special_types": {
"datetime": datetime.now(timezone.utc).isoformat(),
"datetime": datetime.now(UTC).isoformat(),
"timedelta": "12h",
"yesno": "Yes",
"boolean": "true",
Expand Down
Loading