Skip to content

Commit 39e2280

Browse files
Drop Python 3.6 and 3.7 support; use MkDocs for documentation (#31)
* drop 3.7 * update readme * link install to fix pytest * only run pytest on 3.12 * fix yaml syntax * maybe now * Migrate to Mkdocs and Mkdocstrings * add more docstrings and some doctests * fix 3.8/3.9 * Remove use of `ast.NameConstant` * match on 3.x * add pypy 3.9 and 3.10 * fix output dir for uploading docs * update readme * disable pypy-3.9 and pypy3.10 (see #32)
1 parent 4a3ec06 commit 39e2280

21 files changed

+222
-51
lines changed

.github/workflows/python.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,28 @@ jobs:
1515
matrix:
1616
# Generated with scripts/github_actions_get_python_versions.py
1717
python-version: [
18-
"3.6.7", "3.6.8", "3.6.9", "3.6.10", "3.6.11", "3.6.12", "3.6.13", "3.6.14", "3.6.15", "3.7.1", "3.7.5",
19-
"3.7.6", "3.7.7", "3.7.8", "3.7.9", "3.7.10", "3.7.11", "3.7.12", "3.7.13", "3.7.14", "3.7.15", "3.8.0",
20-
"3.8.1", "3.8.2", "3.8.3", "3.8.4", "3.8.5", "3.8.6", "3.8.7", "3.8.8", "3.8.9", "3.8.10", "3.8.11",
21-
"3.8.12", "3.8.13", "3.8.14", "3.9.0", "3.9.1", "3.9.2", "3.9.3", "3.9.4", "3.9.5", "3.9.6", "3.9.7",
22-
"3.9.8", "3.9.9", "3.9.10", "3.9.11", "3.9.12", "3.9.13", "3.9.14", "3.9.15", "3.10.0", "3.10.1", "3.10.2",
23-
"3.10.3", "3.10.4", "3.10.5", "3.10.6", "3.10.7", "3.10.8", "3.11.0", "3.x", "pypy-3.8",
18+
"3.8.0", "3.8.1", "3.8.2", "3.8.3", "3.8.4", "3.8.5", "3.8.6", "3.8.7", "3.8.8", "3.8.9", "3.8.10", "3.8.11",
19+
"3.8.12", "3.8.13", "3.8.14", "3.8.15", "3.8.16", "3.8.17", "3.8.18",
20+
"3.9.0", "3.9.1", "3.9.2", "3.9.3", "3.9.4", "3.9.5", "3.9.6", "3.9.7", "3.9.8", "3.9.9", "3.9.10", "3.9.11",
21+
"3.9.12", "3.9.13", "3.9.14", "3.9.15", "3.9.16", "3.9.17", "3.9.18",
22+
"3.10.0", "3.10.1", "3.10.2", "3.10.3", "3.10.4", "3.10.5", "3.10.6", "3.10.7", "3.10.8", "3.10.9", "3.10.10",
23+
"3.10.11", "3.10.12", "3.10.13",
24+
"3.11.0", "3.11.1", "3.11.2", "3.11.3", "3.11.4", "3.11.5", "3.11.6", "3.11.7", "3.11.8",
25+
"3.12.0", "3.12.1", "3.12.2",
26+
"3.x", "pypy-3.8", # "pypy-3.9", "pypy-3.10"
2427
]
2528
steps:
2629
- uses: actions/checkout@v4
2730
- uses: NiklasRosenstein/slap@gha/install/v1
2831
- uses: actions/setup-python@v5
2932
with: { python-version: "${{ matrix.python-version }}" }
30-
- run: slap install --no-venv-check
33+
- run: slap install --link --no-venv-check
34+
35+
# NOTE(@niklas): Flake8 doesn't run on 3.12 yet, so we only run pytest here.
3136
- run: slap test
37+
if: ${{ !startsWith(matrix.python-version, '3.12.') && matrix.python-version != '3.x' }}
38+
- run: slap test pytest
39+
if: ${{ startsWith(matrix.python-version, '3.12.') || matrix.python-version == '3.x' }}
3240

3341
docs:
3442
runs-on: ubuntu-latest

readme.md renamed to README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[PEP585]: https://peps.python.org/pep-0585/
77
[PEP604]: https://peps.python.org/pep-0604/
88

9-
__Compatibility__: Python 3.6.3+
9+
__Compatibility__: Python 3.8+
1010

1111
The `typeapi` package provides an object-oriented interface for introspecting [PEP484][] type hints at runtime,
1212
including forward references that make use of the more recent [PEP585][] and [PEP604][] type hint features in
@@ -19,15 +19,15 @@ The main API of this module is comprised of:
1919

2020
The following kinds of type hints are currently supported:
2121

22-
| Concrete type | Description | Added in |
23-
| ------------- | ----------- | -------- |
24-
| `ClassTypeHint` | For any normal or generic type as well as `typing.Any`. Provides access to the underlying type, the type arguments and parameters, if any. | 1.0.0 |
25-
| `UnionTypeHint` | Represents `Union` type hint and gives access to the union members. | 1.0.0 |
26-
| `LiteralTypeHint` | Represents a `Literal` type hint and gives access to the literal values. | 1.0.0 |
27-
| `AnnotatedTypeHint` | Represents an `Annotated` type hint and gives access to the annotated type as well as the metadata. | 1.0.0 |
28-
| `TypeVarTypeHint` | Represents a `TypeVar` type hint and gives an interface to access the variable's metadata (such as constarints, variance, ...). | 1.0.0 |
29-
| `ForwardRefTypeHint` | Represents a forward reference. Can be evaluated in Python 3.6+ even if it contains [PEP585][] and [PEP604][] expressions. <sup>1)</sup> | 1.0.0, future support in 1.3.0 |
30-
| `TupleTypeHint` | Reperesents a `Tuple` type hint, allowing you to differentiate between repeated and explicitly sized tuples. | 1.2.0 |
22+
| Concrete type | Description | Added in |
23+
|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
24+
| `ClassTypeHint` | For any normal or generic type as well as `typing.Any`. Provides access to the underlying type, the type arguments and parameters, if any. | 1.0.0 |
25+
| `UnionTypeHint` | Represents `Union` type hint and gives access to the union members. | 1.0.0 |
26+
| `LiteralTypeHint` | Represents a `Literal` type hint and gives access to the literal values. | 1.0.0 |
27+
| `AnnotatedTypeHint` | Represents an `Annotated` type hint and gives access to the annotated type as well as the metadata. | 1.0.0 |
28+
| `TypeVarTypeHint` | Represents a `TypeVar` type hint and gives an interface to access the variable's metadata (such as constarints, variance, ...). | 1.0.0 |
29+
| `ForwardRefTypeHint` | Represents a forward reference. Can be evaluated in Python 3.6+ even if it contains [PEP585][] (3.9+) and [PEP604][] (3.10+) expressions. <sup>1)</sup> | 1.0.0, future support in 1.3.0 |
30+
| `TupleTypeHint` | Reperesents a `Tuple` type hint, allowing you to differentiate between repeated and explicitly sized tuples. | 1.2.0 |
3131

3232
<sup>1)</sup> New-style type union evaluation will continue to return a `typing.Union`, even if the same syntax
3333
evaluated natively by Python 3.10+ results in a `types.UnionType`.

docs/build.novella

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/content/api/typeapi.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/content/api/typeapi.typehint.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/content/api/typeapi.utils.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/content/changelog.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/content/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/docs/api/typeapi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: typeapi

docs/docs/api/typeapi.utils.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: typeapi.utils

0 commit comments

Comments
 (0)