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.13, drop Python 3.8 and PyPy 3.8, update tool versions, add twinecheck #52

Merged
merged 4 commits into from
Oct 16, 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
20 changes: 11 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 3.8
env:
TOXENV: py
- python-version: 3.9
- python-version: "3.9"
env:
TOXENV: py
- python-version: "3.10"
Expand All @@ -23,20 +20,25 @@ jobs:
- python-version: "3.12"
env:
TOXENV: py

# PyPY
- python-version: pypy3.8
Gallaecio marked this conversation as resolved.
Show resolved Hide resolved
- python-version: "3.13"
env:
TOXENV: pypy3
TOXENV: py

# PyPy
- python-version: pypy3.10
env:
TOXENV: pypy3

# checks
- python-version: "3.13"
env:
TOXENV: twinecheck

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
- run: pip install --upgrade setuptools wheel
- run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ repos:
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.10.0
- hooks:
- id: isort
language_version: python3
repo: https://github.com/timothycrosley/isort
rev: 5.12.0
rev: 5.13.2
- hooks:
- id: flake8
language_version: python3
Expand All @@ -17,4 +17,4 @@ repos:
- flake8-debugger
- flake8-string-format
repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.1.1
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
universal = 1

[metadata]
description-file = README.rst
description_file = README.rst

[aliases]
test=pytest tests
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
package_dir={"": "src"},
packages=find_packages("src"),
py_modules=["protego"],
python_requires=">=3.8",
tests_require=["pytest"],
python_requires=">=3.9",
include_package_data=True,
keywords=["robots.txt", "parser", "robots", "rep"],
classifiers=[
Expand All @@ -25,11 +24,11 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
1 change: 1 addition & 0 deletions tests/fetch_robotstxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
-----
>>> python fetch_robotstxt.py -l top-10000-websites.txt -d test_data
"""

import argparse
import os
import sys
Expand Down
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ basepython = pypy3
commands =
pip install -e .
pypy -m pytest {posargs:tests}

[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true

[testenv:twinecheck]
basepython = python3
deps =
twine==5.1.1
build==1.2.2
commands =
python -m build --sdist
twine check dist/*
Loading