From d8f10b7fb8bbb628761e8e812e2eedbbb3be8c38 Mon Sep 17 00:00:00 2001 From: Elia Robyn Lake Date: Tue, 25 Oct 2022 13:59:13 -0400 Subject: [PATCH] fix tox setup, test on python 3.11 --- poetry.lock | 19 ++++++++++--------- tox.ini | 9 ++++++--- wordfreq/__init__.py | 6 +++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/poetry.lock b/poetry.lock index f2ccc3e..3e4b6ed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,11 +38,11 @@ python-versions = "*" [[package]] name = "black" -version = "22.8.0" +version = "22.10.0" description = "The uncompromising code formatter." category = "dev" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7" [package.dependencies] click = ">=8.0.0" @@ -73,11 +73,11 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" [[package]] name = "decorator" @@ -473,13 +473,14 @@ python-versions = ">=3.7" [[package]] name = "traitlets" -version = "5.4.0" +version = "5.5.0" description = "" category = "dev" optional = false python-versions = ">=3.7" [package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] test = ["pre-commit", "pytest"] [[package]] @@ -500,7 +501,7 @@ python-versions = "*" [[package]] name = "typing-extensions" -version = "4.3.0" +version = "4.4.0" description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false @@ -516,15 +517,15 @@ python-versions = "*" [[package]] name = "zipp" -version = "3.8.1" +version = "3.10.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "dev" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [extras] cjk = ["mecab-python3", "ipadic", "mecab-ko-dic", "jieba"] diff --git a/tox.ini b/tox.ini index 1d5cff9..9567bbb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,9 @@ [tox] -envlist = py37, py38, py39, py310 +envlist = py37, py38, py39, py310, py311 +isolated_build = true [testenv] -deps = pytest -commands = pytest +skip_install = true +whitelist_externals = poetry +commands_pre = poetry install +commands = poetry run pytest --import-mode importlib diff --git a/wordfreq/__init__.py b/wordfreq/__init__.py index e46aefc..54d45b2 100644 --- a/wordfreq/__init__.py +++ b/wordfreq/__init__.py @@ -11,9 +11,9 @@ import logging import math import warnings -from .tokens import tokenize, simple_tokenize, lossy_tokenize -from .language_info import get_language_info -from .numbers import digit_freq, has_digit_sequence, smash_numbers +from wordfreq.tokens import tokenize, simple_tokenize, lossy_tokenize +from wordfreq.language_info import get_language_info +from wordfreq.numbers import digit_freq, has_digit_sequence, smash_numbers logger = logging.getLogger(__name__)