Skip to content

Commit

Permalink
Drop Python 3.8 support
Browse files Browse the repository at this point in the history
Python 3.8 will reach its end of life in October 2024, and
Python 3.9 will become the minimum version required by the project.

Update the GitHub workflows to run tests for Python 3.9, 3.10, 3.11
and 3.12 for future releases.

Update some pinned dependencies due to old errors that seem to
have been fixed.

Remove deprecated docker image for Perceval.

Signed-off-by: Jose Javier Merchante <[email protected]>
  • Loading branch information
jjmerchante committed Sep 18, 2024
1 parent 37f308b commit 5383376
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 230 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Download distribution artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']

name: Python ${{ matrix.python-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Run 'perceval <backend> --help' to get information about a specific backend.

## Requirements

* Python >= 3.8
* Python >= 3.9
* Poetry >= 1.2
* git
* build-essential
Expand Down
19 changes: 0 additions & 19 deletions docker/images/Makefile

This file was deleted.

36 changes: 0 additions & 36 deletions docker/images/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions docker/images/master/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion perceval/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def parse_headers(msg):
hv = []

for text, charset in email.header.decode_header(value):
if type(text) == bytes:
if isinstance(text, bytes):
charset = charset if charset else 'utf-8'
try:
text = text.decode(charset, errors='surrogateescape')
Expand Down
294 changes: 146 additions & 148 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ classifiers = [
perceval = 'perceval.perceval:main'

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"

python-dateutil = "^2.6.0"
requests = "^2.7.0"
Expand All @@ -62,7 +62,7 @@ furo = { version = "^2023.03.27", optional = true }

[tool.poetry.dev-dependencies]
httpretty = "^1.1.4"
flake8 = "^4.0.1"
flake8 = "^7.1.1"
coverage = "^7.2.3"

[tool.poetry.extras]
Expand Down
8 changes: 8 additions & 0 deletions releases/unreleased/python-minimum-version-updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Python minimum version updated
category: dependency
author: Jose Javier Merchante <[email protected]>
issue: null
notes: >
Python 3.8 will reach its end of life in October 2024.
Python 3.9 is the minimum version required by the project.
2 changes: 1 addition & 1 deletion tests/test_mediawiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class HTTPServer():
def routes(cls, version="1.28", empty=False, response_num=200):
"""Configure in http the routes to be served"""

assert(version in TESTED_VERSIONS)
assert version in TESTED_VERSIONS

if version == "1.28":
mediawiki_siteinfo = read_file('data/mediawiki/mediawiki_siteinfo_1.28.json')
Expand Down

0 comments on commit 5383376

Please sign in to comment.