| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -131,3 +131,22 @@ the :mod:`io` APIs instead. | |||
| 131 | 131 | ||
| 132 | 132 | Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on | |
| 133 | 133 | failure; the appropriate exception will be set. | |
| 134 | + | ||
| 135 | + | ||
| 136 | + Deprecated API | ||
| 137 | + ^^^^^^^^^^^^^^ | ||
| 138 | + | ||
| 139 | + | ||
| 140 | + These are :term:`soft deprecated` APIs that were included in Python's C API | ||
| 141 | + by mistake. They are documented solely for completeness; use other | ||
| 142 | + ``PyFile*`` APIs instead. | ||
| 143 | + | ||
| 144 | + .. c:function:: PyObject *PyFile_NewStdPrinter(int fd) | ||
| 145 | + | ||
| 146 | + Use :c:func:`PyFile_FromFd` with defaults (``fd, NULL, "w", -1, NULL, NULL, NULL, 0``) instead. | ||
| 147 | + | ||
| 148 | + .. c:var:: PyTypeObject PyStdPrinter_Type | ||
| 149 | + | ||
| 150 | + Type of file-like objects used internally at Python startup when :py:mod:`io` is | ||
| 151 | + not yet available. | ||
| 152 | + Use Python :py:func:`open` or :c:func:`PyFile_FromFd` to create file objects instead. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,6 +45,7 @@ than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`. | |||
| 45 | 45 | A reference to *frame* is stolen by this function. The *frame* argument | |
| 46 | 46 | must not be ``NULL``. | |
| 47 | 47 | ||
| 48 | + | ||
| 48 | 49 | .. c:function:: PyCodeObject* PyGen_GetCode(PyGenObject *gen) | |
| 49 | 50 | ||
| 50 | 51 | Return a new :term:`strong reference` to the code object wrapped by *gen*. | |
@@ -82,3 +83,14 @@ Asynchronous Generator Objects | |||
| 82 | 83 | This function always succeeds. | |
| 83 | 84 | ||
| 84 | 85 | .. versionadded:: 3.6 | |
| 86 | + | ||
| 87 | + | ||
| 88 | + Deprecated API | ||
| 89 | + ^^^^^^^^^^^^^^ | ||
| 90 | + | ||
| 91 | + .. c:macro:: PyAsyncGenASend_CheckExact(op) | ||
| 92 | + | ||
| 93 | + This is a :term:`soft deprecated` API that was included in Python's C API | ||
| 94 | + by mistake. | ||
| 95 | + | ||
| 96 | + It is solely here for completeness; do not use this API. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -855,3 +855,31 @@ The :c:type:`PyLongWriter` API can be used to import an integer. | |||
| 855 | 855 | If *writer* is ``NULL``, no operation is performed. | |
| 856 | 856 | ||
| 857 | 857 | The writer instance and the *digits* array are invalid after the call. | |
| 858 | + | ||
| 859 | + | ||
| 860 | + Deprecated API | ||
| 861 | + ^^^^^^^^^^^^^^ | ||
| 862 | + | ||
| 863 | + These macros are :term:`soft deprecated`. They describe parameters | ||
| 864 | + of the internal representation of :c:type:`PyLongObject` instances. | ||
| 865 | + | ||
| 866 | + Use :c:func:`PyLong_GetNativeLayout` instead, along with :c:func:`PyLong_Export` | ||
| 867 | + to read integer data or :c:type:`PyLongWriter` to write it. | ||
| 868 | + These currently use the same layout, but are designed to continue working correctly | ||
| 869 | + even if CPython's internal integer representation changes. | ||
| 870 | + | ||
| 871 | + | ||
| 872 | + .. c:macro:: PyLong_SHIFT | ||
| 873 | + | ||
| 874 | + This is equivalent to :c:member:`~PyLongLayout.bits_per_digit` in | ||
| 875 | + the output of :c:func:`PyLong_GetNativeLayout`. | ||
| 876 | + | ||
| 877 | + | ||
| 878 | + .. c:macro:: PyLong_BASE | ||
| 879 | + | ||
| 880 | + This is currently equivalent to :c:expr:`1 << PyLong_SHIFT`. | ||
| 881 | + | ||
| 882 | + | ||
| 883 | + .. c:macro:: PyLong_MASK | ||
| 884 | + | ||
| 885 | + This is currently equivalent to :c:expr:`(1 << PyLong_SHIFT) - 1` | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -166,3 +166,20 @@ subtypes but not for instances of :class:`frozenset` or its subtypes. | |||
| 166 | 166 | Empty an existing set of all elements. Return ``0`` on | |
| 167 | 167 | success. Return ``-1`` and raise :exc:`SystemError` if *set* is not an instance of | |
| 168 | 168 | :class:`set` or its subtype. | |
| 169 | + | ||
| 170 | + | ||
| 171 | + Deprecated API | ||
| 172 | + ^^^^^^^^^^^^^^ | ||
| 173 | + | ||
| 174 | + .. c:macro:: PySet_MINSIZE | ||
| 175 | + | ||
| 176 | + A :term:`soft deprecated` constant representing the size of an internal | ||
| 177 | + preallocated table inside :c:type:`PySetObject` instances. | ||
| 178 | + | ||
| 179 | + This is documented solely for completeness, as there are no guarantees | ||
| 180 | + that a given version of CPython uses preallocated tables with a fixed | ||
| 181 | + size. | ||
| 182 | + In code that does not deal with unstable set internals, | ||
| 183 | + :c:macro:`!PySet_MINSIZE` can be replaced with a small constant like ``8``. | ||
| 184 | + | ||
| 185 | + If looking for the size of a set, use :c:func:`PySet_Size` instead. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,21 +71,11 @@ PyDescr_NAME | |||
| 71 | 71 | PyDescr_TYPE | |
| 72 | 72 | PyWrapperFlag_KEYWORDS | |
| 73 | 73 | # cpython/fileobject.h | |
| 74 | - PyFile_NewStdPrinter | ||
| 75 | - PyStdPrinter_Type | ||
| 76 | 74 | Py_UniversalNewlineFgets | |
| 77 | - # cpython/setobject.h | ||
| 78 | - PySet_MINSIZE | ||
| 79 | 75 | # cpython/ceval.h | |
| 80 | 76 | PyUnstable_CopyPerfMapFile | |
| 81 | 77 | PyUnstable_PerfTrampoline_CompileCode | |
| 82 | 78 | PyUnstable_PerfTrampoline_SetPersistAfterFork | |
| 83 | - # cpython/genobject.h | ||
| 84 | - PyAsyncGenASend_CheckExact | ||
| 85 | - # cpython/longintrepr.h | ||
| 86 | - PyLong_BASE | ||
| 87 | - PyLong_MASK | ||
| 88 | - PyLong_SHIFT | ||
| 89 | 79 | # cpython/pyerrors.h | |
| 90 | 80 | PyException_HEAD | |
| 91 | 81 | # cpython/pyframe.h | |
| Back | FazBrowse Home | New Git URL |
0 commit comments