Repository navigation
Commit 240b24a
committed
fix(python): docstrings and __future__ imports are no namespace barriers
The namespace facts proved only plain one-line strings safe, so every triple-quoted string statement (a module, class or attribute docstring) was an unknown EFFECT, and from __future__ import x was UNSUPPORTED. A barrier withdraws every name bound before it: sqlalchemy's sql/expression.py lost its 149 re-exports to the docstring after nullsfirst = nulls_first, and a docstring made an otherwise plain class unproven. A string literal now evaluates nothing in any quoting or prefix (r, b, u, rb), implicit concatenations included; an f-string with a replacement field stays an effect (__format__/__str__ may run code). from __future__ import x [as y] binds like a from-import of module __future__; a star import from __future__ is a syntax error and stays unsupported.
CBM_PY_NAMESPACE_FACTS_VERSION moves to 2. The version travels in the lsp_surface py payload and a payload of another version does not decode, so the first incremental run on an index of an older binary falls back to a full re-index (delta.rehydrate_failed -> CBM_PIPELINE_FORCE_FULL_REINDEX) instead of mixing old and new facts. The codec test now spells the current version and rejects a version-1 payload.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 35598e6 commit 240b24a
3 files changed
Lines changed: 87 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
487 | 518 | | |
488 | 519 | | |
489 | 520 | | |
| |||
496 | 527 | | |
497 | 528 | | |
498 | 529 | | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
| 530 | + | |
| 531 | + | |
504 | 532 | | |
505 | 533 | | |
506 | 534 | | |
| |||
549 | 577 | | |
550 | 578 | | |
551 | 579 | | |
552 | | - | |
553 | | - | |
| 580 | + | |
554 | 581 | | |
555 | 582 | | |
556 | 583 | | |
| |||
573 | 600 | | |
574 | 601 | | |
575 | 602 | | |
| 603 | + | |
| 604 | + | |
576 | 605 | | |
577 | 606 | | |
578 | 607 | | |
| |||
840 | 869 | | |
841 | 870 | | |
842 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
843 | 901 | | |
844 | 902 | | |
845 | 903 | | |
| |||
848 | 906 | | |
849 | 907 | | |
850 | 908 | | |
| 909 | + | |
| 910 | + | |
851 | 911 | | |
852 | 912 | | |
853 | 913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22988 | 22988 | | |
22989 | 22989 | | |
22990 | 22990 | | |
22991 | | - | |
22992 | | - | |
| 22991 | + | |
| 22992 | + | |
| 22993 | + | |
| 22994 | + | |
| 22995 | + | |
| 22996 | + | |
22993 | 22997 | | |
22994 | 22998 | | |
22995 | 22999 | | |
22996 | 23000 | | |
22997 | 23001 | | |
22998 | 23002 | | |
22999 | | - | |
| 23003 | + | |
23000 | 23004 | | |
| 23005 | + | |
| 23006 | + | |
23001 | 23007 | | |
23002 | 23008 | | |
23003 | | - | |
| 23009 | + | |
23004 | 23010 | | |
23005 | 23011 | | |
23006 | | - | |
| 23012 | + | |
23007 | 23013 | | |
23008 | 23014 | | |
23009 | 23015 | | |
23010 | | - | |
| 23016 | + | |
23011 | 23017 | | |
23012 | 23018 | | |
23013 | 23019 | | |
| |||
23027 | 23033 | | |
23028 | 23034 | | |
23029 | 23035 | | |
23030 | | - | |
| 23036 | + | |
23031 | 23037 | | |
23032 | 23038 | | |
23033 | 23039 | | |
| |||
23040 | 23046 | | |
23041 | 23047 | | |
23042 | 23048 | | |
| 23049 | + | |
23043 | 23050 | | |
23044 | 23051 | | |
23045 | 23052 | | |
| |||
0 commit comments