diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 03d7c80c..24c37037 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -13,18 +13,18 @@ jobs: fail-fast: false matrix: include: - - { name: "3.8", python: "3.8", tox: py38 } - - { name: "3.12", python: "3.12", tox: py312 } - - { name: "lowest", python: "3.8", tox: py38-lowest } + - { name: "3.9", python: "3.9", tox: py39 } + - { name: "3.13", python: "3.13", tox: py313 } + - { name: "lowest", python: "3.9", tox: py39-lowest } steps: - uses: actions/checkout@v4.0.0 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: Download nltk data - run: wget https://s3.amazonaws.com/textblob/nltk_data-0.11.0.tar.gz - - name: Extract nltk data - run: tar -xzvf nltk_data-0.11.0.tar.gz -C ~ + run: | + pip install . + python -m textblob.download_corpora - run: python -m pip install tox - run: python -m tox -e${{ matrix.tox }} build: diff --git a/AUTHORS.rst b/AUTHORS.rst index 86aebc45..6a548b78 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -34,3 +34,4 @@ Contributors (chronological) - Romain Casati `@casatir `_ - Evgeny Kemerov `@sudoguy `_ - Karthikeyan Singaravelan `@tirkarthi `_ +- John Franey `@johnfraney `_ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index eaaf0974..526e862f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,9 +4,16 @@ Changelog 0.19.0 (unreleased) ___________________ -Other changes: +Bug fixes: + +- Fix ``textblob.download_corpora`` script (:issue:`474`). + Thanks :user:`cagan-elden` for reporting. + +Changes: - Remove vendorized ``unicodecsv`` module, as it's no longer used. +- Support Python 3.9-3.13 and nltk>=3.9 (:pr:`486`) + Thanks :user:`johnfraney` for the PR. 0.18.0 (2024-02-15) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 2a4e0c36..b664fec4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,16 +9,16 @@ classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Text Processing :: Linguistic", ] keywords = ["textblob", "nlp", 'linguistics', 'nltk', 'pattern'] -requires-python = ">=3.8" -dependencies = ["nltk>=3.8"] +requires-python = ">=3.9" +dependencies = ["nltk>=3.9"] [project.urls] Changelog = "https://textblob.readthedocs.io/en/latest/changelog.html" diff --git a/src/textblob/download_corpora.py b/src/textblob/download_corpora.py index 43a3f38e..e9bc8436 100644 --- a/src/textblob/download_corpora.py +++ b/src/textblob/download_corpora.py @@ -18,9 +18,9 @@ MIN_CORPORA = [ "brown", # Required for FastNPExtractor - "punkt", # Required for WordTokenizer + "punkt_tab", # Required for WordTokenizer "wordnet", # Required for lemmatization - "averaged_perceptron_tagger", # Required for NLTKTagger + "averaged_perceptron_tagger_eng", # Required for NLTKTagger ] ADDITIONAL_CORPORA = [ diff --git a/tox.ini b/tox.ini index ea0be73c..b2b7f172 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,13 @@ [tox] envlist = lint - py{38,39,310,311,312} - py38-lowest + py{39,310,311,312,313} + py39-lowest [testenv] extras = tests deps = - lowest: nltk==3.8 + lowest: nltk==3.9 commands = pytest {posargs}