Skip to content

Commit 22ae4a6

Browse files
committed
Parse also Modules/posixmodule.h internal header
1 parent 836252a commit 22ae4a6

2 files changed

Lines changed: 29 additions & 25 deletions

File tree

‎doc/pythoncapi.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
PATH_LIMITED_API = 'Include'
2424
PATH_CPYTHON_API = os.path.join('Include', 'cpython')
2525
PATH_INTERNAL_API = os.path.join('Include', 'internal')
26+
POSIXMODULE_H = 'Modules/posixmodule.h'
2627

2728
RE_IDENTIFIER = r'[A-Za-z_][A-Za-z0-9_]*'
2829
RE_STRUCT_START = re.compile(r'^(?:typedef +)?struct(?: +([A-Za-z0-9_]+))? *{', re.MULTILINE)
@@ -101,8 +102,11 @@ def list_files(path):
101102
if not os.path.exists(path):
102103
return []
103104
files = glob.glob(os.path.join(path, '*.h'))
104-
return [name for name in files
105-
if os.path.basename(name) not in EXCLUDE_HEADERS]
105+
if path == PATH_INTERNAL_API:
106+
files.append(POSIXMODULE_H)
107+
files = [name for name in files
108+
if os.path.basename(name) not in EXCLUDE_HEADERS]
109+
return files
106110

107111

108112
def _get_types(filename, names):

‎doc/stats.rst‎

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Python Limited API CPython API Internal API Total
1212
=========== ============= =========== ============ ======
1313
2.7.0 12,392 (100%) 0 (0%) 0 (0%) 12,392
1414
3.6.0 15,330 (100%) 0 (0%) 0 (0%) 15,330
15-
3.7.0 15,943 (96%) 0 (0%) 678 (4%) 16,621
16-
3.8.0 12,648 (69%) 3,418 (19%) 2,207 (12%) 18,273
17-
3.9.0 11,744 (61%) 4,359 (23%) 3,084 (16%) 19,187
18-
3.10.0 9,909 (50%) 4,584 (23%) 5,519 (28%) 20,012
19-
3.11.0 8,733 (36%) 5,407 (22%) 10,047 (42%) 24,187
20-
3.12 (dev) 8,989 (28%) 5,815 (18%) 17,631 (54%) 32,435
21-
main (3.13) 8,725 (25%) 4,354 (13%) 21,444 (62%) 34,523
15+
3.7.0 15,943 (96%) 0 (0%) 703 (4%) 16,646
16+
3.8.0 12,648 (69%) 3,418 (19%) 2,241 (12%) 18,307
17+
3.9.0 11,744 (61%) 4,359 (23%) 3,118 (16%) 19,221
18+
3.10.0 9,909 (49%) 4,584 (23%) 5,553 (28%) 20,046
19+
3.11.0 8,733 (36%) 5,407 (22%) 10,079 (42%) 24,219
20+
3.12 (dev) 8,989 (28%) 5,815 (18%) 17,663 (54%) 32,467
21+
main (3.13) 8,617 (23%) 7,162 (19%) 21,483 (58%) 37,262
2222
=========== ============= =========== ============ ======
2323

2424
File Numbers
@@ -31,13 +31,13 @@ Python Limited API CPython API Internal API Total
3131
=========== =========== =========== ============ =========
3232
2.7.0 91 0 0 91
3333
3.6.0 98 (+7) 0 (same) 0 (same) 98 (+7)
34-
3.7.0 98 (same) 0 (same) 11 (+11) 109 (+11)
35-
3.8.0 96 (-2) 15 (+15) 21 (+10) 132 (+23)
36-
3.9.0 97 (+1) 24 (+9) 33 (+12) 154 (+22)
37-
3.10.0 80 (-17) 32 (+8) 48 (+15) 160 (+6)
38-
3.11.0 71 (-9) 47 (+15) 68 (+20) 186 (+26)
39-
3.12 (dev) 70 (-1) 48 (+1) 91 (+23) 209 (+23)
40-
main (3.13) 71 (+1) 50 (+2) 100 (+9) 221 (+12)
34+
3.7.0 98 (same) 0 (same) 12 (+12) 110 (+12)
35+
3.8.0 96 (-2) 15 (+15) 22 (+10) 133 (+23)
36+
3.9.0 97 (+1) 24 (+9) 34 (+12) 155 (+22)
37+
3.10.0 80 (-17) 32 (+8) 49 (+15) 161 (+6)
38+
3.11.0 71 (-9) 47 (+15) 69 (+20) 187 (+26)
39+
3.12 (dev) 70 (-1) 48 (+1) 92 (+23) 210 (+23)
40+
main (3.13) 71 (+1) 54 (+6) 101 (+9) 226 (+16)
4141
=========== =========== =========== ============ =========
4242

4343
Functions
@@ -50,13 +50,13 @@ Python Public Private Internal Total
5050
=========== ========== ========== ========= ============
5151
2.7.0 738 159 0 897
5252
3.6.0 844 (+106) 382 (+223) 0 (same) 1,226 (+329)
53-
3.7.0 869 (+25) 450 (+68) 12 (+12) 1,331 (+105)
54-
3.8.0 909 (+40) 429 (-21) 78 (+66) 1,416 (+85)
55-
3.9.0 919 (+10) 412 (-17) 109 (+31) 1,440 (+24)
56-
3.10.0 885 (-34) 412 (same) 115 (+6) 1,412 (-28)
57-
3.11.0 891 (+6) 360 (-52) 176 (+61) 1,427 (+15)
58-
3.12 (dev) 928 (+37) 385 (+25) 177 (+1) 1,490 (+63)
59-
main (3.13) 941 (+13) 91 (-294) 183 (+6) 1,215 (-275)
53+
3.7.0 869 (+25) 450 (+68) 16 (+16) 1,335 (+109)
54+
3.8.0 909 (+40) 429 (-21) 83 (+67) 1,421 (+86)
55+
3.9.0 919 (+10) 412 (-17) 114 (+31) 1,445 (+24)
56+
3.10.0 885 (-34) 412 (same) 120 (+6) 1,417 (-28)
57+
3.11.0 891 (+6) 360 (-52) 181 (+61) 1,432 (+15)
58+
3.12 (dev) 928 (+37) 385 (+25) 182 (+1) 1,495 (+63)
59+
main (3.13) 941 (+13) 86 (-299) 192 (+10) 1,219 (-276)
6060
=========== ========== ========== ========= ============
6161

6262
Since Python 3.9, Python is now built with ``-fvisibility=hidden`` to avoid
@@ -82,7 +82,7 @@ Python Public Private Internal Total
8282
3.10.0 173 (same) 33 (-2) 13 (-1) 219 (-3)
8383
3.11.0 177 (+4) 32 (-1) 10 (-3) 219 (same)
8484
3.12 (dev) 176 (-1) 29 (-3) 12 (+2) 217 (-2)
85-
main (3.13) 177 (+1) 14 (-15) 19 (+7) 210 (-7)
85+
main (3.13) 178 (+2) 14 (-15) 18 (+6) 210 (-7)
8686
=========== ========== ======== ======== ==========
8787

8888
Public functions defined as macros and static inline functions
@@ -122,7 +122,7 @@ Python Macro Static inline Total
122122
3.10.0 44 (+1) 18 (+7) 62 (+8)
123123
3.11.0 53 (+9) 4 (-14) 57 (-5)
124124
3.12 (dev) 64 (+11) 7 (+3) 71 (+14)
125-
main (3.13) 52 (-12) 7 (same) 59 (-12)
125+
main (3.13) 53 (-11) 9 (+2) 62 (-9)
126126
=========== ======== ============= ========
127127

128128
Only count private macros and public static inline functions (ignore names starting with "Py" or "PY").

0 commit comments

Comments
 (0)