Skip to content

Commit 2b30c70

Browse files
Merge pull request #90 from weblyzard/feature/python-3.13
Feature/python 3.13
2 parents 667b356 + 863201a commit 2b30c70

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ on:
77
jobs:
88
build:
99

10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
14+
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
1515

1616
steps:
1717
- uses: actions/checkout@v3

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "inscriptis"
3-
version = "2.5.0"
3+
version = "2.5.1"
44
authors = ["Albert Weichselbraun <[email protected]>", "Fabian Odoni <[email protected]>"]
55
description = "inscriptis - HTML to text converter."
66
keywords = ["HTML", "converter", "text"]
@@ -12,11 +12,11 @@ classifiers = [
1212
'Topic :: Text Processing :: Markup :: HTML',
1313
'Topic :: Utilities',
1414
'Programming Language :: Python :: 3',
15-
'Programming Language :: Python :: 3.8',
1615
'Programming Language :: Python :: 3.9',
1716
'Programming Language :: Python :: 3.10',
1817
'Programming Language :: Python :: 3.11',
1918
'Programming Language :: Python :: 3.12',
19+
'Programming Language :: Python :: 3.13',
2020
]
2121
homepage = "https://github.com/weblyzard/inscriptis"
2222
repository = "https://github.com/weblyzard/inscriptis"
@@ -39,13 +39,13 @@ web-service = ["fastapi", "uvicorn"]
3939

4040

4141
[tool.poetry.dependencies]
42-
python = "^3.8 || ^3.9 || ^3.10 || ^3.11 || ^3.12"
43-
requests = ">=2.31.0"
42+
python = "^3.9 || ^3.10 || ^3.11 || ^3.12 || ^3.13"
43+
requests = "2.32.2"
4444
lxml = ">=4.9.3"
4545

4646
# optional dependencies
47-
fastapi = { version = "^0.109.0", optional = true }
48-
uvicorn = { version = "^0.25.0", optional = true }
47+
fastapi = { version = "^0.109.1", optional = true }
48+
uvicorn = { version = "^0.27.1", optional = true }
4949

5050

5151
[build-system]
@@ -56,7 +56,7 @@ build-backend = "poetry.core.masonry.api"
5656
# code formatting with black
5757
[tool.black]
5858
line-length = 88
59-
target-version = ["py38", "py39", "py310", "py311", "py312"]
59+
target-version = ["py39", "py310", "py311", "py312", "py313"]
6060
extend-exclude = '\.html$|\.json$|\.txt$|/a$|/b$'
6161
include = '''
6262
^/src/|^/tests/|^/benchmarking/|^/examples/

src/inscriptis/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
__copyright__ = (
1010
f"{metadata.metadata(PACKAGE)['Name']} "
11-
+ f"{metadata.metadata(PACKAGE)['Version']} © 2016-2023 {__author__}"
11+
+ f"{metadata.metadata(PACKAGE)['Version']} © 2016-2025 {__author__}"
1212
)
1313
__license__ = metadata.metadata(PACKAGE)["License"]
1414
__version__ = metadata.metadata(PACKAGE)["Version"]

src/inscriptis/model/attribute.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ def apply_attributes(
5757
attributes: the list of attributes
5858
html_element: the HTML element for which the attributes are parsed
5959
"""
60-
supported_attributes = (
61-
(name, val)
62-
for name, val in attributes.items()
63-
if name in self.attribute_mapping
64-
)
65-
for attr_name, attr_value in supported_attributes:
66-
self.attribute_mapping[attr_name](attr_value, html_element)
60+
for attr_name, attr_value in attributes.items():
61+
if attr_name in self.attribute_mapping:
62+
self.attribute_mapping[attr_name](attr_value, html_element)
6763
return html_element
6864

6965
def merge_attribute_map(self, annotations: List[ApplyAnnotation] = None) -> None:

0 commit comments

Comments
 (0)