summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.8] gh-105184: document that marshal functions can fail and need to be ↵Miss Islington (bot)2023-06-051-0/+4
| | | | | | | checked with PyErr_Occurred (GH-105185) (#105222) (cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.8] gh-90359: Update documentation to follow PEP 495. (gh-94800). (GH-94834)Dong-hee Na2022-07-281-0/+14
| | | | | (cherry picked from commit 07374cce52abb7fd39729dc1b646ca3029b64c64) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671) ↵Miss Islington (bot)2021-04-281-7/+6
| | | | | (GH-25690) (cherry picked from commit 4c49be766897968e509c41397e0e624c25b1675d)
* bpo-43506: Doc: Update removal schedule for Py_UNICODE encoder APIs (GH-24885)Miss Islington (bot)2021-03-161-11/+15
| | | | See PEP 624. (cherry picked from commit 1330338583d183250186a8123b99d2283e945b4f)
* bpo-3329: Fix typo in PyObjectArenaAllocator doc (GH-24795)Miss Islington (bot)2021-03-091-1/+1
| | | | | (cherry picked from commit 0d6bd1ca7c683137d52041194f3a2b02219f225a) Co-authored-by: Victor Stinner <vstinner@python.org>
* closes bpo-43266: Improve array formatting. (GH-24573) (GH-24585)Miss Islington (bot)2021-03-011-4/+4
| | | | | | | (cherry picked from commit 2d3e463e4a5aa109d1c15c86f9631580f5ef7a7e) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-36346: Document removal schedule of deprecate APIs (GH-20879) (#24626)Miss Islington (bot)2021-03-012-8/+7
| | | | | | | | We will remove wstr cache in Python 3.12. See PEP 623. (cherry picked from commit 2d6f2eed14ff5d89155b52771cc8ef957e8145b4) Co-authored-by: Inada Naoki <songofacandy@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* closes bpo-43254: Fix *snprintf() man page refs. (GH-24563)Miss Islington (bot)2021-02-191-2/+2
| | | | | (cherry picked from commit e92d67dfbb4790df37aa6a0961fb6dc7e8d2fbbf) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-42412: Fix possible leaks and check arguments in ↵Miss Islington (bot)2020-11-211-2/+4
| | | | | | | | | | | PyType_FromModuleAndSpec() (GH-23410) * There were leaks if Py_tp_bases is used more than once or if some call is failed before setting tp_bases. * There was a crash if the bases argument or the Py_tp_bases slot is not a tuple. * The documentation was not accurate. (cherry picked from commit 1db76394ea79030aa4ed5349c950f6c6da51450f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41192: Add documentation of undocumented audit events (GH-22832)Miss Skeleton (bot)2020-10-201-0/+2
| | | | (cherry picked from commit 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7)
* bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)Miss Islington (bot)2020-10-021-4/+6
| | | | | (cherry picked from commit 20ce62f00957d11f24f6449cd5c0ef5dd67174d4) Co-authored-by: Campbell Barton <ideasman42@gmail.com>
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)Victor Stinner2020-08-2017-129/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the c_warn_on_allowed_pre_v3 option to make the documentation compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 423e77d6de497931585d1883805a9e3fa4096b0b) * bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858) Use generic '.. object::' to declare markers, rather than abusing '.. c:function::' which fails on Sphinx 3. (cherry picked from commit 43577c01a2ab49122db696e9eaec6cb31d11cc81) * bpo-40204: Fix duplicates in the documentation (GH-21857) Fix two Sphinx 3 issues: Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'. Declaration is 'PyBUF_ND'. Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'. Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'. (cherry picked from commit 46d10b1237c67ff8347f533eda6a5468d098f7eb) * bpo-40204: Add :noindex: in the documentation (GH-21859) Add :noindex: to duplicated documentation to fix "duplicate object description" errors. For example, fix this Sphinx 3 issue: Doc/library/configparser.rst:1146: WARNING: duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them (cherry picked from commit d3ded080482beae578faa704b13534a62d066f9f) * bpo-40204, doc: Fix syntax of C variables (GH-21846) For example, fix the following Sphinx 3 errors: Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name. [error at 5] void \*obj -----^ Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*' Invalid C declaration: Expected end of definition. [error at 8] PyObject* --------^ The modified documentation is compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 474652fe9346382dbf793f20b671eb74668bebde) * bpo-40204: Fix reference to terms in the doc (GH-21865) Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead. (cherry picked from commit bb0b08540cc93e56f3f1bde1b39ce086d9e35fe1) * bpo-40204: Fix duplicated productionlist names in the doc (GH-21900) Sphinx 3 disallows having more than one productionlist markup with the same name. Simply remove names in this case, since names are not shown anyway. For example, fix the Sphinx 3 warning: Doc/reference/introduction.rst:96: duplicate token description of *:name, other instance in reference/expressions (cherry picked from commit 1abeda80f760134b4233608e2c288790f955b95a) (cherry picked from commit 8f88190af529543c84d5dc78f19abbfd73335cf4)
* bpo-41098: Doc: Add missing deprecated directives (GH-21162)Miss Islington (bot)2020-08-071-0/+10
| | | | | | | PyUnicodeEncodeError_Create has been deprecated with `Py_DEPRECATED` macro. But it was not documented. (cherry picked from commit 46e19b61d31ba99f049258efa4ff1334856a3643) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)Miss Islington (bot)2020-08-051-9/+30
| | | | | | See PEP 623 for detail. (cherry picked from commit 270b4ad4df795783d417ba15080da8f95e598689) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-41211: Doc: Fix PyLong_FromUnicode (GH-21331)Miss Islington (bot)2020-07-051-3/+1
| | | | | | PyUnicode_EncodeDecimal is not used actually. (cherry picked from commit 16f451744b7f4653ca9db4b4bedbb6fc5c0de154) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325)Miss Islington (bot)2020-07-051-3/+1
| | | | | | It doesn't use PyUnicode_EncodeDecimal. It uses a private API instead. (cherry picked from commit 9c8441712230660fedac818ed50e7cdd89e4c51d) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Doc: Minor fix to init config C API documentation (GH-21198)Miss Islington (bot)2020-07-011-2/+2
| | | | | | Co-authored-by: Tomer Vromen <tomer.vromen@intel.com> (cherry picked from commit 741008a57bdc95090b8be6ded5a9fd3f17f7bf21) Co-authored-by: tomerv <tomerv@gmail.com>
* bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)Miss Islington (bot)2020-06-301-0/+2
| | | | | (cherry picked from commit 2ea6a9928e4fa135888cc8f4733c28d93e642301) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)Miss Islington (bot)2020-06-291-1/+1
| | | | | (cherry picked from commit 02134dae448c7885c9c07adfc6970f878db33372) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* [3.8] bpo-38387: Formally document PyDoc_STRVAR and PyDoc_STR macros ↵Zachary Ware2020-04-272-1/+34
| | | | | | | | | | | | (GH-16607) (GH-19727) Adds a short description of `PyDoc_STRVAR` and `PyDoc_STR` to "Useful macros" section of C-API docs. Currently, there is [one lone mention](https://docs.python.org/3/c-api/module.html?highlight=pydoc_strvarGH-c.PyModuleDef) in the C-API reference, despite the fact that `PyDoc_STRVAR` is ubiquitous to `Modules/`. Additionally, this properly uses `c:macro` within `Doc/c-api/module.rst` to link. (cherry picked from commit b54e46c) Authored-by: Brad Solomon <brad.solomon.1124@gmail.com>
* bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)Miss Islington (bot)2020-03-171-1/+1
| | | | | | PyObject_GenericSetDict() takes three arguments, not two. (cherry picked from commit a45b695b9fcfbbb0a087222abc5c8d691a7d2770) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] Doc: Fix grammar in PyErr_ResourceWarning (GH-18879) (GH-18976)Karthikeyan Singaravelan2020-03-131-1/+1
| | | | | (cherry picked from commit fdcd53f) Co-authored-by: Daniel Hahler <git@thequod.de>
* bpo-39778: Add clarification about tp_traverse and ownership (GH-18754)Miss Islington (bot)2020-03-031-1/+13
| | | | | | Automerge-Triggered-By: @pablogsal (cherry picked from commit 6df421fe87a9418d6c59f89dbc5d5573b6826855) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Doc: int -> int or Py_ssize_t (GH-18663)Miss Islington (bot)2020-02-261-11/+11
| | | | | (cherry picked from commit 57c7a0bdf4f7da8cf47f797f075950f6b8c98b99) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* fix(doc): set correct RST syntax for c:function (GH-18589)Miss Islington (bot)2020-02-211-2/+2
| | | | | | The current content is not rendered since the syntax is not correct. (cherry picked from commit d4d17fd2cf69e7c8f4cd03fbf2d575370945b952) Co-authored-by: Julien Danjou <julien@danjou.info>
* bpo-38374: Remove weakref.ReferenceError from docs (GH-18452)Miss Islington (bot)2020-02-111-3/+0
| | | | | | | | | | | | Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst. Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007. Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`. Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`. https://bugs.python.org/issue38374 (cherry picked from commit 4eb9f4313cfaea6a9611221024a1c54f5662cc37) Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
* bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220)Miss Islington (bot)2020-01-293-6/+9
| | | | | | | | | | | | | | Some of the *SetItem methods in the C API steal a reference to the given value. This annotates the better behaved ones to assure the reader that these are not the ones with the inconsistent behaviour. * 📜🤖 Added by blurb_it. * make docs consistent with signature Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit e1e80002e28e1055f399a20918c49d50d093709e) Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* PyLong_AsLongLong() docs should say 'long long' (GH-18082) (GH-18110)Miss Islington (bot)2020-01-211-1/+1
| | | | | | | | (cherry picked from commit 47be7d0108b4021ede111dbd15a095c725be46b7) Co-authored-by: Keith Erskine <toastie604@gmail.com> Co-authored-by: Keith Erskine <toastie604@gmail.com>
* bpo-39161: Document multi-phase init modules under Py_NewInterpreter() ↵Miss Islington (bot)2020-01-091-17/+35
| | | | | | | | | | (GH-17896) \+ this also adds a stronger warning against sharing objects between (sub-)interpreters. https://bugs.python.org/issue39161 (cherry picked from commit 6c5d661342d12f6836580b0e75e3569c764527ae) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.8] bpo-39136: Fixed typos (GH-17720)Terry Jan Reedy2019-12-292-2/+2
| | | | | | | | funtion -> function; configuraton -> configuration; defintitions -> definitions; focusses -> focuses; necesarily -> necessarily; follwing -> following; Excape -> Escape, (cherry picked from commit 6c7bb38ff2799ac218e6df598b2b262f89e2bc1e)
* Fix the miscellaneous typo (GH-17700)Miss Islington (bot)2019-12-251-1/+1
| | | | | | A character "i" is omitted. (cherry picked from commit 527f9de6efdcf09983d0764be0b978ddc1fd1653) Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
* Minor C API documentation improvements. (GH-17697)Miss Islington (bot)2019-12-251-1/+1
| | | | | | | | | | | The added parentheses around the PyIter_Next assignment suppress the following warning which gcc throws without: ``` warning: using the result of an assignment as a condition without parentheses [-Wparentheses] ``` The other change is a typo fix (cherry picked from commit 5c7ed7550ec2da16d7679e538fcd7c1a5631811f) Co-authored-by: William Ayd <william.ayd@icloud.com>
* bpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a ↵Miss Islington (bot)2019-12-091-0/+8
| | | | | | | deprecation warning (GH-17540) (cherry picked from commit b8cbe74c3498c617f0e73fd0cdc5c07f2c532092) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-38892: Improve docs for audit event (GH-17361)Miss Islington (bot)2019-11-261-11/+12
| | | | | (cherry picked from commit e563a155be60fc0757914f87c8138f10de00bb16) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Fixed an incorrect sentence in the docs (GH-17205)Miss Islington (bot)2019-11-211-2/+1
| | | | | | | | | | | Fixed an incorrect sentence in Doc/c-api/mapping.rst I fell on while translating the file. skip issue Automerge-Triggered-By: @csabella (cherry picked from commit 06ca2a2be9374ac390e9407685ccce941ab9ffa2) Co-authored-by: Aveheuzed <a.masson555@ntymail.com>
* bpo-38816: Add notes in the C-API docs about fork in subinterpreters. (GH-17176)Miss Islington (bot)2019-11-152-1/+40
| | | | | | | | The C-API docs are a bit sparse on the interplay between C `fork()` and the CPython runtime. This change adds some more information on the subject. https://bugs.python.org/issue38816 (cherry picked from commit 73cdb0c6b2c3861e034004cdc57be5e726876078) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.8] bpo-38159: Clarify documentation of PyState_AddModule (GH-16101) ↵Miss Islington (bot)2019-11-051-0/+11
| | | | | | | | | | | | | | | | | | (GH-17026) This was never intented to be called manually from PyInit_*. Also, clarify PyState_RemoveModule return value. (cherry picked from commit 9bc94eca0c69a551f928692364a99e9b67c4a45b) Co-authored-by: Petr Viktorin <encukou@gmail.com> https://bugs.python.org/issue38159 Automerge-Triggered-By: @encukou
* [3.8] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17003)Serhiy Storchaka2019-10-3019-55/+55
| | | | | Also fix some other formatting. (cherry picked from commit e835b31d2b212c3c7820364398979cae2a9740b2)
* [3.8] bpo-38600: Change the mark up of NULL in the C API documentation. ↵Serhiy Storchaka2019-10-3046-659/+659
| | | | | | | (GH-16950) (GH-16999) Replace all *NULL* with ``NULL``. (cherry picked from commit 25fc088607c855060ed142296dc1bd0125fad1af)
* bpo-38434: Fixes some audit event documentation (GH-16932)Miss Skeleton (bot)2019-10-262-3/+10
| | | | | (cherry picked from commit 894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-38557: Improve documentation for list and tuple C API. (GH-16925)Miss Skeleton (bot)2019-10-262-12/+18
| | | | | (cherry picked from commit d898d20e8c228229eb68e545f544db13f246f216) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)Miss Islington (bot)2019-10-011-25/+10
| | | | | | | PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore. (cherry picked from commit 8462a4936b3a551dc546a6adea04a70b0a07ca67) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-38304: Remove PyConfig.struct_size (GH-16500)Victor Stinner2019-09-301-36/+3
| | | | | For now, we'll rely on the fact that the config structures aren't covered by the stable ABI. We may revisit this in the future if we further explore the idea of offering a stable embedding API.
* bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)Miss Islington (bot)2019-09-291-1/+7
| | | | | | | | | | | | Fix warnings options priority: PyConfig.warnoptions has the highest priority, as stated in the PEP 587. * Document options order in PyConfig.warnoptions documentation. * Make PyWideStringList_INIT macro private: replace "Py" prefix with "_Py". * test_embed: add test_init_warnoptions(). (cherry picked from commit fb4ae152a9930f0e00cae8b2807f534058cf341a) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-38304: Add PyConfig.struct_size (GH-16451) (GH-16453)Victor Stinner2019-09-281-5/+39
| | | | | | | | | | | | | | | | | | | Add a new struct_size field to PyPreConfig and PyConfig structures to allow to modify these structures in the future without breaking the backward compatibility. * Replace private _config_version field with public struct_size field in PyPreConfig and PyConfig. * Public PyPreConfig_InitIsolatedConfig() and PyPreConfig_InitPythonConfig() return type becomes PyStatus, instead of void. * Internal _PyConfig_InitCompatConfig(), _PyPreConfig_InitCompatConfig(), _PyPreConfig_InitFromConfig(), _PyPreConfig_InitFromPreConfig() return type becomes PyStatus, instead of void. * Remove _Py_CONFIG_VERSION * Update the Initialization Configuration documentation. (cherry picked from commit 441b10cf2855955c86565f8d59e72c2efc0f0a57)
* bpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)Miss Islington (bot)2019-09-272-5/+22
| | | | | | | | | | | | | | As mentioned in the bpo ticket, this mistake came up on two reviews: - https://github.com/python/cpython/pull/16127GH-pullrequestreview-288312751 - https://github.com/python/cpython/pull/16071GH-pullrequestreview-287819525 Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry. https://bugs.python.org/issue38206 Automerge-Triggered-By: @encukou (cherry picked from commit 5faff977adbe089e1f91a5916ccb2160a22dd292) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* [3.8] bpo-38234: Backport init path config changes from master (GH-16423)Victor Stinner2019-09-262-30/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 1ce152a42eaa917d7763bce93f1e1ca72530d7ca) * bpo-38234: Add tests for Python init path config (GH-16358) (cherry picked from commit bb6bf7d342b4503a6227fd209fac934905b6a1aa) * 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 52ad33abbfb6637d74932617c7013bae0ccf6e32) * 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 221fd84703c545408bbb4a6e0b58459651331f5c) * 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 00508a7407d7d300b487532e2271534b20e378a7) * 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 8bf39b606ef7b02c0279a80789f3c4824b0da5e9) * bpo-38234: Complete init config documentation (GH-16404) (cherry picked from commit 88feaecd46a8f427e30ef7ad8cfcddfe392a2402) * 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 49d99f01e6e51acec5ca57a02e857f0796bc418b) * 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 12f2f177fc483723406d7917194e7f655a20631b)
* bpo-38236: Dump path config at first import error (GH-16300) (GH-16332)Victor Stinner2019-09-231-1/+11
| | | | | | Python now dumps path configuration if it fails to import the Python codecs of the filesystem and stdio encodings. (cherry picked from commit fcdb027234566c4d506d6d753c7d5638490fb088)
* bpo-38158: Removing nonexistant member "doc" from PyType_Spec documentation ↵Miss Islington (bot)2019-09-151-4/+0
| | | | | | | (GH-16142) (GH-16154) (cherry picked from commit 8b31a11a698cb5aa9b439b349c8de4e388846f73) Co-authored-by: t k <tahia.khan@utoronto.ca>
* bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)Miss Islington (bot)2019-09-131-6/+0
| | | | | (cherry picked from commit 375a3e2bdbeb4dce69aba4b5bc90f55fe27e81b4) Co-authored-by: Julien Palard <julien@palard.fr>