| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
(GH-16938)
|
| |
|
|
|
|
| |
readline now calls PyErr_NoMemory() rather than Py_FatalError() on
memory allocation failure, when importing the module.
|
|
|
|
| |
(GH-16927)
|
|
|
|
|
| |
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.
|
| |
|
| |
|
|
|
|
|
|
|
| |
https://bugs.python.org/issue38303
Automerge-Triggered-By: @encukou
|
|
|
|
|
|
|
| |
It should be impossible for an untracked object to have the collecting
flag set. Back when state was stored in gc_refs, it obviously was
impossible (gc_refs couldn't possibly have a positive & negative value
simultaneously). While the _implementation_ of "state" has gotten much
more complicated, it's still _logically_ just as impossible.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
https://bugs.python.org/issue38418
Automerge-Triggered-By: @zooba
|
| |
|
| |
|
| |
|
|
|
|
| |
Add a total_nframe field to the traces collected by the tracemalloc module.
This field indicates the original number of frames before it was truncated.
|
|
|
|
| |
Windows. (GH-16347)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Misc gc code & comment cleanups.
validate_list: there are two temp flags polluting pointers, but this checked only one. Now it checks both, and verifies that the list head's pointers are not polluted.
move_unreachable: repaired incoherent comments. Added new comments. Cleared the pollution of the unreachable list head's 'next' pointer (it was expedient while the function was running, but there's no excuse for letting this damage survive the function's end).
* Update Modules/gcmodule.c
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
resurrect (GH-16687)
Currently if any finalizer invoked during garbage collection resurrects any object, the gc gives up and aborts the collection. Although finalizers are assured to only run once per object, this behaviour of the gc can lead to an ever-increasing memory situation if new resurrecting objects are allocated in every new gc collection.
To avoid this, recompute what objects among the unreachable set need to be resurrected and what objects can be safely collected. In this way, resurrecting objects will not block the collection of other objects in the unreachable set.
|
|
|
|
|
|
|
| |
They conflicted with keyword "in".
Also rename positional-only parameters of private os._fcopyfile()
for consistency.
|
|
|
|
| |
(GH-16738)
|
|
|
|
| |
On POSIX systems, allow the umask to be set in the child process before we exec.
|
|
|
|
| |
_POSIX_C_SOURCE (GH-16733)
|
| |
|
|
|
|
|
|
|
|
| |
Rewrite getsockaddrarg() helper function of socketmodule.c (_socket
module) to prevent a false alarm when compiling codde using GCC with
_FORTIFY_SOURCE=2. Pass a pointer of the sock_addr_t union, rather
than passing a pointer to a sockaddr structure.
Add "struct sockaddr_tipc tipc;" to the sock_addr_t union.
|
|
|
|
|
| |
bpo-38353, bpo-38429: Fix typos introduced by commit
c02b41b1fb115c87693530ea6a480b2e15460424 in
calculate_argv0_path_framework() of getpath.c.
|
|
|
|
|
| |
bpo-38392, bpo-38426: Fix a compiler warning in gcmodule.c.
Fix also a typo in PYMEM_DEADBYTE macro comment.
|
|
|
|
|
|
| |
* bpo-38379: when a finalizer resurrects an object,
nothing is actually collected in this run of gc.
Change the stats to relect that truth.
|
|
|
| |
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
|
|
|
|
| |
(GH-16589)
|
| |
|
|
|
|
|
|
|
| |
Checks also for encryption algorithms methods not supported in different
OSs.
Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
|
|
|
|
|
|
|
|
| |
subtract_refs() now pass the parent object to visit_decref() which
pass it to _PyObject_ASSERT(). So if the "is freed" assertion fails,
the parent is used in debug trace, rather than the freed object. The
parent object is more likely to contain useful information. Freed
objects cannot be inspected are are displayed as "<object at xxx is
freed>" with no other detail.
|
|
|
|
|
|
|
|
| |
In debug mode, PyObject_GC_Track() now calls tp_traverse() of the
object type to ensure that the object is valid: test that objects
visited by tp_traverse() are valid.
Fix pyexpat.c: only track the parser in the GC once the parser is
fully initialized.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-36389, bpo-38376: The _PyObject_CheckConsistency() function is
now also available in release mode. For example, it can be used to
debug a crash in the visit_decref() function of the GC.
Modify the following functions to also work in release mode:
* _PyDict_CheckConsistency()
* _PyObject_CheckConsistency()
* _PyType_CheckConsistency()
* _PyUnicode_CheckConsistency()
Other changes:
* _PyMem_IsPtrFreed(ptr) now also returns 1 if ptr is NULL
(equals to 0).
* _PyBytesWriter_CheckConsistency() now returns 1 and is only used
with assert().
* Reorder _PyObject_Dump() to write safe fields first, and only
attempt to render repr() at the end.
|
| |
|
| |
|
|
|
|
| |
Calling _Py_wfopen() is enough to check if filename is an existing
file or not. There is no need to check first isfile().
|
|
|
|
|
|
|
|
|
|
|
| |
* _Py_FindEnvConfigValue() now returns a string allocated
by PyMem_RawMalloc().
* calculate_init() now decodes VPATH macro.
* Add calculate_open_pyenv() function.
* Add substring() and joinpath2() functions.
* Fix add_exe_suffix()
And a few cleanup changes.
|
|
|
|
| |
* PyCalculatePath: add "_macro" to the 3 fields storing macro values
* Add dynamically allocated strings to PyCalculatePath
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16545)
On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the
"surrogatepass" error handler for converting to/from Tcl Unicode objects.
On Linux use UTF-8 with the "surrogateescape" error handler for converting
to/from Tcl String objects.
Converting strings from Tcl to Python and back now never fails
(except MemoryError).
|
|
|
|
| |
* ismodule() no longer modify the input string.
* copy_absolute(), joinpath(): rename parameters and local variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following symbolic links is now limited to 40 attempts, just to
prevent loops.
Add subfunctions:
* Add resolve_symlinks()
* Add calculate_argv0_path_framework()
* Add calculate_which()
* Add calculate_program_macos()
Fix also _Py_wreadlink(): readlink() result type is Py_ssize_t, not
int.
|
|
|
|
| |
calculate_argv0_path() must read argv0_path link, not read
program_full_path link.
|
|
|
|
| |
Use forward declaration of types to avoid includes in the internal C
API. Add also comment to justify other includes.
|
|
|
|
|
| |
On FreeBSD, Python no longer calls fedisableexcept() at startup to
control the floating point control mode. The call became useless
since FreeBSD 6: it became the default mode.
|