Skip to content

Commit

Permalink
Fix exclusion list
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Jul 22, 2023
1 parent 57898c5 commit 084e7c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
7 changes: 2 additions & 5 deletions doc/pythoncapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ def list_files(path):
if not os.path.exists(path):
return []
files = glob.glob(os.path.join(path, '*.h'))
for index, name in enumerate(files):
if os.path.basename(name) in EXCLUDE_HEADERS:
del files[index]
break
return files
return [name for name in files
if os.path.basename(name) not in EXCLUDE_HEADERS]


def _get_types(filename, names):
Expand Down
20 changes: 10 additions & 10 deletions doc/stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Python Limited API CPython API Internal API Total
3.9.0 11,744 (61%) 4,359 (23%) 3,084 (16%) 19,187
3.10.0 9,909 (50%) 4,584 (23%) 5,519 (28%) 20,012
3.11.0 8,733 (36%) 5,407 (22%) 10,047 (42%) 24,187
3.12 (dev) 9,099 (28%) 5,815 (18%) 17,631 (54%) 32,545
main (3.13) 8,835 (26%) 4,731 (14%) 20,599 (60%) 34,165
3.12 (dev) 8,989 (28%) 5,815 (18%) 17,631 (54%) 32,435
main (3.13) 8,721 (26%) 4,731 (14%) 20,599 (60%) 34,051
=========== ============= =========== ============ ======

File Numbers
Expand All @@ -36,8 +36,8 @@ Python Limited API CPython API Internal API Total
3.9.0 97 (+1) 24 (+9) 33 (+12) 154 (+22)
3.10.0 80 (-17) 32 (+8) 48 (+15) 160 (+6)
3.11.0 71 (-9) 47 (+15) 68 (+20) 186 (+26)
3.12 (dev) 71 (same) 48 (+1) 91 (+23) 210 (+24)
main (3.13) 71 (same) 50 (+2) 97 (+6) 218 (+8)
3.12 (dev) 70 (-1) 48 (+1) 91 (+23) 209 (+23)
main (3.13) 70 (same) 50 (+2) 97 (+6) 217 (+8)
=========== =========== =========== ============ =========

Functions
Expand Down Expand Up @@ -81,8 +81,8 @@ Python Public Private Internal Total
3.9.0 173 (-1) 35 (-2) 14 (+2) 222 (-1)
3.10.0 173 (same) 33 (-2) 13 (-1) 219 (-3)
3.11.0 177 (+4) 32 (-1) 10 (-3) 219 (same)
3.12 (dev) 176 (-1) 31 (-1) 12 (+2) 219 (same)
main (3.13) 176 (same) 19 (-12) 17 (+5) 212 (-7)
3.12 (dev) 176 (-1) 29 (-3) 12 (+2) 217 (-2)
main (3.13) 176 (same) 17 (-12) 17 (+5) 210 (-7)
=========== ========== ======== ======== ==========

Public functions defined as macros and static inline functions
Expand Down Expand Up @@ -121,8 +121,8 @@ Python Macro Static inline Total
3.9.0 43 (-14) 11 (+4) 54 (-10)
3.10.0 44 (+1) 18 (+7) 62 (+8)
3.11.0 53 (+9) 4 (-14) 57 (-5)
3.12 (dev) 66 (+13) 7 (+3) 73 (+16)
main (3.13) 61 (-5) 7 (same) 68 (-5)
3.12 (dev) 64 (+11) 7 (+3) 71 (+14)
main (3.13) 59 (-5) 7 (same) 66 (-5)
=========== ======== ============= ========

Only count private macros and public static inline functions (ignore names starting with "Py" or "PY").
Expand All @@ -142,8 +142,8 @@ Python Limited API CPython API Internal API Total
3.9.0 68 (-13) 46 (+12) 38 (+10) 152 (+9)
3.10.0 41 (-27) 53 (+7) 91 (+53) 185 (+33)
3.11.0 19 (-22) 75 (+22) 112 (+21) 206 (+21)
3.12 (dev) 23 (+4) 84 (+9) 170 (+58) 277 (+71)
main (3.13) 23 (same) 85 (+1) 179 (+9) 287 (+10)
3.12 (dev) 18 (-1) 84 (+9) 170 (+58) 272 (+66)
main (3.13) 18 (same) 85 (+1) 179 (+9) 282 (+10)
=========== =========== =========== ============ =========

Count also private structures like "_PyCFrame" and structures with names not starting with Py like "_frozen".
Expand Down

0 comments on commit 084e7c1

Please sign in to comment.