{{ message }}
Commit 96c8475
authored
* bpo-38234: Py_SetPath() uses the program full path (GH-16357)
Py_SetPath() now sets sys.executable to the program full path
(Py_GetProgramFullPath()), rather than to the program name
(Py_GetProgramName()).
Fix also memory leaks in pathconfig_set_from_config().
(cherry picked from commit 1ce152a)
* bpo-38234: Add tests for Python init path config (GH-16358)
(cherry picked from commit bb6bf7d)
* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)
Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed
to test pyvenv.cfg and pybuilddir.txt configuration files.
Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8
encoding, not ASCII.
(cherry picked from commit 52ad33a)
* bpo-38234: Cleanup getpath.c (GH-16367)
* search_for_prefix() directly calls reduce() if found is greater
than 0.
* Add calculate_pybuilddir() subfunction.
* search_for_prefix(): add path string buffer for readability.
* Fix some error handling code paths: release resources on error.
* calculate_read_pyenv(): rename tmpbuffer to filename.
* test.pythoninfo now also logs windows.dll_path
(cherry picked from commit 221fd84)
* bpo-38234: Fix test_embed pathconfig tests (GH-16390)
bpo-38234: On macOS and FreeBSD, the temporary directory can be
symbolic link. For example, /tmp can be a symbolic link to /var/tmp.
Call realpath() to resolve all symbolic links.
(cherry picked from commit 00508a7)
* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)
* Add test_embed.test_init_setpath_config(): test Py_SetPath()
with PyConfig.
* test_init_setpath() and test_init_setpythonhome() no longer call
Py_SetProgramName(), but use the default program name.
* _PyPathConfig: isolated, site_import and base_executable
fields are now only available on Windows.
* If executable is set explicitly in the configuration, ignore
calculated base_executable: _PyConfig_InitPathConfig() copies
executable to base_executable.
* Complete path config documentation.
(cherry picked from commit 8bf39b6)
* bpo-38234: Complete init config documentation (GH-16404)
(cherry picked from commit 88feaec)
* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)
Explicitly preinitializes with a Python preconfiguration to avoid
Py_SetPath() implicit preinitialization with a compat
preconfiguration.
Fix also test_init_setpath() and test_init_setpythonhome() on macOS:
use self.test_exe as the executable (and base_executable), rather
than shutil.which('python3').
(cherry picked from commit 49d99f0)
* bpo-38234: Py_Initialize() sets global path configuration (GH-16421)
* Py_InitializeFromConfig() now writes PyConfig path configuration to
the global path configuration (_Py_path_config).
* Add test_embed.test_get_pathconfig().
* Fix typo in _PyWideStringList_Join().
(cherry picked from commit 12f2f17)
1 parent 68040ed commit 96c8475
13 files changed
Lines changed: 795 additions & 208 deletions
File tree
- Doc
- c-api
- whatsnew
- Include/internal
- Lib
- test
- Misc/NEWS.d/next/C API
- Modules
- PC
- Programs
- Python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
303 | | - | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| |||
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
467 | | - | |
| 468 | + | |
468 | 469 | | |
469 | 470 | | |
470 | 471 | | |
| |||
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | | - | |
| 486 | + | |
486 | 487 | | |
487 | 488 | | |
488 | 489 | | |
| |||
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
507 | 511 | | |
508 | 512 | | |
509 | 513 | | |
| |||
561 | 565 | | |
562 | 566 | | |
563 | 567 | | |
564 | | - | |
| 568 | + | |
565 | 569 | | |
566 | 570 | | |
567 | 571 | | |
| |||
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
589 | | - | |
590 | | - | |
591 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
592 | 596 | | |
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
596 | 600 | | |
597 | 601 | | |
598 | 602 | | |
599 | | - | |
| 603 | + | |
| 604 | + | |
600 | 605 | | |
601 | 606 | | |
602 | 607 | | |
603 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
604 | 611 | | |
605 | 612 | | |
606 | 613 | | |
607 | 614 | | |
608 | | - | |
| 615 | + | |
609 | 616 | | |
610 | 617 | | |
611 | 618 | | |
612 | | - | |
| 619 | + | |
613 | 620 | | |
614 | 621 | | |
615 | 622 | | |
616 | | - | |
| 623 | + | |
617 | 624 | | |
618 | 625 | | |
619 | 626 | | |
620 | | - | |
| 627 | + | |
621 | 628 | | |
622 | 629 | | |
623 | 630 | | |
624 | 631 | | |
625 | 632 | | |
| 633 | + | |
| 634 | + | |
626 | 635 | | |
627 | 636 | | |
628 | 637 | | |
629 | 638 | | |
630 | 639 | | |
631 | 640 | | |
| 641 | + | |
| 642 | + | |
632 | 643 | | |
633 | 644 | | |
634 | 645 | | |
| |||
647 | 658 | | |
648 | 659 | | |
649 | 660 | | |
650 | | - | |
| 661 | + | |
651 | 662 | | |
652 | 663 | | |
653 | 664 | | |
| |||
669 | 680 | | |
670 | 681 | | |
671 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
672 | 686 | | |
673 | 687 | | |
674 | 688 | | |
| |||
694 | 708 | | |
695 | 709 | | |
696 | 710 | | |
697 | | - | |
698 | | - | |
| 711 | + | |
| 712 | + | |
699 | 713 | | |
700 | 714 | | |
701 | 715 | | |
| |||
760 | 774 | | |
761 | 775 | | |
762 | 776 | | |
763 | | - | |
| 777 | + | |
764 | 778 | | |
765 | 779 | | |
766 | 780 | | |
| |||
791 | 805 | | |
792 | 806 | | |
793 | 807 | | |
794 | | - | |
795 | | - | |
796 | | - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
797 | 811 | | |
798 | 812 | | |
799 | 813 | | |
| |||
864 | 878 | | |
865 | 879 | | |
866 | 880 | | |
867 | | - | |
| 881 | + | |
868 | 882 | | |
869 | 883 | | |
870 | 884 | | |
871 | 885 | | |
872 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
873 | 894 | | |
874 | 895 | | |
875 | 896 | | |
| 897 | + | |
876 | 898 | | |
| 899 | + | |
877 | 900 | | |
878 | 901 | | |
879 | | - | |
880 | 902 | | |
881 | 903 | | |
| 904 | + | |
882 | 905 | | |
883 | | - | |
| 906 | + | |
884 | 907 | | |
885 | 908 | | |
886 | 909 | | |
887 | 910 | | |
888 | 911 | | |
889 | | - | |
| 912 | + | |
890 | 913 | | |
891 | 914 | | |
892 | 915 | | |
893 | 916 | | |
894 | 917 | | |
895 | 918 | | |
896 | 919 | | |
897 | | - | |
| 920 | + | |
898 | 921 | | |
899 | 922 | | |
900 | 923 | | |
| |||
961 | 984 | | |
962 | 985 | | |
963 | 986 | | |
964 | | - | |
| 987 | + | |
965 | 988 | | |
966 | 989 | | |
967 | 990 | | |
| |||
987 | 1010 | | |
988 | 1011 | | |
989 | 1012 | | |
990 | | - | |
| 1013 | + | |
991 | 1014 | | |
992 | | - | |
| 1015 | + | |
993 | 1016 | | |
994 | 1017 | | |
995 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1347 | 1347 | | |
1348 | 1348 | | |
1349 | 1349 | | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1350 | 1355 | | |
1351 | 1356 | | |
1352 | 1357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| |||
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
62 | | - | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| |||

0 commit comments