Skip to content

Commit 410849c

Browse files
authored
Remove support for Python 3.8 and make 3.9 minimum required (#1376)
1 parent 89bee7e commit 410849c

File tree

14 files changed

+36
-36
lines changed

14 files changed

+36
-36
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The tables below list all prerequisites along with the minimum required version
4848

4949
| Prerequisite | Minimum Version | Purpose |
5050
|----------------------------------------------------------|-----------------|----------------------------------------|
51-
| [python](https://www.python.org/downloads/) | `3.8` | Python programming language |
51+
| [python](https://www.python.org/downloads/) | `3.9` | Python programming language |
5252
| [pyperclip](https://github.com/asweigart/pyperclip) | `1.8.2` | Cross-platform clipboard functions |
5353
| [rich-argparse](https://pypi.org/project/rich-argparse/) | `1.6.0` | Rich help formatters for argparse |
5454
| [wcwidth](https://pypi.python.org/pypi/wcwidth) | `0.2.12` | Measure the displayed width of unicode |
@@ -96,7 +96,7 @@ on all platforms (Windows, Mac, and Linux). You can install `uv` using instruct
9696

9797
You can then install multiple versions of Python using `uv` like so:
9898
```sh
99-
uv python install 3.10 3.11 3.12 3.13
99+
uv python install 3.9 3.10 3.11 3.12 3.13
100100
```
101101

102102
### Forking the project

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
33
name: "build"
44

5-
on: [push, pull_request]
5+
on: [ push, pull_request ]
66

77
jobs:
88
build:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-latest, macos-latest, windows-latest]
13-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
12+
os: [ ubuntu-latest, macos-latest, windows-latest ]
13+
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- uses: actions/checkout@v4 # https://github.com/actions/checkout

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 3.0.0 (TBD)
22
* Breaking Changes
3+
* `cmd2` 3.x supports Python 3.9+ (removed support for Python 3.8)
34
* Removed macros
45
* Enhancements
56
* Simplified the process to set a custom parser for `cmd2's` built-in commands.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
7878
pip install -U cmd2
7979
```
8080

81-
cmd2 works with Python 3.8+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
81+
cmd2 works with Python 3.9+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
8282

8383
For information on other installation options, see
8484
[Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation.html) in the cmd2

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
('py:class', 'CommandParent'),
191191
('py:class', 'frame'),
192192
('py:class', 'RawCommandFuncOptionalBoolReturn'),
193+
('py:class', 'r.Console'),
193194
('py:class', 'rich.console.Console'),
194195
('py:class', 'rich.console.ConsoleRenderable'),
195196
('py:class', 'rich.console.RichCast'),

docs/overview/installation.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Installation Instructions
32
=========================
43

@@ -7,7 +6,7 @@ Installation Instructions
76
.. _setuptools: https://pypi.org/project/setuptools
87
.. _PyPI: https://pypi.org
98

10-
``cmd2`` works on Linux, macOS, and Windows. It requires Python 3.8 or
9+
``cmd2`` works on Linux, macOS, and Windows. It requires Python 3.9 or
1110
higher, pip_, and setuptools_. If you've got all that, then you can just:
1211

1312
.. code-block:: shell
@@ -30,7 +29,7 @@ higher, pip_, and setuptools_. If you've got all that, then you can just:
3029
Prerequisites
3130
-------------
3231

33-
If you have Python 3 >=3.8 installed from `python.org
32+
If you have Python 3 >=3.9 installed from `python.org
3433
<https://www.python.org>`_, you will already have pip_ and setuptools_, but may
3534
need to upgrade to the latest versions:
3635

plugins/ext_test/build-pyenvs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# version numbers are: major.minor.patch
99
#
1010
# this script will delete and recreate existing virtualenvs named
11-
# cmd2-3.8, etc. It will also create a .python-version
11+
# cmd2-3.9, etc. It will also create a .python-version
1212
#
1313
# Prerequisites:
1414
# - *nix-ish environment like macOS or Linux
@@ -23,7 +23,7 @@
2323
# virtualenvs will be added to '.python-version'. Feel free to modify
2424
# this list, but note that this script intentionally won't install
2525
# dev, rc, or beta python releases
26-
declare -a pythons=("3.8" "3.9", "3.10", "3.11", "3.12")
26+
declare -a pythons=("3.9", "3.10", "3.11", "3.12", "3.13")
2727

2828
# function to find the latest patch of a minor version of python
2929
function find_latest_version {

plugins/ext_test/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import nox
22

33

4-
@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12'])
4+
@nox.session(python=['3.9', '3.10', '3.11', '3.12', '3.13'])
55
def tests(session):
66
session.install('invoke', './[test]')
77
session.run('invoke', 'pytest', '--junit', '--no-pty')

plugins/ext_test/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
license='MIT',
3434
package_data=PACKAGE_DATA,
3535
packages=['cmd2_ext_test'],
36-
python_requires='>=3.8',
36+
python_requires='>=3.9',
3737
install_requires=['cmd2 >= 2, <3'],
3838
setup_requires=['setuptools >= 42', 'setuptools_scm >= 3.4'],
3939
classifiers=[
@@ -43,11 +43,11 @@
4343
'Topic :: Software Development :: Libraries :: Python Modules',
4444
'Intended Audience :: Developers',
4545
'License :: OSI Approved :: MIT License',
46-
'Programming Language :: Python :: 3.8',
4746
'Programming Language :: Python :: 3.9',
4847
'Programming Language :: Python :: 3.10',
4948
'Programming Language :: Python :: 3.11',
5049
'Programming Language :: Python :: 3.12',
50+
'Programming Language :: Python :: 3.13',
5151
],
5252
# dependencies for development and testing
5353
# $ pip install -e .[dev]

plugins/template/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -231,28 +231,28 @@ automates the creation of these environments.
231231
If you prefer to create these virtualenvs by hand, do the following:
232232
```
233233
$ cd cmd2_abbrev
234-
$ pyenv install 3.8.5
235-
$ pyenv virtualenv -p python3.8 3.8.5 cmd2-3.8
236-
$ pyenv install 3.9.0
237-
$ pyenv virtualenv -p python3.9 3.9.0 cmd2-3.9
234+
$ pyenv install 3.12
235+
$ pyenv virtualenv -p python3.12 3.12 cmd2-3.12
236+
$ pyenv install 3.13
237+
$ pyenv virtualenv -p python3.13 3.13 cmd2-3.13
238238
```
239239

240240
Now set pyenv to make both of those available at the same time:
241241
```
242-
$ pyenv local cmd2-3.8 cmd2-3.9
242+
$ pyenv local cmd2-3.13 cmd2-3.13
243243
```
244244

245245
Whether you ran the script, or did it by hand, you now have isolated virtualenvs
246246
for each of the major python versions. This table shows various python commands,
247247
the version of python which will be executed, and the virtualenv it will
248248
utilize.
249249

250-
| Command | python | virtualenv |
251-
| ----------- | ------ | ---------- |
252-
| `python3.8` | 3.8.5 | cmd2-3.8 |
253-
| `python3.9` | 3.9.0 | cmd2-3.9 |
254-
| `pip3.8` | 3.8.5 | cmd2-3.8 |
255-
| `pip3.9` | 3.9.0 | cmd2-3.9 |
250+
| Command | python | virtualenv |
251+
|--------------|--------|------------|
252+
| `python3.12` | 3.12 | cmd2-3.12 |
253+
| `python3.13` | 3.13 | cmd2-3.13 |
254+
| `pip3.12` | 3.12 | cmd2-3.12 |
255+
| `pip3.13` | 3.13 | cmd2-3.13 |
256256

257257
## Install Dependencies
258258

@@ -264,11 +264,11 @@ $ pip install -e .[dev]
264264
This command also installs `cmd2-myplugin` "in-place", so the package points to
265265
the source code instead of copying files to the python `site-packages` folder.
266266

267-
All the dependencies now have been installed in the `cmd2-3.8`
267+
All the dependencies now have been installed in the `cmd2-3.13`
268268
virtualenv. If you want to work in other virtualenvs, you'll need to manually
269269
select it, and install again::
270270

271-
$ pyenv shell cmd2-3.4
271+
$ pyenv shell cmd2-3.13
272272
$ pip install -e .[dev]
273273

274274
Now that you have your python environments created, you need to install the
@@ -286,8 +286,8 @@ unit tests found in the `tests` directory.
286286

287287
### Use nox to run unit tests in multiple versions of python
288288

289-
The included `noxfile.py` is setup to run the unit tests in python 3.8, 3.9
290-
3.10, 3.11, and 3.12 You can run your unit tests in all of these versions
289+
The included `noxfile.py` is setup to run the unit tests in python 3.9
290+
3.10, 3.11, 3.12, and 3.13 You can run your unit tests in all of these versions
291291
of python by:
292292
```
293293
$ nox

plugins/template/build-pyenvs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# version numbers are: major.minor.patch
99
#
1010
# this script will delete and recreate existing virtualenvs named
11-
# cmd2-3.8, etc. It will also create a .python-version
11+
# cmd2-3.9, etc. It will also create a .python-version
1212
#
1313
# Prerequisites:
1414
# - *nix-ish environment like macOS or Linux
@@ -23,7 +23,7 @@
2323
# virtualenvs will be added to '.python-version'. Feel free to modify
2424
# this list, but note that this script intentionally won't install
2525
# dev, rc, or beta python releases
26-
declare -a pythons=("3.8" "3.9" "3.10" "3.11", "3.12")
26+
declare -a pythons=("3.9", "3.10", "3.11", "3.12", "3.13")
2727

2828
# function to find the latest patch of a minor version of python
2929
function find_latest_version {

plugins/template/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import nox
22

33

4-
@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12'])
4+
@nox.session(python=['3.9', '3.10', '3.11', '3.12', '3.13'])
55
def tests(session):
66
session.install('invoke', './[test]')
77
session.run('invoke', 'pytest', '--junit', '--no-pty')

plugins/template/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
url='https://github.com/python-cmd2/cmd2-plugin-template',
2525
license='MIT',
2626
packages=['cmd2_myplugin'],
27-
python_requires='>=3.8',
27+
python_requires='>=3.9',
2828
install_requires=['cmd2 >= 2, <3'],
2929
setup_requires=['setuptools_scm'],
3030
classifiers=[
@@ -34,11 +34,11 @@
3434
'Topic :: Software Development :: Libraries :: Python Modules',
3535
'Intended Audience :: Developers',
3636
'License :: OSI Approved :: MIT License',
37-
'Programming Language :: Python :: 3.8',
3837
'Programming Language :: Python :: 3.9',
3938
'Programming Language :: Python :: 3.10',
4039
'Programming Language :: Python :: 3.11',
4140
'Programming Language :: Python :: 3.12',
41+
'Programming Language :: Python :: 3.13',
4242
],
4343
# dependencies for development and testing
4444
# $ pip install -e .[dev]

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python"
99
authors = [{ name = "cmd2 Contributors" }]
1010
readme = "README.md"
11-
requires-python = ">=3.8"
11+
requires-python = ">=3.9"
1212
keywords = [
1313
"CLI",
1414
"cmd",
@@ -26,7 +26,6 @@ classifiers = [
2626
"Intended Audience :: System Administrators",
2727
"License :: OSI Approved :: MIT License",
2828
"Programming Language :: Python :: 3 :: Only",
29-
"Programming Language :: Python :: 3.8",
3029
"Programming Language :: Python :: 3.9",
3130
"Programming Language :: Python :: 3.10",
3231
"Programming Language :: Python :: 3.11",

0 commit comments

Comments
 (0)