Skip to content

Commit 5423e0a

Browse files
authored
Merge pull request #245 from scrapy/3.14rc
Add Python 3.14 RC1 to CI, bump tool versions
2 parents f3bcdd9 + 5a264f9 commit 5423e0a

File tree

10 files changed

+46
-21
lines changed

10 files changed

+46
-21
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# This is a list of commits that git blame should ignore
22
# running pre-commit on all the code
3-
47be6dd35faf78f06b6183ea9dad6b5f78f5c756
3+
47be6dd35faf78f06b6183ea9dad6b5f78f5c756

.github/workflows/tests-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1"]
1919

2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/tests-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.10", "pypy3.11"]
18+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1", "pypy3.10", "pypy3.11"]
1919

2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/tests-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1"]
1919

2020
steps:
2121
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.11.2
3+
rev: v0.12.5
44
hooks:
5-
- id: ruff
5+
- id: ruff-check
66
args: [ --fix ]
77
- id: ruff-format
8+
- repo: https://github.com/adamchainz/blacken-docs
9+
rev: 1.19.1
10+
hooks:
11+
- id: blacken-docs
12+
additional_dependencies:
13+
- black==25.1.0
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v5.0.0
16+
hooks:
17+
- id: end-of-file-fixer
18+
- id: trailing-whitespace
19+
- repo: https://github.com/sphinx-contrib/sphinx-lint
20+
rev: v1.0.0
21+
hooks:
22+
- id: sphinx-lint

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ All rights reserved.
44
Redistribution and use in source and binary forms, with or without modification,
55
are permitted provided that the following conditions are met:
66

7-
1. Redistributions of source code must retain the above copyright notice,
7+
1. Redistributions of source code must retain the above copyright notice,
88
this list of conditions and the following disclaimer.
9-
10-
2. Redistributions in binary form must reproduce the above copyright
9+
10+
2. Redistributions in binary form must reproduce the above copyright
1111
notice, this list of conditions and the following disclaimer in the
1212
documentation and/or other materials provided with the distribution.
1313

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
# General information about the project.
4848
project = "w3lib"
49-
copyright = "2014, w3lib developers"
49+
project_copyright = "2014, w3lib developers"
5050

5151
# The version info for the project you're documenting, acts as replacement for
5252
# |version| and |release|, also used in various other places throughout the

pyproject.toml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ classifiers = [
1717
"Operating System :: OS Independent",
1818
"Programming Language :: Python",
1919
"Programming Language :: Python :: 3",
20-
"Programming Language :: Python :: 3.13",
2120
"Programming Language :: Python :: 3.9",
22-
"Programming Language :: Python :: Implementation :: CPython",
23-
"Programming Language :: Python :: Implementation :: PyPy",
2421
"Programming Language :: Python :: 3.10",
2522
"Programming Language :: Python :: 3.11",
2623
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
26+
"Programming Language :: Python :: Implementation :: CPython",
27+
"Programming Language :: Python :: Implementation :: PyPy",
2728
"Topic :: Internet :: WWW/HTTP",
2829
"Topic :: Software Development :: Libraries :: Python Modules",
2930
]
@@ -35,8 +36,7 @@ Homepage = "https://github.com/scrapy/w3lib"
3536
Documentation = "https://w3lib.readthedocs.io/en/latest/"
3637
Source = "https://github.com/scrapy/w3lib"
3738
Tracker = "https://github.com/scrapy/w3lib/issues"
38-
Changelog = "https://github.com/scrapy/w3lib/commits/master/"
39-
releasenotes = "https://w3lib.readthedocs.io/en/latest/#changelog"
39+
"Release notes" = "https://w3lib.readthedocs.io/en/latest/#changelog"
4040

4141
[tool.hatch.version]
4242
path = "w3lib/__init__.py"
@@ -116,10 +116,16 @@ disable = [
116116

117117
[tool.ruff.lint]
118118
extend-select = [
119+
# flake8-builtins
120+
"A",
121+
# flake8-async
122+
"ASYNC",
119123
# flake8-bugbear
120124
"B",
121125
# flake8-comprehensions
122126
"C4",
127+
# flake8-commas
128+
"COM",
123129
# pydocstyle
124130
"D",
125131
# flake8-future-annotations
@@ -176,6 +182,8 @@ extend-select = [
176182
ignore = [
177183
# Within an `except` clause, raise exceptions with `raise ... from`
178184
"B904",
185+
# Trailing comma missing
186+
"COM812",
179187
# Missing docstring in public module
180188
"D100",
181189
# Missing docstring in public class
@@ -232,5 +240,8 @@ ignore = [
232240
"S101",
233241
]
234242

243+
[tool.ruff.lint.isort]
244+
split-on-trailing-comma = false
245+
235246
[tool.ruff.lint.pydocstyle]
236247
convention = "pep257"

tests/test_encoding.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from __future__ import annotations
22

33
import codecs
4+
import random
5+
from io import BytesIO
46
from typing import Any
57

68
from w3lib.encoding import (
@@ -266,9 +268,6 @@ def test_utf16_32(self):
266268
self._assert_encoding("utf-32", "hi".encode("utf-32-be"), "utf-32-be", "hi")
267269

268270
def test_python_crash(self):
269-
import random
270-
from io import BytesIO
271-
272271
random.seed(42)
273272
buf = BytesIO()
274273
for _ in range(150000):

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py39, py310, py311, py312, py313, pypy3.10, docs, pylint, typing, pre-commit, twinecheck
7+
envlist = py39, py310, py311, py312, py313, py314, pypy3.10, pypy3.11, docs, pylint, typing, pre-commit, twinecheck
88

99
[testenv]
1010
deps =
@@ -21,14 +21,14 @@ commands =
2121
basepython = python3
2222
deps =
2323
pytest
24-
mypy==1.15.0
24+
mypy==1.17.0
2525
commands =
2626
mypy --strict {posargs: w3lib tests}
2727

2828
[testenv:pylint]
2929
deps =
3030
{[testenv]deps}
31-
pylint==3.3.6
31+
pylint==3.3.7
3232
commands =
3333
pylint docs tests w3lib
3434

0 commit comments

Comments
 (0)