Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00b)
Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918b)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values.
(cherry picked from commit 6cfa927ceb)
* Fix ZeroMQSocketListener and ZeroMQSocketHandler examples
* Use send_json and recv_json to simplify pyzmq interfacing
* Add News entry
(cherry picked from commit 586c0502b5)
PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds. This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.
This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.
test_gdb passes on both a debug and a non-debug build.
Original patch by Bruno "Polaco" Penteado.
(cherry picked from commit 5fe59f8e3a)
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783)
Only C implementation was tested.
(cherry picked from commit 287c5594ed)
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783)
Only C implementation was tested..
(cherry picked from commit 287c5594ed)
Adds a new 'Pip not installed' section that covers
running `ensurepip` manually, and also references
the relevant section of the Python Packaging User
Guide.
(cherry picked from commit b3527bfefd)
Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm. This makes the whitespace handling code consistent.
* Add 'parens' style to highlight both opener and closer.
* Make 'default' style, which is not default, a synonym for 'opener'.
* Make time-delay work the same with all styles.
* Add help for config dialog extensions tab, including parenmatch.
* Add new tests.
Original patch by Charles Wohlganger.
(cherry picked from commit fae2c35)
New error condition paths were introduced, which did not decrement
`key2` and `val2` objects. Therefore, decrement references before
jumping to the error label.
Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
(cherry picked from commit a7874c73c0)
Bug didn't manifest itself when importing a module with source as .py files are always the first on the search path. The issue only showed up in bytecode-only packages where the calculated file path would be ``__init__.py/__init__.pyc``.
Patch by Alexandru Ardelean.
(cherry picked from commit c38e32a100)
The current regex based splitting produces a wrong result. For example::
http://abc#@def
Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
(cherry picked from commit 90e01e50ef)
* Fix bpo-30584
* Adding a comment mentionning the bpo and explaining what is the identifier
* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba7563)
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.
Co-Authored-By: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
(cherry picked from commit 79ef7f8e88)
* bpo-28787: Fix out of tree --with-dtrace builds
* Unsilence directory creation
* Add Misc/NEWS and Misc/ACKS entries.
(cherry picked from commit f6eae5bf1c)
* bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478)
* bpo-29243: Fix Makefile with respect to --enable-optimizations
When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.
Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.
* !squash
(cherry picked from commit a1054c3b00)
* [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478)
* bpo-29243: Fix Makefile with respect to --enable-optimizations
When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.
Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.
* !squash.
(cherry picked from commit a1054c3b00)
The reference to administrative data was confusing to readers,
so this simplifies the note to explain that deep copying may copy
more then you intended, such as data that you expected to be
shared between copies.
(cherry picked from commit 19e0494256)
* Wrong parameter name, 'group_by' instead of 'key_type'
* Don't round up numbers when explaining the examples. If they exactly match
what can be read in the script output, it is to easier to understand
(4.8 MiB vs 4855 KiB)
* Fix incorrect method link that was pointing to another module
Patch written by Loic Pefferkorn.