| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Update documentation of PyUnicode_DecodeFSDefault(),
PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_EncodeFSDefault():
they now use the filesystem encoding and error handler of PyConfig,
Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
variables are no longer used.
|
|
|
|
|
| |
Deprecate global configuration variables, like
Py_IgnoreEnvironmentFlag, in the documentation: the
Py_InitializeFromConfig() API should be instead.
|
|
|
|
| |
(GH-92980)
|
|
|
| |
These functions should only be used by Python internals.
|
|
|
|
| |
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
| |
It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But
there's 8182 errors left.
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use _Py_CAST() and _Py_STATIC_CAST() in macros wrapping static inline
functions of unicodeobject.h.
Change also the kind type from unsigned int to int: same parameter
type than PyUnicode_FromKindAndData().
The limited API version 3.11 no longer casts arguments to expected
types.
|
| |
|
| |
|
|
|
|
|
| |
* Remove redundant footnote ref: the footnote has been removed
* Fix footnote ref to match footnote
* Convert footnotes into reST footnotes: will error if missing
|
|
|
| |
The current wording implied this, but didn't state it explicitly.
|
|
|
|
|
|
|
| |
Deprecate the following C functions:
* PySys_SetArgv()
* PySys_SetArgvEx()
* PySys_SetPath()
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the -P command line option and the PYTHONSAFEPATH environment
variable to not prepend a potentially unsafe path to sys.path.
* Add sys.flags.safe_path flag.
* Add PyConfig.safe_path member.
* Programs/_bootstrap_python.c uses config.safe_path=0.
* Update subprocess._optim_args_from_interpreter_flags() to handle
the -P command line option.
* Modules/getpath.py sets safe_path to 1 if a "._pth" file is
present.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the following macros to static inline functions:
* PyByteArray_AS_STRING()
* PyByteArray_GET_SIZE()
* PyBytes_AS_STRING()
* PyBytes_GET_SIZE()
Limited C API version 3.11 no longer casts arguments.
Add _PyBytes_CAST() and _PyByteArray_CAST() macros.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argument
type is now "PyObject*", rather than "const PyObject*".
* Replace also "const PyObject*" with "PyObject*" in functions:
* _Py_strhex_impl()
* _Py_strhex_with_sep()
* _Py_strhex_bytes_with_sep()
* Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros.
* Py_IS_TYPE() can now use Py_TYPE() in its implementation.
|
|
|
|
| |
less dangerous. (GH-91790)
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(GH-32196)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-32052)" (GH-32343)
* Revert "bpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API (GH-32054)"
This reverts commit f877b40e3f7e0d97878884d80fbec879a85ab7e8.
* Revert "bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)"
This reverts commit b9a5522dd952125a99ff554f01f311cae25f5a91.
|
|
|
|
|
|
|
| |
* init_config: wording fixes
* bytearray: remove XXX, there is a good link to the buffer docs
* bytes, call, exceptions: minor wording fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* wording fixes in type.rst
* grammar and punctuation in sys.rst
* set: grammar fixes
* structures: capitalization fix
* grammar fixes for sequence
* objects: point to Py_TYPE instead of direct object access
* numbers: add more explicit Python equivalences
* method: add missing period
* memory: grammar fix
* mapping: grammar fixes
* long: grammar fix
* iter: fix grammar for PyAIter_Check
* init: grammar fix
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-32054)
Move the private _PyFrameEvalFunction type, and private
_PyInterpreterState_GetEvalFrameFunc() and
_PyInterpreterState_SetEvalFrameFunc() functions to the internal C
API. The _PyFrameEvalFunction callback function type now uses the
_PyInterpreterFrame type which is part of the internal C API.
Update the _PyFrameEvalFunction documentation.
|
| |
|
|
|
| |
Use the macro in C files of the Python/ directory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-32055)
* `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer called during profile and tracing.
(Contributed by Fabio Zadrozny)
* Make accesses to a frame's `f_locals` safe from C code, not relying on calls to `PyFrame_FastToLocals` or `PyFrame_LocalsToFast`.
* Document new `PyFrame_GetLocals` C-API function.
|
|
|
| |
Reorganize the documentation of the PyFrameObject C API.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new functions to pack and unpack C double (serialize and
deserialize):
* PyFloat_Pack2(), PyFloat_Pack4(), PyFloat_Pack8()
* PyFloat_Unpack2(), PyFloat_Unpack4(), PyFloat_Unpack8()
Document these functions and add unit tests.
Rename private functions and move them from the internal C API
to the public C API:
* _PyFloat_Pack2() => PyFloat_Pack2()
* _PyFloat_Pack4() => PyFloat_Pack4()
* _PyFloat_Pack8() => PyFloat_Pack8()
* _PyFloat_Unpack2() => PyFloat_Unpack2()
* _PyFloat_Unpack4() => PyFloat_Unpack4()
* _PyFloat_Unpack8() => PyFloat_Unpack8()
Replace the "unsigned char*" type with "char*" which is more common
and easy to use.
|
| |
|
|
|
|
| |
Move the PyFrameObject type definition (struct _frame) to the
internal C API pycore_frame.h header file.
|
|
|
|
| |
Fix PyFrame_GetBack() and PyFrame_GetCode() return type in
the documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* C API docs: move PyErr_SetImportErrorSubclass docs
It was in the section about warnings, but it makes more sense to
put it with PyErr_SetImportError.
* C API docs: document closeit argument to PyRun_AnyFileExFlags
It was already documented for PyRun_SimpleFileExFlags.
* textual fixes to unicode docs
* Move paragraph about tp_dealloc into tp_dealloc section
* __aiter__ returns an async iterator, not an awaitable
|
|
|
|
|
| |
* Make PyType_GetModuleByDef public (remove underscore)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
space (GH-31074)
This reduces the size of the data segment by **300 KB** of the executable because if the modules are deep-frozen then the marshalled frozen data just wastes space. This was inspired by comment by @gvanrossum in https://github.com/python/cpython/pull/29118#issuecomment-958521863. Note: There is a new option `--deepfreeze-only` in `freeze_modules.py` to change this behavior, it is on be default to save disk space.
```console
# du -s ./python before
27892 ./python
# du -s ./python after
27524 ./python
```
Automerge-Triggered-By: GH:ericsnowcurrently
|
|
|
|
|
|
|
|
|
|
|
| |
- [x] ``Py_buffer`` struct
- [x] ``PyBuffer_*()`` API functions
- [x] ``PyBUF_*`` constants
- [x] ``Py_bf_getbuffer`` and ``Py_bf_releasebuffer`` type slots
- [x] ``PyMemoryView_FromBuffer()`` API
- [x] tests for limited API
- [x] ``make regen-limited-abi``
- [x] documentation update
- [ ] export ``PyPickleBuffer*()`` API ???
|
| |
|