Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: drop support for Python 3.9, add support for Python 3.11 #445

Merged
merged 3 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# It is recommended to pin a Runner version specifically:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.9', '3.10']
python: ['3.10', '3.11']
jenstroeger marked this conversation as resolved.
Show resolved Hide resolved
steps:

- name: Harden Runner
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ repos:
- id: pyupgrade
name: Upgrade code idioms
files: ^src/package/|^tests/
args: [--py39-plus]
args: [--py310-plus]

# Similar to pylint, with a few more/different checks. For more available
# extensions: https://github.com/DmytroLitvinov/awesome-flake8-extensions
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif
.PHONY: all
all: check test dist docs

# Create a virtual environment, either for Python3.10 (default) or using
# Create a virtual environment, either for Python3.11 (default) or using
# the Python interpreter specified in the PYTHON environment variable. Also
# create an empty pip.conf file to ensure that `pip config` modifies this
# venv only, unless told otherwise. For more background, see:
Expand All @@ -70,8 +70,8 @@ venv:
echo "Found an inactive Python virtual environment, please activate or nuke it" && exit 1; \
fi
if [ -z "${PYTHON}" ]; then \
echo "Creating virtual environment in .venv/ for python3.10"; \
python3.10 -m venv --upgrade-deps --prompt . .venv; \
echo "Creating virtual environment in .venv/ for python3.11"; \
python3.11 -m venv --upgrade-deps --prompt . .venv; \
else \
echo "Creating virtual environment in .venv/ for ${PYTHON}"; \
${PYTHON} -m venv --upgrade-deps --prompt . .venv; \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The badges above give you an idea of what this project template provides. It’s

### Typing

The package requires a minimum of [Python 3.9](https://www.python.org/downloads/release/python-390/) and supports [Python 3.10](https://www.python.org/downloads/release/python-3100/) as well as [Python 3.11](https://www.python.org/downloads/release/python-3110a6/). All code requires comprehensive [typing](https://docs.python.org/3/library/typing.html). The [mypy](http://mypy-lang.org/) static type checker is invoked by a git hook and through a Github Action to enforce continuous type checks. Make sure to add type hints to your code or to use [stub files](https://mypy.readthedocs.io/en/stable/stubs.html) for types, to ensure that users of your package can `import` and type-check your code (see also [PEP 561](https://www.python.org/dev/peps/pep-0561/)).
The package requires a minimum of [Python 3.10](https://www.python.org/downloads/release/python-3109/) and supports [Python 3.11](https://www.python.org/downloads/release/python-3111/). All code requires comprehensive [typing](https://docs.python.org/3/library/typing.html). The [mypy](http://mypy-lang.org/) static type checker is invoked by a git hook and through a Github Action to enforce continuous type checks. Make sure to add type hints to your code or to use [stub files](https://mypy.readthedocs.io/en/stable/stubs.html) for types, to ensure that users of your package can `import` and type-check your code (see also [PEP 561](https://www.python.org/dev/peps/pep-0561/)).

### Quality assurance

Expand Down Expand Up @@ -104,13 +104,13 @@ make venv # Create a new virtual environment in .venv folder using Python 3.10.
or for a specific version of Python:

```bash
PYTHON=python3.9 make venv # Same virtual environment for a different Python version.
PYTHON=python3.10 make venv # Same virtual environment for a different Python version.
```

or manually:

```bash
python3.11 -m venv .venv # Or use .venv310 for more than one local virtual environments.
python3.11 -m venv .venv # Or use .venv311 for more than one local virtual environments.
```

When working with this Makefile _it is important to always [activate the virtual environment](https://docs.python.org/3/library/venv.html)_ because some of the [git hooks](#git-hooks) (see below) depend on that:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "package"
requires-python = ">=3.9"
requires-python = ">=3.10"
authors = [{name = "Author", email = "author@email"}]
maintainers = [{name = "Maintainer", email = "maintainer@email"}]
dynamic = ["version", "description"]
Expand All @@ -21,8 +21,8 @@ classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down