| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This cleanup up resolves a few subtle bugs and makes the implementation for multi-phase init much cleaner.
https://github.com/python/cpython/issues/99741
|
|
|
|
| |
(#99956)
|
|
|
|
|
| |
There were some minor issues that showed up while I was working on porting _xxsubinterpreters to multi-phase init. This fixes them.
https://github.com/python/cpython/issues/99741
|
|
|
|
|
|
| |
* Add API to allow extensions to set callback function on creation and destruction of PyCodeObject
Co-authored-by: Ye11ow-Flash <janshah@cs.stonybrook.edu>
|
|
|
|
|
| |
traceback suggestion error checking (#99895)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
Previously *consumed was not set in this case.
|
|
|
|
|
|
|
| |
(#99917)
Add summary lines to isolation_level and autocommit connect() params
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
|
|
|
|
|
| |
```fullmatch()``` (GH-98916)
Mention fullmatch along with search and match.
|
| |
|
|
|
|
| |
(GH-25491)
|
|
|
| |
This was an indentation error introduced in 2844aa6a
|
|
|
|
|
|
|
|
|
| |
Convert macros to static inline functions to avoid macro pitfalls,
like duplication of side effects:
* _PyObject_SIZE()
* _PyObject_VAR_SIZE()
The result type is size_t (unsigned).
|
|
|
|
|
|
|
|
| |
The implementation of __sizeof__() methods using _PyObject_SIZE() now
use an unsigned type (size_t) to compute the size, rather than a signed
type (Py_ssize_t).
Cast explicitly signed (Py_ssize_t) values to unsigned type
(Py_ssize_t).
|
| |
|
| |
|
|
|
|
| |
assembler stage (GH-99869)
|
|
|
|
|
| |
(GH-99893)
Automerge-Triggered-By: GH:pablogsal
|
|
|
|
|
| |
autocommit=False (#99825)
Authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
| |
|
|
|
|
| |
typing.py lru_cache (#98591)
|
| |
|
|
|
| |
Fixes private checks for network objects. The previous method would incorrectly return True for a private check in cases such as "0.0.0.0/0".
|
| |
|
|
|
|
|
| |
Mention PEP 647 in the Release highlights section.
Also re-ordered the list so it matches the order in the details sections below.
|
|
|
|
| |
library (GH-94187)
|
|
|
|
|
|
| |
* code_sizeof() now uses an unsigned type (size_t) to compute the result.
* Fix _PyObject_ComputedDictPointer(): cast _PyObject_VAR_SIZE() to
Py_ssize_t, rather than long: it's a different type on 64-bit Windows.
* Clarify that _PyObject_VAR_SIZE() uses an unsigned type (size_t).
|
|
|
|
|
|
|
|
| |
* Change _PyDict_KeysSize() and shared_keys_usable_size() return type
from signed (Py_ssize_t) to unsigned (size_t) type.
* new_values() argument type is now unsigned (size_t).
* init_inline_values() now uses size_t rather than int for the 'i'
iterator variable.
* type.__sizeof__() implementation now uses unsigned (size_t) type.
|
|
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
| |
Add tests for functions corresponding to the str class methods.
|
|
|
|
|
|
|
|
|
|
|
| |
TypeVarTuple (GH-99412)
* Fix substitution of TypeVarTuple and ParamSpec together in user generics.
* Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases.
* Check the number of arguments in substitution in user generics containing a
TypeVarTuple and one or more TypeVar.
|
|
|
| |
Use correct variable to search for asctime
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following macros are modified to use _Py_RVALUE(), so they can no
longer be used as l-value:
* DK_LOG_SIZE()
* _PyCode_CODE()
* _PyList_ITEMS()
* _PyTuple_ITEMS()
* _Py_SLIST_HEAD()
* _Py_SLIST_ITEM_NEXT()
_PyCode_CODE() is private and other macros are part of the internal
C API.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert macros to static inline functions to avoid macro pitfalls,
like duplication of side effects:
* DK_ENTRIES()
* DK_UNICODE_ENTRIES()
* PyCode_GetNumFree()
* PyFloat_AS_DOUBLE()
* PyInstanceMethod_GET_FUNCTION()
* PyMemoryView_GET_BASE()
* PyMemoryView_GET_BUFFER()
* PyMethod_GET_FUNCTION()
* PyMethod_GET_SELF()
* PySet_GET_SIZE()
* _PyHeapType_GET_MEMBERS()
Changes:
* PyCode_GetNumFree() casts PyCode_GetNumFree.co_nfreevars from int
to Py_ssize_t to be future proof, and because Py_ssize_t is
commonly used in the C API.
* PyCode_GetNumFree() doesn't cast its argument: the replaced macro
already required the exact type PyCodeObject*.
* Add assertions in some functions using "CAST" macros to check
the arguments type when Python is built with assertions
(debug build).
* Remove an outdated comment in unicodeobject.h.
|
|
|
|
| |
Co-authored-by: Oren Milman <orenmn@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These slots are marked "should be treated as read-only" in the
table at the start of the document. That doesn't say anything about
setting them in the static struct.
`tp_bases` docs did say that it should be ``NULL`` (TIL!). If you
ignore that, seemingly nothing bad happens. However, some slots
may not be inherited, depending on which sub-slot structs are present.
(FWIW, NumPy sets tp_bases and is affected by the quirk -- though to
be fair, its DUAL_INHERIT code probably predates tp_bases docs, and
also the result happens to be benign.)
This patch makes things explicit.
It also makes the summary table legend easier to scan.
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
|
|
|
|
| |
#91340
https://bugs.python.org/issue47184
Automerge-Triggered-By: GH:kumaraditya303
|
| |
|
|
|
| |
Closes #99677
|
|
|
|
| |
in inspect.signature parsing (GH-21104)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#99768)
On macOS all file descriptors for a particular file in /dev/fd
share the same file offset, that is ``open("/dev/fd/9", "r")`` behaves
more like ``dup(9)`` than a regular open.
This causes problems when a user tries to run "/dev/fd/9" as a script
because zipimport changes the file offset to try to read a zipfile
directory. Therefore change zipimport to reset the file offset after
trying to read the zipfile directory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change documentation for sys.float_info.rounds
Change the documentation for sys.float_info.rounds to remove
references to C99 section 5.2.4.2.2 and instead place the
available values inline.
* Correction to previous documentation change
Newlines were not preserved in generated HTML on previous
commit. I have changes the list to a comma-separated list
of values and their meanings.
* Clarify source for value of FLT_ROUNDS
Clarify the source of the FLT_ROUNDS value and
change 'floating-point addition' to 'floating-point
arithmetic' to indicate that the rounding mode
applies to all arithmetic operations.
|
| |
|