Skip to content

Commit

Permalink
Merge pull request #2 from orsinium-labs/py38
Browse files Browse the repository at this point in the history
Python 3.8 compatibility
  • Loading branch information
orsinium authored Apr 11, 2023
2 parents 35d3643 + 65ba2a8 commit 6413da0
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ keywords = [
"framework",
"fixtures",
]
dependencies = ["pytest"]
dependencies = [
"pytest",
"typing-extensions",
]

[project.optional-dependencies]
test = [
Expand All @@ -52,7 +55,7 @@ Source = "https://github.com/orsinium-labs/pytypest"

[tool.mypy]
files = ["pytypest", "tests", "integration"]
python_version = "3.10"
python_version = "3.8"
ignore_missing_imports = true
# follow_imports = "silent"
show_error_codes = true
Expand Down
4 changes: 3 additions & 1 deletion pytypest/_case.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from __future__ import annotations

import dataclasses
from typing import Any, Generic, ParamSpec, TypeVar
from typing import Any, Generic, TypeVar

from typing_extensions import ParamSpec


P = ParamSpec('P')
Expand Down
4 changes: 3 additions & 1 deletion pytypest/_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import inspect
from dataclasses import dataclass, field
from enum import Enum
from typing import Callable, Generic, Iterator, Literal, ParamSpec, TypeVar
from typing import Callable, Generic, Iterator, Literal, TypeVar

from typing_extensions import ParamSpec

from ._manager import defer
from ._scope import Scope
Expand Down
4 changes: 3 additions & 1 deletion pytypest/_fixture_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@


if TYPE_CHECKING:
from typing import Callable, Iterator, Literal, ParamSpec, TypeVar
from typing import Callable, Iterator, Literal, TypeVar

from typing_extensions import ParamSpec

R = TypeVar('R')
P = ParamSpec('P')
Expand Down
3 changes: 2 additions & 1 deletion pytypest/_parametrize.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from __future__ import annotations

import inspect
from typing import TYPE_CHECKING, Callable, ParamSpec
from typing import TYPE_CHECKING, Callable

import pytest
from typing_extensions import ParamSpec

from ._case import Case

Expand Down
4 changes: 3 additions & 1 deletion pytypest/experimental/_attr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from __future__ import annotations

from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Generic, ParamSpec, TypeVar, overload
from typing import TYPE_CHECKING, Any, Generic, TypeVar, overload

from typing_extensions import ParamSpec


if TYPE_CHECKING:
Expand Down

0 comments on commit 6413da0

Please sign in to comment.