From 5f45860de255adc72712032451577fd63e388d2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:34:24 +0000 Subject: [PATCH] Bump nltk from 3.8.1 to 3.9.1 (#1993) --- docker/Dockerfile.baseimage | 5 ++++- poetry.lock | 10 +++++----- pyproject.toml | 1 - tox.ini | 2 ++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile.baseimage b/docker/Dockerfile.baseimage index 44acef1022..0aaf8816ba 100644 --- a/docker/Dockerfile.baseimage +++ b/docker/Dockerfile.baseimage @@ -11,7 +11,7 @@ # # Main repo for this image is here: # https://github.com/phusion/baseimage-docker -FROM phusion/baseimage:jammy-1.0.1 As baseimage +FROM phusion/baseimage:jammy-1.0.1 AS baseimage # Make sure base system is up to date RUN apt-get update && \ @@ -63,7 +63,10 @@ RUN python3 -m venv env && \ . env/bin/activate && \ pip install --upgrade pip && \ poetry install --only main,pg --sync --no-root && \ + # TODO: This can be removed once NLTK merges https://github.com/sloria/TextBlob/pull/469 + python3 -m nltk.downloader punkt_tab && \ python3 -m textblob.download_corpora lite && \ + rm -rf /root/nltk_data/tokenizers/punkt && \ mv /root/nltk_data /usr/lib/ && \ find /usr/lib/nltk_data -name *.zip -delete && \ rm -Rf /root/.cache && \ diff --git a/poetry.lock b/poetry.lock index b3997b165e..ed5e44a8bf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2846,13 +2846,13 @@ files = [ [[package]] name = "nltk" -version = "3.8.1" +version = "3.9.1" description = "Natural Language Toolkit" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "nltk-3.8.1-py3-none-any.whl", hash = "sha256:fd5c9109f976fa86bcadba8f91e47f5e9293bd034474752e92a520f81c93dda5"}, - {file = "nltk-3.8.1.zip", hash = "sha256:1834da3d0682cba4f2cede2f9aad6b0fafb6461ba451db0efb6f9c39798d64d3"}, + {file = "nltk-3.9.1-py3-none-any.whl", hash = "sha256:4fa26829c5b00715afe3061398a8989dc643b92ce7dd93fb4585a70930d168a1"}, + {file = "nltk-3.9.1.tar.gz", hash = "sha256:87d127bd3de4bd89a4f81265e5fa59cb1b199b27440175370f7417d2bc7ae868"}, ] [package.dependencies] @@ -5124,4 +5124,4 @@ lxml = ">=3.8" [metadata] lock-version = "2.0" python-versions = ">=3.10,<4" -content-hash = "0733153c25bf8a37ba1661c2b13301ea3a4fbf79b851ab22fa4d703ee99ea33b" +content-hash = "c601e5060bbc791f42c5e4ab9e91ab106f9f5c3ed6053f11d47c005e7f7c92d2" diff --git a/pyproject.toml b/pyproject.toml index f040c363c5..d0696bb349 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,7 +246,6 @@ lxml = {extras = ["html-clean"], version = "^5.2.1"} money = "1.3.0" multipledispatch = "^1.0" nameparser = "^1.1" # nameparser is for author name manipulations -nltk = "3.8.1" # nltk is a textblob dependency. opensearch-dsl = "~1.0" opensearch-py = "~1.1" palace-webpub-manifest-parser = "^4.0.0" diff --git a/tox.ini b/tox.ini index b0b53b0811..51ab13f7ec 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,8 @@ skipsdist = true [testenv] commands_pre = poetry install --without ci --sync -v + # TODO: This can be removed once NLTK merges https://github.com/sloria/TextBlob/pull/469 + python -m nltk.downloader punkt_tab python -m textblob.download_corpora commands = pytest {posargs:tests}