Skip to content

Commit

Permalink
Merge pull request #289 from bashtage/restore-3.6
Browse files Browse the repository at this point in the history
MAINT: Restore 3.6 functionality
  • Loading branch information
bashtage authored Apr 27, 2021
2 parents a3d2d00 + 5579f9f commit 817a23a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 2 additions & 0 deletions ci/azure/azure_template_posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
NUMPY: 1.16.6
python39_latest:
python.version: '3.9'
python36_latest:
python.version: '3.6'
python38_mid_conda:
python.version: '3.8'
use.conda: true
Expand Down
2 changes: 0 additions & 2 deletions randomgen/tests/test_recent_numpy_changes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from distutils.version import LooseVersion
from typing import cast

Expand Down
21 changes: 15 additions & 6 deletions randomgen/typing.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
from typing import TYPE_CHECKING, Any, Optional, Sequence, Union
import sys
from typing import TYPE_CHECKING, Optional, Sequence, Union

if TYPE_CHECKING:
from typing import Literal
from randomgen.seed_sequence import SeedSequence

SeedMode = Literal["sequence", "legacy"]
if sys.version_info >= (3, 8):
from typing import Literal
elif TYPE_CHECKING:
from typing_extensions import Literal
else:
SeedMode = Any

from randomgen.seed_sequence import SeedSequence
class _Literal:
def __getitem__(self, item):
pass

Literal = _Literal()

SeedMode = Literal["sequence", "legacy"]


__all__ = ["IntegerSequenceSeed", "SeedMode", "Size"]

Expand Down
2 changes: 0 additions & 2 deletions randomgen/xoshiro256starstar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import Optional
import warnings

Expand Down
2 changes: 0 additions & 2 deletions randomgen/xoshiro512starstar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import Optional
import warnings

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
black==21.4b1
pytest>=6
pytest-cov
scipy>=1.3.2

0 comments on commit 817a23a

Please sign in to comment.