faulthandler now allocates a dedicated stack of SIGSTKSZ*2 bytes,
instead of just SIGSTKSZ bytes. Calling the previous signal handler
in faulthandler signal handler uses more than SIGSTKSZ bytes of stack
memory on some platforms.
(cherry picked from commit ac827edc49)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
FreeBSD implementation of poll(2) restricts the timeout argument to be
either zero, or positive, or equal to INFTIM (-1).
Unless otherwise overridden, socket timeout defaults to -1. This value
is then converted to milliseconds (-1000) and used as argument to the
poll syscall. poll returns EINVAL (22), and the connection fails.
This bug was discovered during the EINTR handling testing, and the
reproduction code can be found in
https://bugs.python.org/issue23618 (see connect_eintr.py,
attached). On GNU/Linux, the example runs as expected.
This change is trivial:
If the supplied timeout value is negative, truncate it to -1.
(cherry picked from commit 2814620657)
Co-authored-by: Artem Khramov <akhramov@pm.me>
Fix the implementation of curses addch(str, color_pair): pass the
color pair to setcchar(), instead of always passing 0 as the color
pair.
(cherry picked from commit 077af8c2c9)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored
(cherry picked from commit 7e479c8221)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
https://bugs.python.org/issue37814:
> The empty tuple syntax in type annotations, `Tuple[()]`, is not obvious from the examples given in the documentation (I naively expected `Tuple[]` to work); it has been documented in PEP 484 and in mypy, but not in the documentation for the typing module.
https://bugs.python.org/issue37814
(cherry picked from commit 8a784af750)
Co-authored-by: Josh Holland <anowlcalledjosh@gmail.com>
Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.
(cherry picked from commit 1ac2a83f30)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
This causes them to be collapsed by default in diffs shown on GitHub.
https://bugs.python.org/issue37760
Automerge-Triggered-By: @benjaminp
(cherry picked from commit 4e3dfcc4b9)
Co-authored-by: Greg Price <gnprice@gmail.com>
This causes them to be collapsed by default in diffs shown on GitHub.
https://bugs.python.org/issue37760
Automerge-Triggered-By: @benjaminp
(cherry picked from commit 4e3dfcc4b9)
Co-authored-by: Greg Price <gnprice@gmail.com>
- Remove use of replacement text in the script
- Make use of the pyvenv.cfg file for prompt value.
- Add parameters to allow more flexibility
- Make use of the current path, and assumptions about where env puts things, to compensate
- Make the script a bit more 'idiomatic' Powershell
- Add script documentation (Get-Help .\.venv\Scripts\Activate.ps1 shows PS help page now
(cherry picked from commit 732775d6be)
Co-authored-by: Derek Keeler <d3r3kk@users.noreply.github.com>
This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string.
https://bugs.python.org/issue32178
(cherry picked from commit 09a1872a80)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
* bpo-32912: Revert warnings for invalid escape sequences.
DeprecationWarning will continue to be emitted for invalid escape sequences in string and bytes literals in 3.8 just as it did in 3.7.
SyntaxWarning may be emitted in the future. But per mailing list discussion, we don't yet know when because we haven't settled on how to do so in a non-disruptive manner.
* add a missing ``.. availability::`` reST explicit markup;
* more consistent "see man page" sentences.
(cherry picked from commit cfebfef2de)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* Remove suggestion that is less relevant now that global lookups are much faster
* Add link for installing the recipes
(cherry picked from commit adf02b36b3)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Convert mouse y to line number in the sidebar rather than the text.
(cherry picked from commit 86f1a18abf)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
There was a discrepancy between the Python and C implementations.
Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
(cherry picked from commit 17e52649c0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Permanent redirect was explained as a temporary redirect.
(cherry picked from commit 5c72badd06)
Co-authored-by: Florian Wendelborn <1133858+FlorianWendelborn@users.noreply.github.com>
Previously pdb checked the $HOME environmental variable
to find the user .pdbrc. If $HOME is not set, the user
.pdbrc would not be found.
Change pdb to use `os.path.expanduser('~')` to determine
the user's home directory. Thus, if $HOME is not set (as
in tox or on Windows), os.path.expanduser('~') falls
back on other techniques for locating the user's home
directory.
This follows pip's implementation for loading .piprc.
Co-authored-by: Dan Lidral-Porter <dlp@aperiodic.org>
(cherry picked from commit 7ea9a85f13)
Co-authored-by: Timothy Hopper <tdhopper@users.noreply.github.com>
BPO -16970: Adding error message for invalid args
Applied the patch argparse-v2 patch issue 16970, ran patch check and the test suite, test_argparse with 0 errors
https://bugs.python.org/issue16970
(cherry picked from commit 4b3e975923)
Co-authored-by: tmblweed <tmblweed@users.noreply.github.com>
This changeset increases the default size of the stack
for threads on macOS to the size of the stack
of the main thread and reenables the relevant
recursion test.
(cherry picked from commit 1a057bab0f)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>