| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
(cherry picked from commit b6ef6f69a9afc979640a5f9883f799de1364bff7)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define
properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L,
whereas <features.h> (included indirectly by <string.h>) defines
_POSIX_C_SOURCE as 199506L.
(cherry picked from commit cf247359d5b7082044eea1fa94b5211a172b1ff6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2eb6ad8578fa9d764c21a92acd8e054e3202ad19)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix xml.dom.minidom cloneNode() on a document with an entity: pass
the correct arguments to the user data handler of an entity (fix an
old copy/paste mistake).
Bug spotted and fix proposed by Charalampos Stratakis, initial
reproducer written by Petr Viktorin.
Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 8e0418688906206fe59bd26344320c0fc026849e)
|
|
|
|
|
|
|
|
|
| |
When using link time optimizations, the -flto flag is passed to
BASECFLAGS, which makes it propagate to distutils. Those flags
should be reserved for the interpreter and the stdlib extension
modules only, thus moving those flags to CFLAGS_NODIST.
(cherry picked from commit f92c7aa1ae81efa475b5aecf66e4711ef0f52c4c)
Co-authored-by: stratakis <cstratak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.o generated by clang in LTO mode actually are LLVM bitcode files, which
leads to a few errors during configure/build step:
- add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used
to build autoconf test case, and some are not compatible with clang LTO
(they assume binary in the .o, not bitcode)
- force llvm-ar instead of ar, as ar is not aware of .o files generated
by clang -flto
(cherry picked from commit 5ad36f9b21a3aa3b2265b1b43d73522cc3322df2)
Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
|
|
|
|
| |
(cherry picked from commit ac218bc5dbfabbd61c76ce8a17de088611e21981)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
| |
(cherry picked from commit 2db96ae7444880d66d4ef65abab8a5e6ff328711)
Co-authored-by: Julien Palard <julien@palard.fr>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.
In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.
In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b53560b3867844472ae381fb3f858760621)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests: Further validate `wraps` functionality in `unittest.mock.Mock`
Add more tests to validate how `wraps` interacts with other features of
mocks.
* Don't call the wrapped object if `side_effect` is set
When a object is wrapped using `Mock(wraps=...)`, if an user sets a
`side_effect` in one of their methods, return the value of `side_effect`
and don't call the original object.
* Refactor what to be called on `mock_call`
When a `Mock` is called, it should return looking up in the following
order: `side_effect`, `return_value`, `wraps`. If any of the first two
return `mock.DEFAULT`, lookup in the next option.
It makes no sense to check for `wraps` returning default, as it is
supposed to be the original implementation and there is nothing to
fallback to.
(cherry picked from commit f05df0a4b679d0acfd0b1fe6187ba2d553b37afa)
Co-authored-by: Mario Corchero <mariocj89@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-11015) (GH-11020) (GH-11026)
(cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9)
(cherry picked from commit 602d307ac5e8a2da38a193dca3bdfef5994dfe67)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
| |
2. (GH-11017) (GH-11022) (GH-11024)
encoding='latin1' should be used for successful decoding.
(cherry picked from commit 8452ca15f41061c8a6297d7956df22ab476d4df4)
(cherry picked from commit 0d5730e6437b157f4aeaf5d2e67abca23448c29a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-10464)
* bpo-34864: warn if "Prefer tabs when opening documents" set to "Always"
* add NEWS entry
* address code review comments
* address second code review comments
* Add entry for idlelib/NEWS.txt.
(cherry picked from commit 9ebe8794f003dadfff578a066ea503a3e37ffe1d)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit c9566b8c454120e3d0ddb5ab970f262a6cd80077)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
|
|
|
| |
(cherry picked from commit 42b1d6127bd8595522a78a75166ebb9fba74a6a2)
|
|
|
|
|
| |
(cherry picked from commit 0644b33821b70efbf0ac1ec1fb8729b05796564a)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Join 3 pools in these tests:
* test.test_multiprocessing_spawn.WithProcessesTestPool.test_context
* test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback
(cherry picked from commit 388c8c208d9d09bd28289c1e4776b947d4d0f0f0)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
| |
character. (GH-10863)
(cherry picked from commit 3ffa8b9ba190101f674a0e524e482a83ed09cccd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
Cherry-picked from 6ea9d54.
|
|
|
|
|
|
|
| |
(GH-7278)
(cherry picked from commit 8752dfbd1f0c96ca09cdacabaf0d0f8c3895b6ce)
Co-authored-by: native-api <ivan_pozdeev@mail.ru>
|
|
|
|
|
| |
deleted (GH-8450) (GH-9677)" (GH-10969)
This reverts commit 07b96a95db78eff3557d1bfed1df9ebecc40815b.
|
|
|
|
|
|
|
| |
Escape the \t and \n.
Follow up from https://github.com/python/cpython/pull/10814..
(cherry picked from commit 2d8f976cde4794d174b44ff7d5fd970aa89c65e8)
Co-authored-by: E Kawashima <e-kwsm@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
Moreover, "python3 -m test test_eintr -v" now avoids redirecting
stdout/stderr to a pipe, the child process inherits stdout/stderr
from the parent.
(cherry picked from commit aa8ae904ad2f576f8e7b38a9a6542d3e9a569be9)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
| |
Add a missing word `as` in `as well as an`.
Linkify `threading.Thread`..
(cherry picked from commit 40a61da40d252626f8b9ff524d76c1f0ccb3a4f7)
Co-authored-by: Matt Wheeler <m@funkyhat.org>
|
|
|
|
|
|
|
|
|
| |
(GH-9165). (GH-10947) (GH-10954)
(cherry picked from commit 34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b)
(cherry picked from commit ac8b47c8b4edd59aaee857717d434df52ec49e6c)
Co-authored-by: William Grzybowski <wg@FreeBSD.org>
|
|
|
|
|
|
|
|
|
| |
(GH-8113). (GH-10946) (GH-10952)
(cherry picked from commit 5b25f1d03100e2283c1b129d461ba68ac0169a14)
(cherry picked from commit 1de91a0032fed500ddd3d8c4fb7a38c0b8719f67)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
|
|
|
|
|
|
|
|
|
| |
select() calls are retried on EINTR (per PEP 475). However, if a
timeout was provided and the deadline has passed after running the
signal handlers, rlist, wlist and xlist should be cleared since select(2)
left them unmodified.
(cherry picked from commit 7f52415a6d4841d77d3b7853e83b25a22e0048dc)
Co-authored-by: Oran Avraham <252748+oranav@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 55f41e45b4318cbe19209f5144641344d0049fb8)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
| |
(GH-9419) (GH-10942)
(cherry picked from commit 67a93b3a0b3814e97ef9d077b21325fc8ce351b2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-8537) (GH-10936)
When running test_bdb.py as a script, `import test_module` would be
importing the existing Lib/test/test_modules.py instead of the
tempcwd/test_module.py module which was dynamically created by
test_bdb.py itself.
(cherry picked from commit 54fd45505b3a365e6d53441e6dd7e0d1ec13b46f)
Co-authored-by: Alex H <1884912+lajarre@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 1ce853f37783575e2b3aaa159ddcebc8660830ef)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
| |
save_reduce(). (GH-9886)
(cherry picked from commit 25d389789c59a52a31770f7c50ce9e02a8909190)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-10925)
* posixpath.expanduser() now returns the input path unchanged if
the HOME environment variable is not set and pwd.getpwuid() raises
KeyError (the current user identifier doesn't exist in the password
database).
* Add test_no_home_directory() to test_site.
(cherry picked from commit f2f4555d8287ad217a1dba7bbd93103ad4daf3a8)
|
|
|
|
|
|
|
|
|
| |
(GH-10874)
* [3.6] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867).
(cherry picked from commit 3bc0ebab17bf5a2c29d2214743c82034f82e6573)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
(GH-10914)
(cherry picked from commit 2a893430c9c8378cbdfac95895a64fa07aaff9ed)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
| |
(cherry picked from commit 4752e65250bce60b97d5af702d586092d02fbf58)
|
|
|
|
|
|
|
|
|
| |
On Travis CI, FTP tests of test_urllib2net randomly fail with "425
Security: Bad IP connecting".
test.pythoninfo now also logs TRAVIS environment variable.
(cherry picked from commit c11b3b19a5b022c6c229043d37f9a9fd06f22500)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
| |
_Call/_MagicProxy. (GH-10873)
Fix minor typo in test function name.
(cherry picked from commit e63e617ebbe481c498bdf037a62e09f4f9f3963f)
Co-authored-by: Andrew Dunai <andunai@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-35373: Fix PyInit_timezone() error handling
PyInit_timezone() now returns -1 at exit if an exception is raised.
Check also explicitly PyUnicode_DecodeLocale() and Py_BuildValue()
errors.
* bpo-35373: Fix PyInit_time() error handling (GH-10865)
* PyInit_time() now returns NULL if an exception is raised.
* Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is
a special prefix for function initializing a module.
init_timezone() doesn't initialize a module and the function is not
exported.
(cherry picked from commit 3bb150d8148e3cc08418077a58f43e064b9fde61)
(cherry picked from commit 5eb78c75128187a36d8e983027632fa51cc2ff4d)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
| |
Also refactor the call recording implementation and add some notes
about its limitations.
(cherry picked from commit 8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68)
Co-authored-by: Chris Withers <chris@withers.org>
|
|
|
|
|
| |
(cherry picked from commit 4013c179117754b039957db4730880bf3285919d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
PyCArg_repr(). (GH-10853)
Use "ll" instead of the nonstandard "q".
(cherry picked from commit 062cbb67726f26794b1b461853e40696b4a0b220)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
(GH-10825)
(cherry picked from commit b7c2182604d5796b5af4c837991aa0b8c8a2d41f)
|
|
|
|
|
| |
(cherry picked from commit edeca92c84a3b08902ecdfe987cde00c7e617887)
Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
get_gmtoff() now returns time_t instead of int to fix the following
Visual Studio warning:
Modules\timemodule.c(1183): warning C4244: 'return':
conversion from 'time_t' to 'int', possible loss of data
(cherry picked from commit 503ce5c482cb267b0770bc46c315d5cf822bdca9)
|
|
|
|
|
|
|
|
|
| |
(GH-10826) (GH-10832)
Modify asyncio tests to utilize the certificates from the test directory
instead of its own set, as they are the same and with each update they had
to be updated as well.
(cherry picked from commit b062ba77b617b0f89b7ea25d14cc77c991462ad4)
|
|
|
|
|
|
|
|
|
| |
Fix an undefined behaviour in the pthread implementation of
PyThread_start_new_thread(): add a function wrapper to always return
NULL.
Add pythread_callback struct and pythread_wrapper() to thread_pthread.h.
(cherry picked from commit 9eea6eaf23067880f4af3a130e3f67c9812e2f30)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testAccept() and testRecv() of test_socket.NonBlockingTCPTests have a
race condition: time.sleep() is used as a weak synchronization
primitive and the tests fail randomly on slow buildbots.
Use a reliable threading.Event to fix these tests.
Other changes:
* Replace send() with sendall()
* Expect specific BlockingIOError rather than generic OSError
* Add a timeout to select() in testAccept() and testRecv()
* Use addCleanup() to close sockets
* Use assertRaises()
(cherry picked from commit ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit a2e3585e79c93b2372dbad46a744e28fcc6dad6d)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|