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

Add Python 3.12 support #2516

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ lint-type:

.PHONY: test test_norecord test_novcr vcr_rerecord
test:
coverage run -m py.test -v .
coverage run -m pytest -v .

test_norecord:
# error if VCR recording for a web request is missing (useful on CI)
coverage run -m py.test -v . --vcr-record=none
coverage run -m pytest -v . --vcr-record=none

test_novcr:
# disable VCR completely; useful to check if recordings are outdated
coverage run -m py.test -v . --disable-vcr
coverage run -m pytest -v . --disable-vcr

vcr_rerecord:
# clear VCR cassettes and run tests to record fresh ones
rm -rf ./test/vcr/*
coverage run -m py.test -v . --vcr-record=all
coverage run -m pytest -v . --vcr-record=all

.PHONY: coverage_report coverage_html coverages
coverage_report:
Expand Down
8 changes: 5 additions & 3 deletions contrib/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
package_root = .
min_version = 4.3.3
envlist =
py{38,39,310,311}-qa
py{38,39,310,311,312}-qa
skip_missing_interpreters = true
ignore_base_python_conflict = true
labels =
lint = py{38,39,310,311}-lint
test = py{38,39,310,311}-test
lint = py{38,39,310,311,312}-lint
test = py{38,39,310,311,312}-test


[testenv]
Expand All @@ -20,11 +20,13 @@ envname =
py39: py39
py310: py310
py311: py311
py312: py312
envdir =
py38: {toxinidir}/.tox/py38
py39: {toxinidir}/.tox/py39
py310: {toxinidir}/.tox/py310
py311: {toxinidir}/.tox/py311
py312: {toxinidir}/.tox/py312
depends =
base
deps =
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ flake8-import-order
flake8-type-checking; python_version >= '3.8'
# Sphinx theme
furo==2023.9.10
pytest~=7.1.0
pytest~=7.4
pytest-vcr~=1.0.2
requests-mock~=1.9.3
sphinx>=7.1.0,<8; python_version <= '3.8'
Expand Down
2 changes: 1 addition & 1 deletion docs/source/plugin/test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Assuming your test files are in the ``test`` folder in your project directory::

You can run your test suite with::

py.test -v test/
pytest -v test/

.. __: https://docs.pytest.org/en/stable/getting-started.html

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools~=63.0", "wheel"]
requires = ["setuptools~=66.1", "wheel"]
dgw marked this conversation as resolved.
Show resolved Hide resolved
build-backend = "setuptools.build_meta"

[tool.setuptools]
Expand Down Expand Up @@ -39,6 +39,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Communications :: Chat :: Internet Relay Chat",
]
requires-python = ">=3.8"
Expand Down
4 changes: 2 additions & 2 deletions sopel/tests/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class MockIRCServer:
``blocking`` arguments to the instance methods below.

The :class:`~sopel.tests.factories.IRCFactory` factory can be used to
create such mock object, either directly or by using ``py.test`` and the
create such mock object, either directly or by using ``pytest`` and the
:func:`~sopel.tests.pytest_plugin.ircfactory` fixture.

.. versionadded:: 7.1
Expand Down Expand Up @@ -361,7 +361,7 @@ class MockUser:
:param str host: user's host

The :class:`~sopel.tests.factories.UserFactory` factory can be used to
create such mock object, either directly or by using ``py.test`` and the
create such mock object, either directly or by using ``pytest`` and the
:func:`~sopel.tests.pytest_plugin.userfactory` fixture.
"""
def __init__(self, nick=None, user=None, host=None):
Expand Down