Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.8 support (remove typing_extensions from depends) #262

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
2 changes: 1 addition & 1 deletion .github/workflows/test-nonetwork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- ubuntu-latest
- macos-12
python:
- 3.8
- 3.9
- 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- ubuntu-latest
- macos-12
python:
- 3.8
- 3.9
yarikoptic marked this conversation as resolved.
Show resolved Hide resolved
- 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
Loading