17
17
===========
18
18
19
19
PyPI projects that match "pytest-\*" are considered plugins and are listed
20
- automatically. Packages classified as inactive are excluded.
20
+ automatically together with a manually-maintained list in `the source
21
+ code <https://github.com/pytest-dev/pytest/blob/main/scripts/update-plugin-list.py>`_.
22
+ Packages classified as inactive are excluded.
21
23
22
24
.. The following conditional uses a different format for this list when
23
25
creating a PDF, because otherwise the table gets far too wide for the
33
35
"Development Status :: 6 - Mature" ,
34
36
"Development Status :: 7 - Inactive" ,
35
37
)
38
+ ADDITIONAL_PROJECTS = { # set of additional projects to consider as plugins
39
+ "logassert" ,
40
+ }
36
41
37
42
38
43
def escape_rst (text : str ) -> str :
@@ -52,18 +57,18 @@ def iter_plugins():
52
57
regex = r">([\d\w-]*)</a>"
53
58
response = requests .get ("https://pypi.org/simple" )
54
59
55
- matches = list (
56
- match
57
- for match in re .finditer (regex , response .text )
58
- if match .groups ()[0 ].startswith ("pytest-" )
59
- )
60
+ match_names = (match .groups ()[0 ] for match in re .finditer (regex , response .text ))
61
+ plugin_names = [
62
+ name
63
+ for name in match_names
64
+ if name .startswith ("pytest-" ) or name in ADDITIONAL_PROJECTS
65
+ ]
60
66
61
- for match in tqdm (matches , smoothing = 0 ):
62
- name = match .groups ()[0 ]
67
+ for name in tqdm (plugin_names , smoothing = 0 ):
63
68
response = requests .get (f"https://pypi.org/pypi/{ name } /json" )
64
69
if response .status_code == 404 :
65
- # Some packages, like pytest-azurepipelines42, are included in https://pypi.org/simple but
66
- # return 404 on the JSON API. Skip.
70
+ # Some packages, like pytest-azurepipelines42, are included in https://pypi.org/simple
71
+ # but return 404 on the JSON API. Skip.
67
72
continue
68
73
response .raise_for_status ()
69
74
info = response .json ()["info" ]
0 commit comments