Skip to content

Commit 48b6e10

Browse files
committed
deprecate python 3.7
1 parent b7e9dde commit 48b6e10

File tree

8 files changed

+26
-27
lines changed

8 files changed

+26
-27
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
needs: [cache_nltk_data, cache_third_party]
8181
strategy:
8282
matrix:
83-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
83+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
8484
os: [ubuntu-latest, macos-latest, windows-latest]
8585
fail-fast: false
8686
runs-on: ${{ matrix.os }}

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Summary of our git branching model:
7777
- Do many small commits on that branch locally (`git add files-changed`,
7878
`git commit -m "Add some change"`);
7979
- Run the tests to make sure nothing breaks
80-
(`tox -e py37` if you are on Python 3.7);
80+
(`tox -e py312` if you are on Python 3.12);
8181
- Add your name to the `AUTHORS.md` file as a contributor;
8282
- Push to your fork on GitHub (with the name as your local branch:
8383
`git push origin branch-name`);
@@ -169,7 +169,7 @@ The [`.github/workflows/ci.yaml`](https://github.com/nltk/nltk/blob/develop/.git
169169
- Otherwise, download all the data packages through `nltk.download('all')`.
170170

171171
- The `test` job
172-
- tests against supported Python versions (`3.7`, `3.8`, `3.9`).
172+
- tests against supported Python versions (`3.8`, `3.9`, `3.10`, `3.11`, `3.12`).
173173
- tests on `ubuntu-latest` and `macos-latest`.
174174
- relies on the `cache_nltk_data` job to ensure that `nltk_data` is available.
175175
- performs these steps:
@@ -189,7 +189,7 @@ The [`.github/workflows/ci.yaml`](https://github.com/nltk/nltk/blob/develop/.git
189189
#### To test with `tox` locally
190190

191191
First setup a new virtual environment, see https://docs.python-guide.org/dev/virtualenvs/
192-
Then run `tox -e py37`.
192+
Then run `tox -e py312`.
193193

194194
For example, using `pipenv`:
195195

@@ -198,7 +198,7 @@ git clone https://github.com/nltk/nltk.git
198198
cd nltk
199199
pipenv install -r pip-req.txt
200200
pipenv install tox
201-
tox -e py37
201+
tox -e py312
202202
```
203203

204204

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
NLTK -- the Natural Language Toolkit -- is a suite of open source Python
66
modules, data sets, and tutorials supporting research and development in Natural
7-
Language Processing. NLTK requires Python version 3.7, 3.8, 3.9, 3.10, 3.11 or 3.12.
7+
Language Processing. NLTK requires Python version 3.8, 3.9, 3.10, 3.11 or 3.12.
88

99
For documentation, please visit [nltk.org](https://www.nltk.org/).
1010

nltk/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# Description of the toolkit, keywords, and the project's primary URL.
5353
__longdescr__ = """\
5454
The Natural Language Toolkit (NLTK) is a Python package for
55-
natural language processing. NLTK requires Python 3.7, 3.8, 3.9, 3.10 or 3.11."""
55+
natural language processing. NLTK requires Python 3.8, 3.9, 3.10, 3.11 or 3.12."""
5656
__keywords__ = [
5757
"NLP",
5858
"CL",
@@ -84,11 +84,11 @@
8484
"Intended Audience :: Science/Research",
8585
"License :: OSI Approved :: Apache Software License",
8686
"Operating System :: OS Independent",
87-
"Programming Language :: Python :: 3.7",
8887
"Programming Language :: Python :: 3.8",
8988
"Programming Language :: Python :: 3.9",
9089
"Programming Language :: Python :: 3.10",
9190
"Programming Language :: Python :: 3.11",
91+
"Programming Language :: Python :: 3.12",
9292
"Topic :: Scientific/Engineering",
9393
"Topic :: Scientific/Engineering :: Artificial Intelligence",
9494
"Topic :: Scientific/Engineering :: Human Machine Interfaces",

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
long_description="""\
6969
The Natural Language Toolkit (NLTK) is a Python package for
70-
natural language processing. NLTK requires Python 3.7, 3.8, 3.9, 3.10, 3.11 or 3.12.""",
70+
natural language processing. NLTK requires Python 3.8, 3.9, 3.10, 3.11 or 3.12.""",
7171
license="Apache License, Version 2.0",
7272
keywords=[
7373
"NLP",
@@ -95,7 +95,6 @@
9595
"Intended Audience :: Science/Research",
9696
"License :: OSI Approved :: Apache Software License",
9797
"Operating System :: OS Independent",
98-
"Programming Language :: Python :: 3.7",
9998
"Programming Language :: Python :: 3.8",
10099
"Programming Language :: Python :: 3.9",
101100
"Programming Language :: Python :: 3.10",
@@ -112,7 +111,7 @@
112111
"Topic :: Text Processing :: Linguistic",
113112
],
114113
package_data={"nltk": ["test/*.doctest", "VERSION"]},
115-
python_requires=">=3.7",
114+
python_requires=">=3.8",
116115
install_requires=[
117116
"click",
118117
"joblib",

tox.ini

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[tox]
22
envlist =
3-
py{37,38,39,310,311}
3+
py{38,39,310,311,312}
44
pypy
5-
py{37,38,39,310,311}-nodeps
6-
py{37,38,39,310,311}-jenkins
5+
py{38,39,310,311,312}-nodeps
6+
py{38,39,310,311,312}-jenkins
77
py-travis
88

99
[testenv]
@@ -55,13 +55,6 @@ deps =
5555
commands =
5656
pytest
5757

58-
[testenv:py37-nodeps]
59-
basepython = python3.7
60-
deps =
61-
pytest
62-
pytest-mock
63-
commands = pytest
64-
6558
[testenv:py38-nodeps]
6659
basepython = python3.8
6760
deps =
@@ -90,6 +83,13 @@ deps =
9083
pytest-mock
9184
commands = pytest
9285

86+
[testenv:py312-nodeps]
87+
basepython = python3.12
88+
deps =
89+
pytest
90+
pytest-mock
91+
commands = pytest
92+
9393
# Use minor version agnostic basepython, but specify testenv
9494
# control Python2/3 versions using jenkins' user-defined matrix instead.
9595
# Available Python versions: http://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/python/fc25/

web/dev/local_testing.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ Please consult https://tox.wiki for more info about the tox tool.
2525
Examples
2626
--------
2727

28-
Run tests for python 3.7 in verbose mode; executing only tests
28+
Run tests for python 3.12 in verbose mode; executing only tests
2929
that failed in the last test run::
3030

31-
tox -e py37 -- -v --failed
31+
tox -e py312 -- -v --failed
3232

3333
Run tree doctests for all available interpreters::
3434

3535
tox -- tree.doctest
3636

37-
Run a selected unit test for Python 3.7::
37+
Run a selected unit test for Python 3.12::
3838

39-
tox -e py37 -- -v nltk.test.unit.test_seekable_unicode_stream_reader
39+
tox -e py312 -- -v nltk.test.unit.test_seekable_unicode_stream_reader
4040

4141
By default, numpy, scipy and scikit-learn are installed in tox virtualenvs.
4242
This is slow, requires working build toolchain and is not always feasible.
4343
In order to skip numpy & friends, use ``..-nodeps`` environments::
4444

45-
tox -e py37-nodeps,py37,pypy
45+
tox -e py312-nodeps,py312,pypy
4646

4747
It is also possible to run tests without tox. This way NLTK would be tested
4848
only under single interpreter, but it may be easier to have numpy and other

web/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Installing NLTK
22
===============
33

4-
NLTK requires Python versions 3.7, 3.8, 3.9, 3.10 or 3.11.
4+
NLTK requires Python versions 3.8, 3.9, 3.10, 3.11 or 3.12.
55

66
For Windows users, it is strongly recommended that you go through this guide to install Python 3 successfully https://docs.python-guide.org/starting/install3/win/#install3-windows
77

0 commit comments

Comments
 (0)