| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
PyType_HasFeature() now always calls PyType_GetFlags() to hide
implementation details. Previously, it accessed directly the
PyTypeObject.tp_flags member when the limited C API was not used.
Add fast inlined version _PyType_HasFeature() and _PyType_IS_GC()
for object.c and typeobject.c.
|
|
|
|
|
| |
Convert PyObject_CheckBuffer() macro to a function to hide
implementation details: the macro accessed directly the
PyTypeObject.tp_as_buffer member.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PyObject_NEW() macro becomes an alias to the PyObject_New()
macro, and the PyObject_NEW_VAR() macro becomes an alias to the
PyObject_NewVar() macro, to hide implementation details. They no
longer access directly the PyTypeObject.tp_basicsize member.
Exclude _PyObject_SIZE() and _PyObject_VAR_SIZE() macros from
the limited C API.
Replace PyObject_NEW() with PyObject_New() and replace
PyObject_NEW_VAR() with PyObject_NewVar().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a private _at_fork_reinit() method to _thread.Lock,
_thread.RLock, threading.RLock and threading.Condition classes:
reinitialize the lock after fork in the child process; reset the lock
to the unlocked state.
Rename also the private _reset_internal_locks() method of
threading.Event to _at_fork_reinit().
* Add _PyThread_at_fork_reinit() private function. It is excluded
from the limited C API.
* threading.Thread._reset_internal_locks() now calls
_at_fork_reinit() on self._tstate_lock rather than creating a new
Python lock object.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements things like `list[int]`,
which returns an object of type `types.GenericAlias`.
This object mostly acts as a proxy for `list`,
but has attributes `__origin__` and `__args__`
that allow recovering the parts (with values `list` and `(int,)`.
There is also an approximate notion of type variables;
e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`.
Type variables are objects of type `typing.TypeVar`.
|
|
|
| |
Implement traverse and clear slots in _abc._abc_data type.
|
|
|
|
|
|
|
|
|
| |
str.encode() and str.decode() no longer check the encoding and errors
in development mode or in debug mode during Python finalization. The
codecs machinery can no longer work on very late calls to
str.encode() and str.decode().
This change should help to call _PyObject_Dump() to debug during late
Python finalization.
|
|
|
| |
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
|
|
|
|
|
| |
Only one particular sub-test of
ctypes.test.test_loading.test_load_dll_with_flags is disabled, which
caused failures on Azure Pipelines CI.
|
|
|
|
|
| |
number of assigned code points. (GH-19328)
Change the number of code points from a specific number to a link to the latest standard that has a description of how many code points there are.
|
|
|
|
| |
variables (GH-19391)
|
|
|
|
|
|
|
|
| |
Convert the PyObject_GET_WEAKREFS_LISTPTR() macro to a function to
hide implementation details: the macro accessed directly to the
PyTypeObject.tp_weaklistoffset member.
Add _PyObject_GET_WEAKREFS_LISTPTR() static inline function to the
internal C API.
|
|
|
| |
Change the type of nkeywords to Py_ssize_t.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-19369)
|
|
|
|
| |
Fix possible refleaks in _json module, memo of PyScannerObject
should be traversed.
|
| |
|
| |
|
| |
|
|
|
| |
Inspect.signature failed on the test case because its isinstance call raised.
|
|
|
| |
Fix default Python home path relative to the NuGet package
|
|
|
|
| |
(GH-19348)
|
| |
|
| |
|
|
|
|
| |
is xlc on AIX (GH-19225)
|
| |
|
|
|
| |
Update also OpenSSL version in Ubuntu and Coverage jobs.
|
| |
|
|
|
|
|
|
|
|
| |
test_builtin.PtyTests now registers an handler for SIGHUP signal.
Closing the PTY file descriptor can emit a SIGHUP signal: just ignore
it.
run_child() now also closes the PTY file descriptor before waiting
for the process completition, otherwise the test hangs on AIX.
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two copies of the grammar -- the one used by Python itself as
Grammar/Grammar, and the one used by lib2to3 which has necessarily diverged at
Lib/lib2to3/Grammar.txt because it needs to support older syntax an we want it
to be reasonable stable to avoid requiring fixer rewrites.
This brings suport for syntax like `if x:= foo():` to match what the live
Python grammar does.
This should've been added at the time of the walrus operator itself, but lib2to3 being
independent is often overlooked. So we do consider this a bugfix rather than enhancement.
|
| |
|
| |
|
|
|
|
|
| |
(PEP 489) (GH-19252)
Fix also reference leaks on error.
|
|
|
| |
Call explicitly self.loop.shutdown_default_executor().
|
|
|
|
| |
It now uses os.waitstatus_to_exitcode() to convert os.system() exit
status into an exit code.
|
|
|
|
|
|
|
| |
CGIHTTPRequestHandler of http.server now logs the CGI script exit
code, rather than the CGI script exit status of os.waitpid().
For example, if the script is killed by signal 11, it now logs:
"CGI script exit code -11."
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.
AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
mailcap.test() now uses os.waitstatus_to_exitcode() to convert
os.system() exit status into an exit code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add os.waitstatus_to_exitcode() function to convert a wait status to an
exitcode.
Suggest waitstatus_to_exitcode() usage in the documentation when
appropriate.
Use waitstatus_to_exitcode() in:
* multiprocessing, os, subprocess and _bootsubprocess modules;
* test.support.wait_process();
* setup.py: run_command();
* and many tests.
|
|
|
|
|
| |
On Solaris, the regular "grep" command may be an old version that fails to search a binary file. We need to use the correct command (ggrep, in our case), which is found by the configure script earlier.
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes on 7dd549eb0893 made _functools compatible with
PEP-489 and we could have multiple modules instances loaded.
But, right now there is no way to make `kwd_mark` global into
a per module instance variable. kwd_mark is used on lru_cache_new
which does not have a reference to a PyModule*, necessary to use
PyModule_GetState.
PEP-573 will solve this problem and will allow us to move the global
state to per-module data and properly clear the state when unloading
a module instance.
This change temporarily disable cleaning of kwd_mark to avoid NULL
pointer dereference if we clear kwd_mark and other module instances
still alive use it.
|
|
|
|
|
|
| |
for "closing" a path by using it as a context manager (GH-18846)
Support for using a path as a context manager remains, and is now a no-op.
|
|
|
|
|
|
|
|
|
| |
* bpo-33262: Deprecate passing None for `s` to shlex.split()
This reads the string to split from standard input.
* Update What's New.
* Fix shlex.rst
|