summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid overflow ↵Alexey Izbyshev2020-10-261-0/+2
| | | | | | | | | | | (GH-22966) Fix memory leak in subprocess.Popen() in case of uid/gid overflow Also add a test that would catch this leak with `--huntrleaks`. Alas, the test for `extra_groups` also exposes an inconsistency in our error reporting: we use a custom ValueError for `extra_groups`, but propagate OverflowError for `user` and `group`.
* bpo-42150: Avoid buffer overflow in the new parser (GH-22978)Pablo Galindo2020-10-251-0/+2
|
* bpo-42043: Add support for zipfile.Path subclasses (#22716)Jason R. Coombs2020-10-251-0/+4
| | | | | * bpo-42043: Add support for zipfile.Path inheritance as introduced in zipp 3.2.0. * Add blurb.
* bpo-41490: ``path`` and ``contents`` to aggressively close handles (#22915)Jason R. Coombs2020-10-251-0/+3
| | | | | | | | | * bpo-41490: ``path`` method to aggressively close handles * Add blurb * In ZipReader.contents, eagerly evaluate the contents to release references to the zipfile. * Instead use _ensure_sequence to ensure any iterable from a reader is eagerly converted to a list if it's not already a sequence.
* bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)Mark Roseman2020-10-251-0/+3
|
* bpo-41052: Fix pickling heap types implemented in C with protocols 0 and 1 ↵Serhiy Storchaka2020-10-241-0/+2
| | | | (GH-22870)
* bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe ↵Alexey Izbyshev2020-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-11671) * bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe When used to run a new executable image, fork() is not a good choice for process creation, especially if the parent has a large working set: fork() needs to copy page tables, which is slow, and may fail on systems where overcommit is disabled, despite that the child is not going to touch most of its address space. Currently, subprocess is capable of using posix_spawn() instead, which normally provides much better performance. However, posix_spawn() does not support many of child setup operations exposed by subprocess.Popen(). Most notably, it's not possible to express `close_fds=True`, which happens to be the default, via posix_spawn(). As a result, most users can't benefit from faster process creation, at least not without changing their code. However, Linux provides vfork() system call, which creates a new process without copying the address space of the parent, and which is actually used by C libraries to efficiently implement posix_spawn(). Due to sharing of the address space and even the stack with the parent, extreme care is required to use vfork(). At least the following restrictions must hold: * No signal handlers must execute in the child process. Otherwise, they might clobber memory shared with the parent, potentially confusing it. * Any library function called after vfork() in the child must be async-signal-safe (as for fork()), but it must also not interact with any library state in a way that might break due to address space sharing and/or lack of any preparations performed by libraries on normal fork(). POSIX.1 permits to call only execve() and _exit(), and later revisions remove vfork() specification entirely. In practice, however, almost all operations needed by subprocess.Popen() can be safely implemented on Linux. * Due to sharing of the stack with the parent, the child must be careful not to clobber local variables that are alive across vfork() call. Compilers are normally aware of this and take extra care with vfork() (and setjmp(), which has a similar problem). * In case the parent is privileged, special attention must be paid to vfork() use, because sharing an address space across different privilege domains is insecure[1]. This patch adds support for using vfork() instead of fork() on Linux when it's possible to do safely given the above. In particular: * vfork() is not used if credential switch is requested. The reverse case (simple subprocess.Popen() but another application thread switches credentials concurrently) is not possible for pure-Python apps because subprocess.Popen() and functions like os.setuid() are mutually excluded via GIL. We might also consider to add a way to opt-out of vfork() (and posix_spawn() on platforms where it might be implemented via vfork()) in a future PR. * vfork() is not used if `preexec_fn != None`. With this change, subprocess will still use posix_spawn() if possible, but will fallback to vfork() on Linux in most cases, and, failing that, to fork(). [1] https://ewontfix.com/7 Co-authored-by: Gregory P. Smith [Google LLC] <gps@google.com>
* bpo-38976: Add support for HTTP Only flag in MozillaCookieJar (#17471)Jacob Neil Taylor2020-10-231-0/+4
| | | | | Add support for HTTP Only flag in MozillaCookieJar Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40592: shutil.which will not return None anymore if ; is the last char ↵Christopher Marchfelder2020-10-231-0/+1
| | | | | | in PATHEXT (GH-20088) shutil.which will not return None anymore for empty str in PATHEXT Empty PATHEXT will now be defaulted to _WIN_DEFAULT_PATHEXT
* bpo-41910: specify the default implementations of object.__eq__ and ↵Brett Cannon2020-10-211-0/+1
| | | | | | | object.__ne__ (GH-22874) See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython. Automerge-Triggered-By: GH:brettcannon
* bpo-38980: Add -fno-semantic-interposition when building with optimizations ↵Pablo Galindo2020-10-211-0/+3
| | | | (GH-22862)
* bpo-39416: Document some restrictions on the default string representations ↵kpinc2020-10-211-0/+1
| | | | | | | | | | | | | | | | of numeric classes (GH-18111) [bpo-39416](): Document string representations of the Numeric classes This is a change to the specification of the Python language. The idea here is to put sane minimal limits on the Python language's default representations of its Numeric classes. That way "Marty's Robotic Massage Parlor and Python Interpreter" implementation of Python won't do anything too crazy. Some discussion in the email thread: Subject: Documenting Python's float.__str__() https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
* bpo-41747: Ensure all dataclass methods uses their parents' qualname (GH-22155)Batuhan Taskaya2020-10-211-0/+3
| | | | | * bpo-41747: Ensure all dataclass methods uses their parents' qualname Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Update tzdata to 2020.3 (GH-22856)Paul Ganssle2020-10-211-1/+1
| | | TBH I had forgotten that we pin this 😅, and it's been updated quite a few times since we added this.
* bpo-41902: Micro optimization for range.index if step is 1 (GH-22479)Dong-hee Na2020-10-211-0/+1
|
* bpo-23706: Add newline parameter to pathlib.Path.write_text (GH-22420) ↵Максим2020-10-211-0/+1
| | | | | | | | | (GH-22420) * Add _newline_ parameter to `pathlib.Path.write_text()` * Update documentation of `pathlib.Path.write_text()` * Add test case for `pathlib.Path.write_text()` calls with _newline_ parameter passed Automerge-Triggered-By: GH:methane
* bpo-41902: Micro optimization for compute_item of range (GH-22492)Dong-hee Na2020-10-211-0/+3
|
* bpo-42010: [docs] Clarify subscription of types (GH-22822)kj2020-10-201-0/+4
|
* bpo-29981: Add examples and update index for set, dict, and generator ↵Florian Dahlitz2020-10-201-0/+1
| | | | | | comprehensions'(GH-20272) Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
* bpo-38439: Update the Windows Store package's icons for IDLE. Artwork by ↵Steve Dower2020-10-201-0/+1
| | | | Andrew Clover (GH-22817)
* bpo-39693: mention KeyError in tarfile extractfile documentation (GH-18639)Andrey Doroschenko2020-10-202-0/+2
| | | Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>
* bpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)Miro Hrončok2020-10-201-0/+2
|
* bpo-38324: Fix test__locale.py Windows failures (GH-20529)TIGirardi2020-10-201-0/+1
| | | | Use wide-char _W_* fields of lconv structure on Windows Remove "ps_AF" from test__locale.known_numerics on Windows
* bpo-41491: plistlib: accept hexadecimal integer values in xml plist files ↵Ronald Oussoren2020-10-201-0/+1
| | | | (GH-22764)
* bpo-42093: Add opcode cache for LOAD_ATTR (GH-22803)Pablo Galindo2020-10-201-0/+2
|
* bpo-4356: Add key function support to the bisect module (GH-20556)Raymond Hettinger2020-10-201-0/+1
|
* bpo-38912: fix close before connect callback in test_asyncio SSL tests ↵Justin Turner Arthur2020-10-201-0/+1
| | | | | (GH-22691) Reduces the rate at which the ENV CHANGED failure occurs in test_asyncio SSL tests (due to unclosed transport), but does not 100% resolve it.
* bpo-41586: Add pipesize parameter to subprocess & F_GETPIPE_SZ and ↵Ruben Vorderman2020-10-192-0/+3
| | | | | | | | | | | | | | | | | F_SETPIPE_SZ to fcntl. (GH-21921) * Add F_SETPIPE_SZ and F_GETPIPE_SZ to fcntl module * Add pipesize parameter for subprocess.Popen class This will allow the user to control the size of the pipes. On linux the default is 64K. When a pipe is full it blocks for writing. When a pipe is empty it blocks for reading. On processes that are very fast this can lead to a lot of wasted CPU cycles. On a typical Linux system the max pipe size is 1024K which is much better. For high performance-oriented libraries such as xopen it is nice to be able to set the pipe size. The workaround without this feature is to use my_popen_process.stdout.fileno() in conjuction with fcntl and 1031 (value of F_SETPIPE_SZ) to acquire this behavior.
* bpo-27321 Fix email.generator.py to not replace a non-existent header. ↵Mark Sapiro2020-10-191-0/+2
| | | | | | | | | | | (GH-18074) This PR replaces #1977. The reason for the replacement is two-fold. The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit. Also the tests are different. The test_nonascii_as_string_without_cte test in #1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness. Automerge-Triggered-By: @warsaw
* bpo-41845: Move PyObject_GenericGetDict() back into the limited API (GH22646)Zackery Spytz2020-10-191-0/+2
| | | | It was moved out of the limited API in 7d95e4072169911b228c9e42367afb5f17fd3db0. This change re-enables it from 3.10, to avoid generating invalid extension modules for earlier versions.
* bpo-41784: make PyUnicode_AsUTF8AndSize part of the limited API (GH-22252)Alex Gaynor2020-10-191-0/+1
|
* bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)Jason R. Coombs2020-10-191-0/+1
| | | Co-authored-by: Christian Heimes <christian@python.org>
* bpo-42089: Sync with current cpython branch of importlib_metadata (GH-22775)Barry Warsaw2020-10-191-0/+2
| | | | | ~~The only differences are in the test files.~~ Automerge-Triggered-By: @jaraco
* bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS ↵Ronald Oussoren2020-10-191-0/+1
| | | | (GH-22762)
* bpo-42051: Reject XML entity declarations in plist files (#22760)Ronald Oussoren2020-10-191-0/+3
|
* bpo-39107: Updated Tcl and Tk to 8.6.10 in Windows installer (GH-22405)Steve Dower2020-10-191-0/+1
|
* Correct name of bytecode in change note. (GH-22723)Mark Shannon2020-10-191-1/+1
|
* bpo-19270: Fixed sched.scheduler.cancel to cancel correct event (GH-22729)Bar Harel2020-10-191-0/+2
|
* bpo-40492: Fix --outfile with relative path when the program changes it ↵Anthony Sottile2020-10-181-0/+3
| | | | working dir (GH-19910)
* bpo-28660: Make TextWrapper break long words on hyphens (GH-22721)Irit Katriel2020-10-181-0/+1
|
* bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731)scaramallion2020-10-182-0/+3
|
* bpo-38252: Use 8-byte step to detect ASCII sequence in 64bit Windows build ↵Ma Lin2020-10-181-0/+1
| | | | (GH-16334)
* bpo-42065: Fix incorrectly formatted _codecs.charmap_decode error message ↵Max Bernstein2020-10-171-0/+3
| | | | (GH-19940)
* closes bpo-42030: Remove legacy AIX dynload support (GH-22717)Kevin Adler2020-10-161-0/+3
| | | | | | | | Since c19c5a6, AIX builds have defaulted to using dynload_shlib over dynload_aix when dlopen is available. This function has been available since AIX 4.3, which went out of support in 2003, the same year the previously referenced commit was made. It has been nearly 20 years since a version of AIX has been supported which has not used dynload_shlib so there's no reason to keep this legacy code around.
* bpo-42021: Fix possible ref leaks during _sqlite3 module init (GH-22673)Erlend Egeberg Aasland2020-10-151-0/+1
|
* bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)Kevin Adler2020-10-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running in a non-UTF-8 locale, if an error occurs while importing a native Python module (say because a dependent share library is missing), the error message string returned may contain non-ASCII code points causing a UnicodeDecodeError. PyUnicode_DecodeFSDefault is used for buffers which may contain filesystem paths. For consistency with os.strerror(), PyUnicode_DecodeLocale is used for buffers which contain system error messages. While the shortname parameter is always encoded in ASCII according to PEP 489, it is left decoded using PyUnicode_FromString to minimize the changes and since it should not affect the decoding (albeit _potentially_ slower). In dynload_hpux, since the error buffer contains a message generated from a static ASCII string and the module filesystem path, PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as is used elsewhere. * bpo-41894: Fix bugs in dynload error msg handling For both dynload_aix and dynload_hpux, properly handle the possibility that decoding strings may return NULL and when such an error happens, properly decrement any previously decoded strings and return early. In addition, in dynload_aix, ensure that we pass the decoded string *object* pathname_ob to PyErr_SetImportError instead of the original pathname buffer. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41984: GC track all user classes (GH-22701)Brandt Bucher2020-10-151-0/+2
|
* bpo-39337: encodings.normalize_encoding() now ignores non-ASCII characters ↵Hai Shi2020-10-141-0/+1
| | | | (GH-22219)
* bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)Anatoliy Platonov2020-10-142-0/+2
|
* bpo-42015: Reorder dereferencing calls in meth_dealloc, to make sure m_self ↵Yannick Jadoul2020-10-121-0/+3
| | | | is kept alive long enough (GH-22670)