Functions exported with PyAPI_FUNC():
| Python | Public | Private | Internal | Total |
|---|---|---|---|---|
| 2.7.0 | 738 | 159 | 0 | 897 |
| 3.6.0 | 844 (+106) | 382 (+223) | 0 (same) | 1,226 (+329) |
| 3.7.0 | 869 (+25) | 450 (+68) | 16 (+16) | 1,335 (+109) |
| 3.8.0 | 909 (+40) | 429 (-21) | 83 (+67) | 1,421 (+86) |
| 3.9.0 | 919 (+10) | 412 (-17) | 114 (+31) | 1,445 (+24) |
| 3.10.0 | 885 (-34) | 412 (same) | 120 (+6) | 1,417 (-28) |
| 3.11.0 | 891 (+6) | 360 (-52) | 181 (+61) | 1,432 (+15) |
| 3.12.0 | 929 (+38) | 389 (+29) | 179 (-2) | 1,497 (+65) |
| 3.13.0 | 979 (+50) | 126 (-263) | 329 (+150) | 1,434 (-63) |
| 3.14.0 | 1,055 (+76) | 125 (-1) | 405 (+76) | 1,585 (+151) |
| main (3.15) | 1,059 (+4) | 126 (+1) | 434 (+29) | 1,619 (+34) |
Since Python 3.9, Python is now built with -fvisibility=hidden to avoid
exporting symbols which are not explicitly exported.
The make smelly command checks for public symbols of libpython and C
extension which are prefixed by Py or _Py. See
the Tools/scripts/smelly.py script.
Symbols exported with PyAPI_DATA():
| Python | Public | Private | Internal | Total |
|---|---|---|---|---|
| 2.7.0 | 129 | 30 | 0 | 159 |
| 3.6.0 | 167 (+38) | 42 (+12) | 0 (same) | 209 (+50) |
| 3.7.0 | 170 (+3) | 35 (-7) | 9 (+9) | 214 (+5) |
| 3.8.0 | 174 (+4) | 37 (+2) | 12 (+3) | 223 (+9) |
| 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.0 | 176 (-1) | 30 (-2) | 11 (+1) | 217 (-2) |
| 3.13.0 | 180 (+4) | 14 (-16) | 25 (+14) | 219 (+2) |
| 3.14.0 | 180 (same) | 14 (same) | 29 (+4) | 223 (+4) |
| main (3.15) | 180 (same) | 14 (same) | 29 (same) | 223 (same) |
Number of C API line numbers per Python version:
| Python | Limited API | CPython API | Internal API | Total |
|---|---|---|---|---|
| 2.7.0 | 12,392 (100%) | 0 (0%) | 0 (0%) | 12,392 |
| 3.6.0 | 15,330 (100%) | 0 (0%) | 0 (0%) | 15,330 |
| 3.7.0 | 15,943 (96%) | 0 (0%) | 703 (4%) | 16,646 |
| 3.8.0 | 12,648 (69%) | 3,418 (19%) | 2,241 (12%) | 18,307 |
| 3.9.0 | 11,744 (61%) | 4,359 (23%) | 3,118 (16%) | 19,221 |
| 3.10.0 | 9,909 (49%) | 4,584 (23%) | 5,553 (28%) | 20,046 |
| 3.11.0 | 8,733 (36%) | 5,407 (22%) | 10,079 (42%) | 24,219 |
| 3.12.0 | 9,012 (28%) | 5,836 (18%) | 17,650 (54%) | 32,498 |
| 3.13.0 | 9,107 (21%) | 8,316 (19%) | 26,867 (61%) | 44,290 |
| 3.14.0 | 9,528 (19%) | 8,872 (18%) | 30,665 (62%) | 49,065 |
| main (3.15) | 9,576 (19%) | 8,933 (17%) | 32,841 (64%) | 51,350 |
Number of header file numbers per Python version:
| Python | Limited API | CPython API | Internal API | Total |
|---|---|---|---|---|
| 2.7.0 | 91 | 0 | 0 | 91 |
| 3.6.0 | 98 (+7) | 0 (same) | 0 (same) | 98 (+7) |
| 3.7.0 | 98 (same) | 0 (same) | 12 (+12) | 110 (+12) |
| 3.8.0 | 96 (-2) | 15 (+15) | 22 (+10) | 133 (+23) |
| 3.9.0 | 97 (+1) | 24 (+9) | 34 (+12) | 155 (+22) |
| 3.10.0 | 80 (-17) | 32 (+8) | 49 (+15) | 161 (+6) |
| 3.11.0 | 71 (-9) | 47 (+15) | 69 (+20) | 187 (+26) |
| 3.12.0 | 71 (same) | 49 (+2) | 91 (+22) | 211 (+24) |
| 3.13.0 | 74 (+3) | 57 (+8) | 123 (+32) | 254 (+43) |
| 3.14.0 | 76 (+2) | 57 (same) | 140 (+17) | 273 (+19) |
| main (3.15) | 76 (same) | 57 (same) | 141 (+1) | 274 (+1) |
Public functions defined as macros and static inline functions:
| Python | Macro | Static inline | Total |
|---|---|---|---|
| 2.7.0 | 274 | 0 | 274 |
| 3.6.0 | 306 (+32) | 0 (same) | 306 (+32) |
| 3.7.0 | 315 (+9) | 0 (same) | 315 (+9) |
| 3.8.0 | 314 (-1) | 0 (same) | 314 (-1) |
| 3.9.0 | 307 (-7) | 0 (same) | 307 (-7) |
| 3.10.0 | 307 (same) | 0 (same) | 307 (same) |
| 3.11.0 | 269 (-38) | 42 (+42) | 311 (+4) |
| 3.12.0 | 251 (-18) | 64 (+22) | 315 (+4) |
| 3.13.0 | 249 (-2) | 63 (-1) | 312 (-3) |
| 3.14.0 | 255 (+6) | 60 (-3) | 315 (+3) |
| main (3.15) | 254 (-1) | 60 (same) | 314 (-1) |
Only count public macros and public static inline functions (names starting with "Py" or "PY").
Private functions defined as macros and static inline functions:
| Python | Macro | Static inline | Total |
|---|---|---|---|
| 2.7.0 | 21 | 0 | 21 |
| 3.6.0 | 60 (+39) | 0 (same) | 60 (+39) |
| 3.7.0 | 70 (+10) | 0 (same) | 70 (+10) |
| 3.8.0 | 57 (-13) | 7 (+7) | 64 (-6) |
| 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.0 | 62 (+9) | 7 (+3) | 69 (+12) |
| 3.13.0 | 55 (-7) | 10 (+3) | 65 (-4) |
| 3.14.0 | 64 (+9) | 12 (+2) | 76 (+11) |
| main (3.15) | 66 (+2) | 12 (same) | 78 (+2) |
Only count private macros and public static inline functions (ignore names starting with "Py" or "PY").
Structures in the Python C API:
| Python | Limited API | CPython API | Internal API | Total |
|---|---|---|---|---|
| 2.7.0 | 91 | 0 | 0 | 91 |
| 3.6.0 | 109 (+18) | 0 (same) | 0 (same) | 109 (+18) |
| 3.7.0 | 114 (+5) | 0 (same) | 18 (+18) | 132 (+23) |
| 3.8.0 | 81 (-33) | 34 (+34) | 28 (+10) | 143 (+11) |
| 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.0 | 18 (-1) | 85 (+10) | 170 (+58) | 273 (+67) |
| 3.13.0 | 16 (-2) | 86 (+1) | 231 (+61) | 333 (+60) |
| 3.14.0 | 16 (same) | 83 (-3) | 241 (+10) | 340 (+7) |
| main (3.15) | 17 (+1) | 84 (+1) | 243 (+2) | 344 (+4) |
Count also private structures like "_PyCFrame" and structures with names not starting with Py like "_frozen".