Skip to content

Commit 4433c44

Browse files
committed
Replace setup.{cfg,py} with pyproject.toml
Remove Trove classifiers for Python versions as redundant. Replace deprecated `from aiohttp import wsgi` with aiohttp-wsgi. Test in Python 3.13. This migration keeps tox.ini because of two tools: 1. tox 4.13 in Debian 12. tox only added support for native TOML configuration in version 4.21. 2. Flake8, which doesn't support TOML configuration without a third-party package.
1 parent 4f94fbc commit 4433c44

File tree

8 files changed

+87
-97
lines changed

8 files changed

+87
-97
lines changed

.github/workflows/tox.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
python: ["3.11", "3.12"]
23+
python: ["3.11", "3.12", "3.13"]
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- name: Setup Python
2828
uses: actions/setup-python@v4
2929
with:

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A pluggable irc client library based on python's `asyncio
1919
:target: http://thenounproject.com/term/hydra/46963/
2020

2121

22-
Requires python 3.5+
22+
Requires python 3.11+
2323

2424
Python 2 is no longer supported, but if you don't have a choice you can use
2525
an older version::

examples/wsgiapp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import asyncio
3-
from aiohttp import wsgi
3+
from aiohttp_wsgi import wsgi
44
from irc3 import plugin
55
import json
66

irc3/plugins/web.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
77
Introduce a web interface to post messages
88
9-
Install aiohttp::
9+
Install aiohttp and aiohttp-wsgi::
1010
11-
$ pip install aiohttp
11+
$ pip install aiohttp aiohttp-wsgi
1212
1313
..
1414
>>> from irc3.testing import IrcBot

pyproject.toml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "irc3"
7+
version = "1.1.11.dev0"
8+
description = "plugable irc client library based on asyncio with DCC and SASL support"
9+
readme = "README.rst"
10+
requires-python = ">=3.11"
11+
license = "MIT"
12+
authors = [{ name = "Gael Pasgrimaud", email = "[email protected]" }]
13+
keywords = ["irc", "dcc", "asyncio"]
14+
classifiers = [
15+
"Intended Audience :: Developers",
16+
"Programming Language :: Python :: 3",
17+
"Topic :: Communications :: Chat :: Internet Relay Chat",
18+
"Development Status :: 5 - Production/Stable",
19+
]
20+
dependencies = ["venusian>=3.0", "docopt"]
21+
22+
[project.optional-dependencies]
23+
test = [
24+
"aiocron",
25+
"aiohttp",
26+
"aiohttp-wsgi",
27+
"feedparser",
28+
"irc3-plugins-test",
29+
"pysocks",
30+
"pytest",
31+
"pytest-aiohttp",
32+
"pytest-asyncio",
33+
"redis",
34+
"requests",
35+
"twitter",
36+
]
37+
web = [
38+
"aiohttp",
39+
"aiohttp-wsgi",
40+
]
41+
42+
[project.scripts]
43+
irc3 = "irc3:run"
44+
irc3d = "irc3d:run"
45+
46+
[project.urls]
47+
Homepage = "https://github.com/gawel/irc3/"
48+
49+
[tool.setuptools.packages.find]
50+
exclude = ["docs", "tests"]
51+
52+
[tool.pytest.ini_options]
53+
asyncio_default_fixture_loop_scope = "function"
54+
addopts = [
55+
"-p no:warnings",
56+
"-p no:unraisableexception",
57+
"--doctest-modules",
58+
"--doctest-glob='*.rst'",
59+
]
60+
ignore = [
61+
"CHANGES.rst",
62+
"setup.py",
63+
"bootstrap.py",
64+
"examples/*",
65+
"docs/conf.py",
66+
"irc3/_*.py",
67+
"irc3/testing.py",
68+
]

setup.cfg

-21
This file was deleted.

setup.py

-68
This file was deleted.

tox.ini

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py311,py312,flake8,docs
2+
envlist = py311,py312,py313,flake8,docs
33

44
[testenv]
55
skipsdist=true
@@ -8,7 +8,7 @@ allowlist_externals =
88
rm
99
commands =
1010
rm -f .coverage
11-
coverage run {envbindir}/py.test -xv []
11+
coverage run {envbindir}/py.test -xv tests
1212
coverage report -m
1313
deps =
1414
-e .[test,web]
@@ -44,3 +44,14 @@ commands =
4444
python -m irc3._parse_rfc
4545
python -m irc3._gen_doc
4646
deps =
47+
48+
[flake8]
49+
exclude =
50+
bootstrap.py
51+
./irc3/compat.py
52+
./.tox/*
53+
./src/*
54+
./docs*
55+
./.eggs/
56+
./.venv/
57+
ignore = W605

0 commit comments

Comments
 (0)