The `Show Source` was broken because of a change made in sphinx 1.5.1
In Sphinx 1.4.9, the sourcename was "index.txt".
In Sphinx 1.5.1+, it is now "index.rst.txt".
(cherry picked from commit b9ff498793)
* bpo-31221: patchcheck ignores external libraries (#3109)
Tools/scripts/patchcheck.py now ignores changes in directories which
are copies of external libraries:
* Modules/_ctypes/libffi_msvc/
* Modules/_ctypes/libffi_osx/
* Modules/_decimal/libmpdec/
* Modules/expat/
* Modules/zlib/
Drop also support for Mercurial, since CPython migrated to Git.
Exclude also libmpdec
patchcheck: exclude also libffi_osx and libffi_msvc
(cherry picked from commit 4a347ce426)
* Exclude also Modules/_ctypes/libffi on Python 2.7
* Remove _decimal/libmpdec, not in Python 2.7
Change the option for `Français` into `French` to be consistent with the other language selections that are already in English.
(cherry picked from commit b616b97299)
OpenSSL 1.1.0 to 1.1.0e aborted the handshake when server and client
could not agree on a protocol using ALPN. OpenSSL 1.1.0f changed that.
The most recent version now behaves like OpenSSL 1.0.2 again. The ALPN
callback can pretend to not been set.
See https://github.com/openssl/openssl/pull/3158 for more details
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit a5c1bab352)
* bpo-31159: fix language switch regex on unknown yet built languages. (#3039)
This fix a regex issue (a missing non-matching group around an 'or'
list) and the specific possible case where a translation is built but
not yet in known by the picker, but not explicitly listing possible
languages in the regex.
(cherry picked from commit 122081deef)
* bpo-31149: Doc: Add Japanese to the language switcher. (#3028)
(cherry picked from commit c82b7f332a)
(cherry picked from commit e8e7fba0b2)
The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.
Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
(cherry picked from commit 7b7c6dcfff)
* bpo-31160: regrtest now reaps child processes (#3044)
Add a post_test_cleanup() function which currently only calls
support.reap_children().
(cherry picked from commit e3510d74aa)
* bpo-31160: test_tempfile: Fix reap_children() warning (#3056)
TestRandomNameSequence.test_process_awareness() now calls
os.waitpid() to avoid leaking a zombie process.
(cherry picked from commit 6c8c2943d9)
bpo-31135: Call the parent destroy() method even if the used
attribute doesn't exist.
The LabeledScale.destroy() method now also explicitly clears label
and scale attributes to help the garbage collector to destroy all
widgets.
Mention that it warns about features that are significantly changed in Python 3
and can’t be detected using static code analysis.
Link to Porting Python 2 Code to Python 3 doc
* bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915)
There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if
dev_t is larger than 32-bit, until the bug is fixed in FreeBSD
CURRENT.
(cherry picked from commit 12953ffe12)
* Fix syntax for Python 2.7
* bpo-31028: Fix test_pydoc when run directly
Fix get_pydoc_link() of test_pydoc to fix "./python
Lib/test/test_pydoc.py": get the absolute path to __file__ to prevent
relative directories.
* Use realpath() instead of abspath()
(cherry picked from commit fd46561167)
* bpo-30980: Fix close test to fail
test_close_twice was not considering the fact that file_wrapper is
duping the file descriptor. Closing the original descriptor left the
duped one open, hiding the fact that close protection is not effective.
* bpo-30980: Fix double close protection
Invalidated self.fd before closing, handling correctly the case when
os.close raises.
* bpo-30980: Fix fd leak introduced in the fixed test
multiprocessing.Process.is_alive() now removes the process from the
_children set if the process completed.
The change prevents leaking "dangling" processes.
(cherry picked from commit 2db64823c2)
* bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027)
multiprocessing.Queue.get() with a timeout now polls its reader in
non-blocking mode if it succeeded to aquire the lock but the acquire
took longer than the timeout.
Co-Authored-By: Grzegorz Grzywacz <grzgrzgrz3@gmail.com>
(cherry picked from commit 1b7863c3b6)
* bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (#2148)
_test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a
timeout of 1 second on Queue.get(), instead of 0.1 second, for slow
buildbots.
(cherry picked from commit 8f6eeaf21c)
(cherry picked from commit e42339d3a0)
bpo-30850: On Windows, test04_lock_timeout2() now tolerates 50 ms
whereas 100 ms is expected. The lock sometimes times out after only
58 ms. Windows clocks have a bad resolution and bad accuracy.
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)
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.
It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.
This issue affects only GNU readline. When using libedit emulation
system history size option does not work.
This is a backport of the actual fix from master without the test, since
the test depends on new run_pty() helper which is not available in 2.7.
* bpo-30855: Trying to fix test_use on Windows.
Avoid possible weird behavior of WideInt convertion.
"winfo id" always returns string hexadecimal representation.
(cherry picked from commit b9d672491d)
* bpo-30855: Trying to fix test_use on Windows.
(cherry picked from commit 29a2f7c6b3)
(subTest() removed since it was introduced in Python 3)