Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #45 from tamuhey/update_pyo3
Browse files Browse the repository at this point in the history
Support pep585
  • Loading branch information
tamuhey authored Feb 1, 2021
2 parents f68aadf + 54ea587 commit f84a4d7
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.7, 3.8, 3.9]
# ubuntu wheel is built in `manylinux_build.yml`
os: [macos-latest, windows-latest]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/manylinux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ jobs:
strategy:
matrix:
python-version:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pypi_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
container:
- centos
- manylinux
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]
env:
DOCKERFILE: dockerfiles/ci/${{ matrix.container }}/Dockerfile
PYTHON: python${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ name = "tokenizations"
crate-type = ["cdylib"]

[dependencies.pyo3]
version = "^0.12.0"
version = "^0.13.0"
features = ["extension-module"]
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors = [ "Yohei Tamura <[email protected]>",]
include = "tokenizations"

[tool.poetry.dependencies]
python = ">=3.5"
python = ">=3.7"

[tool.poetry.dev-dependencies]
pytest = "^6.1.2"
Expand Down
9 changes: 5 additions & 4 deletions python/tokenizations/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from typing import Optional, Sequence, List, Tuple
from __future__ import annotations
from typing import Optional, Sequence, Tuple

def get_alignments(
a: Sequence[str], b: Sequence[str]
) -> Tuple[List[List[int]], List[List[int]]]: ...
def get_charmap(a: str, b: str) -> Tuple[List[List[int]], List[List[int]]]: ...
) -> Tuple[list[list[int]], list[list[int]]]: ...
def get_charmap(a: str, b: str) -> Tuple[list[list[int]], list[list[int]]]: ...
def get_original_spans(
tokens: Sequence[str], original_text: str
) -> List[Optional[Tuple[int, int]]]: ...
) -> list[Optional[Tuple[int, int]]]: ...

4 changes: 2 additions & 2 deletions python/tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
isolated_build = true
envlist = py35, py36, py37, py38
envlist = py37, py38, py39

[testenv]
whitelist_externals =
Expand All @@ -9,4 +9,4 @@ whitelist_externals =
commands =
poetry install -v
maturin develop
poetry run pytest tests
poetry run pytest tests

0 comments on commit f84a4d7

Please sign in to comment.