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>
Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.
This adds the following constants with a CAN_BCM prefix:
* SETTIMER
* STARTTIMER
* TX_COUNTEVT
* TX_ANNOUNCE
* TX_CP_CAN_ID
* RX_FILTER_ID
* RX_CHECK_DLC
* RX_NO_AUTOTIMER
* RX_ANNOUNCE_RESUME
* TX_RESET_MULTI_IDX
* RX_RTR_FRAME
* CAN_FD_FRAME
The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.
(cherry picked from commit 31c4fd2a10)
Co-authored-by: karl ding <karlding@users.noreply.github.com>
* bpo-33821: Update IDLE section of What's New 3.7
* Fix roles.
(cherry picked from commit 5982b7201b)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This looks like the only place that proto 4 framing gets exercised
so leave it as part of the PGO task.
(cherry picked from commit eca7ffc61c)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Mark some individual tests to skip when --pgo is used. The tests
marked increase the PGO task time significantly and likely don't
help improve optimization of the final executable.
(cherry picked from commit 52a48e62c6)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
When scanning the string, most characters are valid, so
checking for invalid characters first means never needing
to check the value of strict on valid strings, and only
needing to check it on invalid characters when doing
non-strict parsing of invalid strings.
This provides a measurable reduction in per-character
processing time (~11% in the pre-merge patch testing).
(cherry picked from commit 8a758f5b99)
Co-authored-by: Marco Paolini <mpaolini@users.noreply.github.com>
They pass with tk 8.5.9 (Azure) but fail with the 8.6.x we install.
(cherry picked from commit e8874b85b4)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
https://bugs.python.org/issue37500
Add a new field to the compiler structure that allows to be configured
so no bytecode is emitted. In this way is possible to detect errors by
walking the nodes while preserving optimizations.
https://bugs.python.org/issue37500
(cherry picked from commit 18c5f9d44d)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-37697: Sync with importlib_metadata 0.19
* Run make regen-importlib
* 📜🤖 Added by blurb_it.
(cherry picked from commit 049460da9c)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955355)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The boxes for the font and highlight samples are now constrained by the overall config dialog size. They gain scrollbars when the when a large font size makes the samples too large for the box.
(cherry picked from commit 3221a63c69)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Previously, pyc files in the embeddable distribution reported their
location as <build path>/<file stem>.py. This causes a little confusion
when interpreting stack traces as the file is in a (almost certainly)
incorrect location, and lacks the full relative path to Lib (e.g.
email/mime/image.py will only show image.py).
This change preserves the Lib relative location of the source file as a
path so that stack traces are (hopefully) less misleading and more
informative.
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit c4cda4369f)
Co-authored-by: Bill Collins <bilbocollins@gmail.com>
Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.
(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)
Automerge-Triggered-By: @brettcannon
(cherry picked from commit 544fa15ea1)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
* bpo-37399: Correctly attach tail text to the last element/comment/pi, even when comments or pis are discarded.
Also fixes the insertion of PIs when "insert_pis=True" is configured for a TreeBuilder.
* Fix the formatting in the documentation of the tostring() functions.
* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.
* bpo-34160: Add an explanation of how users should deal with the attribute order.
(cherry picked from commit a3697db010)
Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
Verify that it appears to find roughly the right number of tests in the stdlib's testsuite.
(cherry picked from commit e95ac20103)
Co-authored-by: Gregory P. Smith <greg@krypto.org>