./.github/PULL_REQUEST_TEMPLATE.md:8: MD031 Fenced code blocks should be
surrounded by blank lines
./.github/PULL_REQUEST_TEMPLATE.md:10: MD031 Fenced code blocks should
be surrounded by blank lines
./.github/PULL_REQUEST_TEMPLATE.md:19: MD031 Fenced code blocks should
be surrounded by blank lines
./.github/PULL_REQUEST_TEMPLATE.md:21: MD031 Fenced code blocks should
be surrounded by blank lines.
(cherry picked from commit 5cd22cf209)
Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
The hash implementation casts the input pointer to uint64_t* and directly reads
from this, which may cause unaligned accesses. Use memcpy() instead so this code
will not crash with SIGBUS on sparc.
https://bugs.gentoo.org/show_bug.cgi?id=636400
(cherry picked from commit 1e2ec8a996)
Co-authored-by: Rolf Eike Beer <eike@sf-mail.de>
Pass os.environ's copy to new process created at test_posix:
test_specify_environment. Otherwise important variables such as
LD_LIBRARY_PATH are not set and the child process might not work at all
in an environment where such variables are required for Python to function.
(cherry picked from commit 7ec8f28656)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Currently, "pip3 install --upgrade pip" unconditionally installs a
"pip" alias even for Python 3. If a user has an existing Python 3.x
installed from a python.org macOS installer and then subsequently
manually updates to a new version of pip, there may now be a stray
"pip" alias in the Python 3.x framework bin directory which can cause
confusion if the user has both a Python 2.7 and 3.x installed;
if the Python 3.x fw bin directory appears early on $PATH, "pip"
might invoke the pip3 for the Python 3.x rather than the pip for
Python 2.7. To try to mitigate this, the macOS installer script
for the ensurepip option will unconditionally remove "pip" from
the 3.x framework bin directory being updated / installed. (The
ambiguity can be avoided by using "pythonx.y -m pip".)
(cherry picked from commit 0dd80709b5)
Co-authored-by: Ned Deily <nad@python.org>
Previously emitted cover files only when --missing option was used.
(cherry picked from commit 47ab15470d)
Co-authored-by: Michael Selik <mike@selik.org>
In text and entry boxes, this affects selection by double-click,
movement left/right by control-left/right, and deletion left/right
by control-BACKSPACE/DEL.
(cherry picked from commit 5ff3a161c8)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Fix test_embed.test_pre_initialization_sys_options() when building with --enable-shared
(cherry picked from commit 4114846265)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
External importers were being added in both phases of the import
system initialisation.
They're only supposed to be added in the second phase, after the
import machinery has been appropriately configured.
(cherry picked from commit 0977091dca)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some
reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom
is commonly used to select all signals for blocking with `pthread_sigmask`.
So we ignore the sigaddset() return value until we expose sigfillset()
to provide a better idiom.
(cherry picked from commit 25038ecfb6)
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Fix clang ubsan (undefined behavior sanitizer) warnings in dictobject.c by
adjusting how the internal struct _dictkeysobject shared keys structure is
declared.
This remains ABI compatible. We get rid of the union at the end of the
struct being used for conveinence to avoid typecasting in favor of char[]
variable length array at the end of a struct. This is known to clang to be
used for variable sized objects and will not cause an undefined behavior
problem. Similarly, char arrays do not have strict aliasing undefined
behavior when cast.
PEP-007 does not currently list variable length arrays (VLAs) as allowed
in our subset of C99. If this turns out to be a problem, the fix to this is
to change the char `dk_indices[]` into `dk_indices[1]` and restore the
three size computation subtractions this change removes:
`- Py_MEMBER_SIZE(PyDictKeysObject, dk_indices)`
If this works as is I'll make a separate PR to update PEP-007.
(cherry picked from commit 397f1b28c4)
Setup modules are no longer built with -DPy_BUILD_CORE by default,
as using that flag may now require including additional internal-only header files.
Instead, only the modules that specifically need it use that setting.
(cherry picked from commit 063db62aab)
Co-authored-by: xdegaye <xdegaye@gmail.com>