Skip to content

Commit

Permalink
Merge pull request #262 from dandi/rf-3.9
Browse files Browse the repository at this point in the history
Drop Python 3.8 support (remove typing_extensions from depends)
  • Loading branch information
yarikoptic authored Nov 4, 2024
2 parents 7074582 + eaa32d2 commit 121d40f
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install dandischema
run: python -m pip install .
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test-dandi-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,22 @@ jobs:
- macos-latest
python:
# Use the only Python which is ATM also used by dandi-api
# - 3.7
# - 3.8
# - 3.9
# - '3.10'
- '3.11'
# - '3.12'
version:
- master
- release
mode:
- normal
include:
- os: ubuntu-latest
python: 3.8
python: 3.9
mode: dandi-devel
version: master
- os: ubuntu-latest
python: 3.8
python: 3.9
mode: dandi-devel
version: release
exclude:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-nonetwork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ jobs:
os:
- windows-2019
- ubuntu-latest
- macos-12
- macos-latest
python:
- 3.8
- 3.9
- '3.10'
- '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Install dandischema
run: python -m pip install .
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
os:
- windows-2019
- ubuntu-latest
- macos-12
- macos-latest
python:
- 3.8
- 3.9
- '3.10'
- '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Install dependencies
run: |
Expand Down
16 changes: 12 additions & 4 deletions dandischema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@
from enum import Enum
import os
import re
from typing import Any, Dict, List, Literal, Optional, Sequence, Type, TypeVar, Union
from typing import (
Annotated,
Any,
Dict,
List,
Literal,
Optional,
Sequence,
Type,
TypeVar,
Union,
)
from warnings import warn

from pydantic import (
Expand All @@ -23,9 +34,6 @@
)
from pydantic.json_schema import JsonSchemaValue
from pydantic_core import CoreSchema
from typing_extensions import (
Annotated, # TODO: import from `typing` when Python 3.8 support is dropped
)
from zarr_checksum.checksum import InvalidZarrChecksum, ZarrDirectoryDigest

from .consts import DANDI_SCHEMA_VERSION
Expand Down
3 changes: 1 addition & 2 deletions dandischema/types.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# This file is for defining types that extend existing types through the use of
# `typing.Annotated`.

from typing import Type
from typing import Annotated, Type

from pydantic import ByteSize, GetCoreSchemaHandler, GetJsonSchemaHandler
from pydantic.json_schema import JsonSchemaValue
from pydantic_core import CoreSchema, core_schema
from typing_extensions import Annotated


class _ByteSizeJsonSchemaAnnotation:
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ classifiers =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Expand All @@ -27,12 +26,11 @@ project_urls =
Source Code = https://github.com/dandi/dandischema

[options]
python_requires = >=3.8
python_requires = >=3.9
install_requires =
jsonschema[format]
pydantic[email] ~= 2.4
requests
typing_extensions; python_version < "3.9"
zarr_checksum
zip_safe = False
packages = find_namespace:
Expand Down

0 comments on commit 121d40f

Please sign in to comment.