Skip to content

Commit f41b216

Browse files
authored
Update tool versions, add description (#227)
1 parent 0329304 commit f41b216

File tree

6 files changed

+28
-12
lines changed

6 files changed

+28
-12
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
include:
18-
- python-version: "3.8"
18+
- python-version: "3.12" # Keep in sync with .readthedocs.yml
1919
env:
2020
TOXENV: docs
2121
- python-version: "3.12"
@@ -27,12 +27,15 @@ jobs:
2727
- python-version: "3.12"
2828
env:
2929
TOXENV: typing
30+
- python-version: "3.12"
31+
env:
32+
TOXENV: twinecheck
3033

3134
steps:
3235
- uses: actions/checkout@v4
3336

3437
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v4
38+
uses: actions/setup-python@v5
3639
with:
3740
python-version: ${{ matrix.python-version }}
3841

.github/workflows/publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Set up Python 3.12
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: 3.12
1919

@@ -27,9 +27,8 @@ jobs:
2727
- name: Publish to PyPI
2828
if: steps.check-release-tag.outputs.release_tag == 'true'
2929
run: |
30-
pip install --upgrade pip
31-
pip install --upgrade setuptools wheel twine
32-
python setup.py sdist bdist_wheel
30+
pip install --upgrade build twine
31+
python -m build
3332
export TWINE_USERNAME=__token__
3433
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
3534
twine upload dist/*

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121

2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/PyCQA/bandit
3-
rev: 1.7.7
3+
rev: 1.7.8
44
hooks:
55
- id: bandit
66
args: [-r, -c, .bandit.yml]
@@ -9,7 +9,7 @@ repos:
99
hooks:
1010
- id: flake8
1111
- repo: https://github.com/psf/black.git
12-
rev: 24.1.1
12+
rev: 24.4.2
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/pycqa/isort

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
from setuptools import find_packages, setup
22

3+
with open("README.rst", encoding="utf-8") as f:
4+
long_description = f.read()
5+
36
setup(
47
name="w3lib",
58
version="2.1.2",
69
license="BSD",
710
description="Library of web-related functions",
11+
long_description=long_description,
12+
long_description_content_type="text/x-rst",
813
author="Scrapy project",
914
author_email="info@scrapy.org",
1015
url="https://github.com/scrapy/w3lib",

tox.ini

Lines changed: 12 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 = py38, py39, py310, py311, py312, pypy3, docs, pylint, typing, pre-commit
7+
envlist = py38, py39, py310, py311, py312, pypy3, docs, pylint, typing, pre-commit, twinecheck
88

99
[testenv]
1010
deps =
@@ -21,14 +21,14 @@ basepython = python3
2121
deps =
2222
# mypy would error if pytest (or its sub) not found
2323
pytest
24-
mypy==1.0.0
24+
mypy==1.10.0
2525
commands =
2626
mypy --strict {posargs: w3lib tests}
2727

2828
[testenv:pylint]
2929
deps =
3030
{[testenv]deps}
31-
pylint==3.0.0
31+
pylint==3.2.2
3232
commands =
3333
pylint conftest.py docs setup.py tests w3lib
3434

@@ -42,3 +42,12 @@ commands =
4242
deps = pre-commit
4343
commands = pre-commit run --all-files --show-diff-on-failure
4444
skip_install = true
45+
46+
[testenv:twinecheck]
47+
basepython = python3
48+
deps =
49+
twine==5.1.0
50+
build==1.2.1
51+
commands =
52+
python -m build --sdist
53+
twine check dist/*

0 commit comments

Comments
 (0)