Miss Islington (bot)
fd3c510827
[3.15] gh-146353: Document PyBytesWriter_GetData pointer validity (GH-151418) (GH-151664)
...
gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418)
(cherry picked from commit e99b319682 )
Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2026-06-18 17:39:20 +00:00
Hugo van Kemenade
e9bbf8617d
Add a new Sphinx soft-deprecated directive ( #148630 )
...
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-18 11:37:54 +03:00
Kumar Aditya
6a94980301
gh-142518: add thread safety docs on bytes C-API ( #146415 )
2026-03-27 18:31:18 +05:30
Victor Stinner
3c38feb2a2
gh-129813: Document that PyBytesWriter_GetData() cannot fail ( #145900 )
...
Document that PyBytesWriter_GetData() and PyBytesWriter_GetSize()
getter functions cannot fail
2026-03-13 19:44:51 +01:00
Peter Bierma
37e2762ee1
gh-141004: Document PyBytes_Repr and PyBytes_DecodeEscape (GH-141407)
...
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-11 15:32:54 -05:00
Victor Stinner
4126d9f1ab
gh-129813: Enhance PyBytesWriter documentation ( #140152 )
...
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2025-10-15 14:54:18 +02:00
Hugo van Kemenade
aeff92d86a
Python 3.15.0a1
2025-10-14 13:46:08 +03:00
Victor Stinner
d0b18b19fa
gh-129813: Fix PyBytesWriter tests ( #139892 )
2025-10-10 13:01:06 +02:00
Victor Stinner
9a8bc6d4a4
gh-129813, PEP 782: Add doc reference link ( #138986 )
2025-09-16 15:51:45 +02:00
Victor Stinner
d61dda52ba
gh-129813, PEP 782: Soft deprecate _PyBytes_Resize() ( #138964 )
...
Soft deprecate _PyBytes_Resize() and
PyBytes_FromStringAndSize(NULL, size).
2025-09-16 10:38:43 +02:00
Victor Stinner
c3fca5d478
gh-129813, PEP 782: Add PyBytesWriter_Format() ( #138824 )
...
Modify PyBytes_FromFormatV() to use the public PyBytesWriter API
rather than the _PyBytesWriter private API.
2025-09-12 14:21:57 +02:00
Victor Stinner
adb414044f
gh-129813, PEP 782: Add PyBytesWriter C API ( #138822 )
2025-09-12 13:41:59 +02:00
Victor Stinner
d343f977ba
gh-121645: Fix typo in PyBytes_Join() doc ( #123783 )
2024-09-06 16:08:17 +02:00
Victor Stinner
3d60dfbe17
gh-121645: Add PyBytes_Join() function ( #121646 )
...
* Replace _PyBytes_Join() with PyBytes_Join().
* Keep _PyBytes_Join() as an alias to PyBytes_Join().
2024-08-30 12:57:33 +00:00
Serhiy Storchaka
0c1a42cf9c
gh-87193: Support bytes objects with refcount > 1 in _PyBytes_Resize() (GH-117160)
...
Create a new bytes object and destroy the old one if it has refcount > 1.
2024-03-25 16:32:11 +01:00
lefp
9f33ede127
docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888)
...
docs: specify return value on success
2023-11-03 14:51:28 +01:00
Eric Snow
5dc825d504
gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)
...
PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts. In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.
This change updates the documentation to reflect that perspective. It also updates the docs relative to immortal objects in a handful of places.
2023-08-07 15:40:59 -06:00
Victor Stinner
391e03fa05
gh-107298: Fix Sphinx warnings in the C API doc ( #107302 )
...
* Update Doc/tools/.nitignore
* Fix BufferedIOBase.write() link in buffer.rst
2023-07-27 01:41:15 +02:00
Adam Turner
6ab463684b
GH-97950: Use new-style index directive ('object') ( #104158 )
...
* Uncomment object removal in pairindextypes
* Use new-style index directive ('object') - C API
* Use new-style index directive ('object') - Library
* Use new-style index directive ('object') - Reference
* Use new-style index directive ('object') - Tutorial
2023-05-04 13:04:41 +03:00
Victor Stinner
71d8775fee
gh-93202: Always use %zd printf formatter ( #93201 )
...
Python now always use the ``%zu`` and ``%zd`` printf formats to
format a size_t or Py_ssize_t number. Building Python 3.12 requires a
C11 compiler, so these printf formats are now always supported.
* PyObject_Print() and _PyObject_Dump() now use the printf %zd format
to display an object reference count.
* Update PY_FORMAT_SIZE_T comment.
* Remove outdated notes about the %zd format in PyBytes_FromFormat()
and PyUnicode_FromFormat() documentations.
* configure no longer checks for the %zd format and no longer defines
PY_FORMAT_SIZE_T macro in pyconfig.h.
* pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is
no longer supported. Python 3.12 now requires macOS 10.6 (Snow
Leopard) or newer.
2022-05-25 14:21:36 +02:00
Julien Palard
664aa94b57
Document Py_ssize_t. (GH-92512)
...
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>
2022-05-13 14:10:16 +02:00
Victor Stinner
2eca5dad0a
gh-89653: PEP 670: Convert PyBytes macros to functions ( #91990 )
...
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.
2022-05-03 20:14:58 +02:00
Jelle Zijlstra
677a879466
More minor fixes to C API docs (GH-31714)
...
* init_config: wording fixes
* bytearray: remove XXX, there is a good link to the buffer docs
* bytes, call, exceptions: minor wording fixes
2022-04-02 12:32:59 -07:00
Antonio Cuni
315fc52db1
bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)
...
I think that none of these API calls can fail, but only few of them are
documented as such. Add the sentence "This function always succeeds" (which is
the same already used e.g. by PyNumber_Check) to all of them.
2021-01-06 12:38:26 +01:00
Serhiy Storchaka
25fc088607
bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
...
Replace all *NULL* with ``NULL``.
2019-10-30 12:03:20 +02:00
Stéphane Wirtel
cbb6484573
Doc: Replace the deprecated highlightlang directive by highlight. ( #13377 )
...
highlightlang is deprecated since April 2018 in Sphinx.
See https://github.com/sphinx-doc/sphinx/pull/4845
2019-05-17 15:25:34 +05:30
Louie Lu
88c38b32b7
bpo-28415: Note 0 conversion different between Python and C ( #885 )
2017-04-27 11:36:35 +08:00
Serhiy Storchaka
84b8e92e46
bpo-29918: Add missed "const" modifiers in C API documentation. ( #846 )
2017-03-30 10:01:03 +03:00
Berker Peksag
4a72a7b6c4
Issue #25270 : Prevent codecs.escape_encode() from raising SystemError when an empty bytestring is passed
2016-09-16 17:31:06 +03:00
Serhiy Storchaka
6f379f4886
Issue #27481 : Docummented that ValueError is now raised instead of TypeError
...
in case of embedded null characters/bytes. Patch by Xiang Zhang.
2016-07-12 09:14:15 +03:00
R David Murray
0a560a11af
#23088 : Clarify null termination of bytes and strings in C API.
...
Patch by Martin Panter, reviewed by Serhiy Storchaka and R. David Murray.
2015-05-13 20:31:53 -04:00
Georg Brandl
44ea77bd81
Closes #4159 : add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text.
2013-03-28 13:28:44 +01:00
Georg Brandl
2aff335c36
#9204 : remove mentions of removed types in the types module.
2010-10-17 10:59:41 +00:00
Georg Brandl
60203b41b0
Migrate to Sphinx 1.0 C language constructs.
2010-10-06 10:11:56 +00:00
Victor Stinner
6009ece0ed
Replace :func: by :cfunc:
...
To get links to the C functions
2010-08-17 22:01:02 +00:00
Benjamin Peterson
ce36962d12
remove docs for PyBytes_Format #4917
2009-01-12 00:28:16 +00:00
Benjamin Peterson
c15a07333e
make bytes(o) respect __bytes__ #2415
...
This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject.
Reviewer: Barry
2008-08-26 16:46:47 +00:00
Benjamin Peterson
dae32c196a
update docs after renaming of PyString -> PyBytes
2008-05-26 15:01:55 +00:00