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

ci, contrib, dice, meta: enable testing on Python 3.13 + fix warnings #2628

Merged
merged 2 commits into from
Oct 11, 2024
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 @@ -25,6 +25,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
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,312}-qa
py{38,39,310,311,312,313}-qa
skip_missing_interpreters = true
ignore_base_python_conflict = true
labels =
lint = py{38,39,310,311,312}-lint
test = py{38,39,310,311,312}-test
lint = py{38,39,310,311,312,313}-lint
test = py{38,39,310,311,312,313}-test


[testenv]
Expand All @@ -21,12 +21,14 @@ envname =
py310: py310
py311: py311
py312: py312
py313: py313
envdir =
py38: {toxinidir}/.tox/py38
py39: {toxinidir}/.tox/py39
py310: {toxinidir}/.tox/py310
py311: {toxinidir}/.tox/py311
py312: {toxinidir}/.tox/py312
py313: {toxinidir}/.tox/py313
depends =
base
deps =
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications :: Chat :: Internet Relay Chat",
]
requires-python = ">=3.8"
Expand Down
4 changes: 3 additions & 1 deletion sopel/builtins/dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ def roll(bot: SopelWrapper, trigger: Trigger):

arg_str_raw = trigger.group(2).split("#", 1)[0].strip()
arg_str = arg_str_raw.replace("%", "%%")
arg_str = re.sub(dice_regexp, "%s", arg_str, 0, re.IGNORECASE | re.VERBOSE)
arg_str = re.sub(
dice_regexp, "%s", arg_str,
flags=re.IGNORECASE | re.VERBOSE)

dice_expressions = [
match for match in
Expand Down
5 changes: 4 additions & 1 deletion sopel/builtins/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ def process_urls(
except ValueError:
# Extra try/except here in case the DNS resolution fails, see #2348
try:
ips = [ip_address(ip) for ip in dns.resolver.resolve(parsed_url.hostname)]
ips = [
ip_address(ip.to_text())
for ip in dns.resolver.resolve(parsed_url.hostname)
]
except Exception as exc:
LOGGER.debug(
"Cannot resolve hostname %s, ignoring URL %s"
Expand Down
Loading