Skip to content

Commit

Permalink
support py3.6 and py3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jul 4, 2021
1 parent 2e2257b commit f9d9235
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
6 changes: 4 additions & 2 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ variables:
jobs:
- template: job--python-check.yml@templates
parameters:
pythonVersion: "3.8"
pythonVersion: "3.9"

- template: job--python-test.yml@templates
parameters:
jobs:
py36: null
py37: null
py38:
py38: null
py39:
coverage: true
2 changes: 1 addition & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export PREFIX="venv/bin/"

set -x

python -m venv venv
python3 -m venv venv
${PREFIX}python -m pip install -U pip
${PREFIX}python -m pip install -r requirements.txt

Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ def get_long_description() -> str:
package_dir={"": "src"},
include_package_data=True,
zip_safe=False,
install_requires=["anyio~=3.2", "typing-extensions==3.7.*; python_version<'3.8'"],
python_requires=">=3.7",
install_requires=[
"anyio~=3.2",
"typing-extensions==3.7.*; python_version<'3.8'",
"contextlib2>=21.6.0; python_version<'3.7'",
],
python_requires=">=3.6",
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
Expand All @@ -43,7 +47,9 @@ def get_long_description() -> str:
"Framework :: Trio",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)
15 changes: 10 additions & 5 deletions src/aiometer/_impl/amap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from contextlib import asynccontextmanager
import sys
from typing import (
Any,
AsyncContextManager,
Expand All @@ -17,10 +17,15 @@
from .run_on_each import run_on_each
from .types import T, U

try:
from typing_extensions import Literal # Python 3.7.
except ImportError: # pragma: no cover
from typing import Literal # type: ignore
if sys.version_info > (3, 8): # pragma: no cover
from typing import Literal
else: # pragma: no cover
from typing_extensions import Literal

if sys.version_info > (3, 7): # pragma: no cover
from contextlib import asynccontextmanager
else: # pragma: no cover
from contextlib2 import asynccontextmanager


@overload
Expand Down

0 comments on commit f9d9235

Please sign in to comment.