File tree Expand file tree Collapse file tree 9 files changed +116
-56
lines changed Expand file tree Collapse file tree 9 files changed +116
-56
lines changed Original file line number Diff line number Diff line change 26
26
include :
27
27
- python-version : " 3.7"
28
28
os : ubuntu-22.04
29
+ exclude :
30
+ - python-version : " 3.7"
31
+ os : ubuntu-latest
29
32
runs-on : " ${{ matrix.os }}"
30
33
steps :
31
34
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change 2
2
3
3
## 3.1.1 (unreleased)
4
4
5
-
6
- - Declare support for Python 3.12
5
+ - Declare support for Python 3.13
7
6
[ ale-rt]
8
7
9
8
Original file line number Diff line number Diff line change 1
- beautifulsoup4 == 4.12.2
2
- bleach == 6.0.0
3
- build == 0.10.0
4
- certifi == 2024.7.4
5
- cffi == 1.15.1
1
+ beautifulsoup4 == 4.13.3
2
+ build == 1.2.2.post1
3
+ certifi == 2025.1.31
4
+ cffi == 1.17.1
6
5
cfgv == 3.4.0
7
- charset-normalizer == 3.1.0
8
- check-manifest == 0.49
6
+ charset-normalizer == 3.4.1
7
+ check-manifest == 0.50
8
+ cmarkgfm == 2024.11.20
9
9
colorama == 0.4.6
10
- coverage == 7.3.3
11
- cryptography == 44.0.1
12
- distlib == 0.3.8
13
- docutils == 0.19
14
- filelock == 3.13.1
15
- identify == 2.5.33
16
- idna == 3.7
17
- importlib-metadata == 6.6.0
18
- iniconfig == 2.0.0
19
- jaraco.classes == 3.2.3
20
- jeepney == 0.8.0
21
- keyring == 23.13.1
22
- lxml == 4.9.3
23
- markdown-it-py == 2.2.0
10
+ coverage == 7.8.0
11
+ cryptography == 44.0.2
12
+ distlib == 0.3.9
13
+ docutils == 0.21.2
14
+ filelock == 3.18.0
15
+ id == 1.5.0
16
+ identify == 2.6.9
17
+ idna == 3.10
18
+ iniconfig == 2.1.0
19
+ jaraco.classes == 3.4.0
20
+ jaraco.context == 6.0.1
21
+ jaraco.functools == 4.1.0
22
+ jeepney == 0.9.0
23
+ keyring == 25.6.0
24
+ lxml == 5.3.2
25
+ markdown-it-py == 3.0.0
24
26
mdurl == 0.1.2
25
- more-itertools == 9.1 .0
26
- nodeenv == 1.8.0
27
- packaging == 23.2
28
- pkginfo == 1.9.6
29
- platformdirs == 4.1.0
30
- pluggy == 1 .3.0
31
- pre-commit == 3 .5.0; python_version < = "3.8"
32
- pre-commit == 3.6.0 ; python_version > "3.8"
33
- pycparser == 2.21
34
- Pygments == 2.15 .1
35
- pyproject_hooks == 1.0 .0
27
+ more-itertools == 10.6 .0
28
+ nh3 == 0.2.21
29
+ nodeenv == 1.9.1
30
+ packaging == 24.2
31
+ pip == 24.2
32
+ platformdirs == 4 .3.7
33
+ pluggy == 1 .5.0
34
+ pre_commit == 4.2.0
35
+ pycparser == 2.22
36
+ Pygments == 2.19 .1
37
+ pyproject_hooks == 1.2 .0
36
38
pyroma == 4.2
37
- pytest == 7.4.3
38
- pytest-cov == 4 .1.0
39
- PyYAML == 6.0.1
40
- readme-renderer == 37.3
41
- requests == 2.32.2
39
+ pytest == 8.3.5
40
+ pytest-cov == 6 .1.1
41
+ PyYAML == 6.0.2
42
+ readme_renderer == 44.0
43
+ requests == 2.32.3
42
44
requests-toolbelt == 1.0.0
43
45
rfc3986 == 2.0.0
44
- rich == 13.3.5
46
+ rich == 14.0.0
45
47
SecretStorage == 3.3.3
46
- six == 1.16.0
47
- soupsieve == 2.5
48
- trove-classifiers == 2023.5.2
49
- twine == 4.0.2
50
- urllib3 == 1.26.19
51
- virtualenv == 20.26.6
52
- webencodings == 0.5.1
53
- zest.releaser == 8.0.0
54
- zipp == 3.19.1
48
+ setuptools == 78.1.0
49
+ soupsieve == 2.6
50
+ trove-classifiers == 2025.3.19.19
51
+ twine == 6.1.0
52
+ typing_extensions == 4.13.1
53
+ urllib3 == 2.3.0
54
+ virtualenv == 20.30.0
55
+ wheel == 0.45.1
56
+ zest.releaser == 9.5.0
57
+ -e git+ssh://git@github.com/collective/zpretty.git@71e0eec2a3b00b43413714917e93e3d9c5550a5f#egg=zpretty
Original file line number Diff line number Diff line change @@ -265,8 +265,8 @@ def render_doctype(self):
265
265
"""Render a properly indented comment"""
266
266
doctype = f"{ self .prefix } { self .context .PREFIX } { self .text } { self .context .SUFFIX } "
267
267
if isinstance (
268
- self .context .nextSibling , NavigableString
269
- ) and self .context .nextSibling .startswith ("\n " ):
268
+ self .context .next_sibling , NavigableString
269
+ ) and self .context .next_sibling .startswith ("\n " ):
270
270
doctype = doctype .rstrip ()
271
271
return doctype
272
272
Original file line number Diff line number Diff line change 1
- from pkg_resources import resource_filename
2
1
from tempfile import TemporaryDirectory
3
2
from unittest import TestCase
4
3
from zpretty .prettifier import ZPrettifier
9
8
import os
10
9
11
10
11
+ try :
12
+ from importlib .resources import files
13
+
14
+ def resource_filename (package , resource ):
15
+ """Get the resource filename for a package and resource."""
16
+ return str (files (package ).joinpath (resource ))
17
+
18
+ except ImportError : # Python < 3.9
19
+ # Python < 3.9
20
+ from pkg_resources import resource_filename
21
+
22
+
12
23
class TestCli (TestCase ):
13
24
"""Test the cli options"""
14
25
Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
- from pkg_resources import resource_filename
3
2
from unittest import TestCase
4
3
from zpretty .tests .mock import MockCLIRunner
5
4
6
5
import argparse
7
6
import sys
8
7
9
8
9
+ try :
10
+ from importlib .resources import files
11
+
12
+ def resource_filename (package , resource ):
13
+ """Get the resource filename for a package and resource."""
14
+ return str (files (package ).joinpath (resource ))
15
+
16
+ except ImportError : # Python < 3.9
17
+ # Python < 3.9
18
+ from pkg_resources import resource_filename
19
+
20
+
10
21
class TestReadme (TestCase ):
11
22
"""Test zpretty"""
12
23
Original file line number Diff line number Diff line change 1
1
from bs4 import BeautifulSoup
2
- from pkg_resources import resource_filename
3
2
from unittest import TestCase
4
3
from zpretty .xml import XMLElement
5
4
from zpretty .xml import XMLPrettifier
6
5
7
6
7
+ try :
8
+ from importlib .resources import files
9
+
10
+ def resource_filename (package , resource ):
11
+ """Get the resource filename for a package and resource."""
12
+ return str (files (package ).joinpath (resource ))
13
+
14
+ except ImportError : # Python < 3.9
15
+ # Python < 3.9
16
+ from pkg_resources import resource_filename
17
+
18
+
8
19
class TestZpretty (TestCase ):
9
20
"""Test zpretty"""
10
21
Original file line number Diff line number Diff line change 1
1
from bs4 import BeautifulSoup
2
- from pkg_resources import resource_filename
3
2
from unittest import TestCase
4
3
from zpretty .zcml import ZCMLAttributes
5
4
from zpretty .zcml import ZCMLElement
6
5
from zpretty .zcml import ZCMLPrettifier
7
6
8
7
8
+ try :
9
+ from importlib .resources import files
10
+
11
+ def resource_filename (package , resource ):
12
+ """Get the resource filename for a package and resource."""
13
+ return str (files (package ).joinpath (resource ))
14
+
15
+ except ImportError : # Python < 3.9
16
+ # Python < 3.9
17
+ from pkg_resources import resource_filename
18
+
19
+
9
20
class TestZpretty (TestCase ):
10
21
"""Test zpretty"""
11
22
Original file line number Diff line number Diff line change 1
- from pkg_resources import resource_filename
2
1
from unittest import TestCase
3
2
from zpretty .prettifier import ZPrettifier
4
3
5
4
5
+ try :
6
+ from importlib .resources import files
7
+
8
+ def resource_filename (package , resource ):
9
+ """Get the resource filename for a package and resource."""
10
+ return str (files (package ).joinpath (resource ))
11
+
12
+ except ImportError : # Python < 3.9
13
+ # Python < 3.9
14
+ from pkg_resources import resource_filename
15
+
16
+
6
17
class TestZpretty (TestCase ):
7
18
"""Test zpretty"""
8
19
You can’t perform that action at this time.
0 commit comments