| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
(GH-7651)
(cherry picked from commit 4531ec74c4a9c8e15ee2bdec11b12796ce000f6f)
Co-authored-by: Ned Deily <nad@python.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
The documentation for CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED were
misleading and partly wrong. It fails to explain that OpenSSL behaves
differently in client and server mode. Also OpenSSL does validate the
cert chain everytime. With SSL_VERIFY_NONE a validation error is not
fatal in client mode and does not request a client cert in server mode.
Also discourage people from using CERT_OPTIONAL in client mode.
(cherry picked from commit ef24b6c54d40e7820456873a6eab6ef57d2bd0db)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A datetime object d is aware if d.tzinfo is not None and
d.tzinfo.utcoffset(d) does not return None. If d.tzinfo is None,
or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None,
d is naive.
This commit ensures that instances with non-None d.tzinfo, but
d.tzinfo.utcoffset(d) returning None are treated as naive.
In addition, C acceleration code will raise TypeError if
d.tzinfo.utcoffset(d) returns an object with the type other than
timedelta.
* Updated the documentation.
Assume that the term "naive" is defined elsewhere and remove the
not entirely correct clarification. Thanks, Tim.
(cherry picked from commit 877b23202b7e7d4f57b58504fd0eb886e8c0b377)
Co-authored-by: Alexander Belopolsky <abalkin@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
length (GH-7416) (GH-7602)
(cherry picked from commit 1b85c71a2136d3fa6a1da05b27b1fe4e4b8ee45e)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
|
| |
|
|
|
|
| |
Also, standardize indentation of generated tables.
(cherry picked from commit 7c69c1c0fba8c1c8ff3969bce4c1135736a4cc58)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
|
|
| |
Move the floor() call into fbound() to call floor() on a double
rather than an int. The change should enhance the rounding.
Document also (int)double rounding mode.
(cherry picked from commit 45e4efba7fa2abe61d25e4f8b5bf482e19ff1280)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
| |
Raise TypeError instead of SystemError for unsupported operations.
(cherry picked from commit e9e397605789b2a67b67558fbbe756b7b88934f5)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-7306)
(cherry picked from commit e905c84494526363086f66a979e317e155bf9536)
Co-authored-by: pkerling <pkerling@casix.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a crash in Python initialization when parsing the command line
options.
Fix memcpy() size parameter: previously, we read one wchar_t after
the end of _PyOS_optarg. Moreover, don't copy the trailingg NUL
character: we write it manually anyway.
Thanks Christoph Gohlke for the bug report and the fix!
(cherry picked from commit 58d1683255abb0df4fc70960da6121aeaa41e1d1)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
| |
(cherry picked from commit a5c42284e69fb309bdd17ee8c1c120d1be383012)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 416c1ebd9896b394790dcb4f9f035b1a44ebe9ff)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
|
|
| |
(GH-7080)
(cherry picked from commit 35230d08e09de4e2e52658d5cb09e5b0ca965418)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
|
|
| |
type (GH-3859)
(cherry picked from commit d518d8bc8d5dac1a1270612f424d33e0e5afc2b5)
Co-authored-by: Oren Milman <orenmn@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 19de8b3dd742fb53681478ad4fff57ed7c37a953)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
Use uuid_enc_be() if available to encode UUID to bytes as big endian.
(cherry picked from commit 17d8830312d82e7de42ab89739b0771f712645ff)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
* Fixed a leak when the GC fails to add an object with __del__ into
the gc.garbage list.
* PyGC_Collect() can now be called when an exception is set and
preserves it.
* Fixed an undefined behavior with comparing a dead pointer with NULL.
(cherry picked from commit 301e3cc8a5bc68c5347ab6ac6f83428000d31ab2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 1179f4b40f375af5c59cd4b6be9cc313fa0e1a37)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following bugs in the C implementation:
* get_future_loop() silenced all exceptions raised when look up the get_loop
attribute, not just an AttributeError.
* enter_task() silenced all exceptions raised when look up the current task,
not just a KeyError.
* repr() was called for a borrowed link in enter_task() and task_step_impl().
* str() was used instead of repr() in formatting one error message (in
Python implementation too).
* There where few reference leaks in error cases.
(cherry picked from commit 6655354afcd116c27486bb5ba1dfa50b369d8d85)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 4857543a090c6c1ad20e935b2d7e88bbf2cbcc01)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
| |
|
|
|
| |
(cherry picked from commit c0ee341b29bd7d978b49272a2c0e2dcfa77404d5)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
| |
|
|
|
|
|
|
|
| |
(GH-6915) (GH-6928)
The editline emulation needs to be initialized *after* the name is
defined. This fixes the long open issue.
(cherry picked from commit c2f082e9d164acfa8f96de9526f0f47ae92c426a)
Co-authored-by: Zvezdan Petkovic <zpetkovic@acm.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
The ssl module now contains OP_NO_RENEGOTIATION constant, available with
OpenSSL 1.1.0h or 1.1.1.
Note, OpenSSL 1.1.0h hasn't been released yet.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 67c48016638aac9a15afe6fd6754d53d2bdd6b76)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
| |
Remove the interpreters testing helper (and xid registry).
|
| |
|
|
|
| |
(cherry picked from commit 735abadd5bd91db4a9e6f4311969b0afacca0a1a)
Co-authored-by: Segev Finer <segev208@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 00717a46a120dd8c8c74970fd75d201a5f42ab18)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| |
|
| |
Remove os.posix_spawn, the API isn't complete and we're still figuring out how it should look. wait for 3.8.
|
| |
|
|
|
| |
(cherry picked from commit f04224210d93212bd9ad17d67ef5e1c70171a13e)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| |
|
|
|
|
|
| |
os.posix_spawn(). (GH-6332)
(cherry picked from commit ef347535f289baad22c0601e12a36b2dcd155c3a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-6630) (GH-6631)
(cherry picked from commit 2e38cc39330bd7f3003652869b644110a97a78d8)
Co-authored-by: Serhiy Storchaka <storchaka@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 25038ecfb665bef641abf8cb61afff7505b0e008)
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
|
| |
|
|
|
|
|
|
|
|
|
| |
-DPy_BUILD_CORE (GH-6489)
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 063db62aab4041ac47798e7e48b27b2f2bef21c5)
Co-authored-by: xdegaye <xdegaye@gmail.com>
|
| |
|
|
|
|
| |
Converting with line_info=False and col_info=True crashed before.
(cherry picked from commit e5362eaa75a154c6e91c5b1c47719d0a0f5ca48b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit f178028f37c9dafb72608b719eb03e5a70af4ff5)
Co-authored-by: Devon R <Gorialis@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
pickle.Pickler.dump(). (GH-6366)
(cherry picked from commit c869529ea9fbed574d34cf7ac139ca3f81b62ef0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
Most of them have been added in 3.7.
(cherry picked from commit bac2d5ba30339298db7d4caa9c8cd31d807cf081)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.
When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.
(cherry picked from commit 0e7144b064a19493a146af94175a087b3888c37b)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 030345c0bfc2f76684666fe5c61e766ba5debfe6)
Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
Harden ssl module against LibreSSL CVE-2018-8970.
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test
ensures that NULL bytes are not allowed.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit d02ac25ab0879f1a6de6937573bf00a16b7bd22e)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
LibreSSL < 2.7.
Documentation updates and fixes for failing tests will be provided in
another patch set.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
bpo-33018 (GH-5944) fixed bpo-32999 too. So fc7df0e6 is not required
anymore. Revert it except test case.
(cherry picked from commit f757b72b2524ce3451d2269f0b8a9f0593a7b27f)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
This improves error message for situations when a non-class is
checked w.r.t. an abstract base class.
(cherry picked from commit 40472dd42de4f7265d456458cd13ad6894d736db)
Co-authored-by: jab <jab@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 9308dea3e1fd565d50a76a667e4e8ef0568b7053)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fstat may block for long time if the file descriptor is on a
non-responsive NFS server, hanging all threads. Most fstat() calls are
handled by _Py_fstat(), releasing the GIL internally, but but
_Py_fstat_noraise() does not release the GIL, and most calls release the
GIL explicitly around it.
This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs
when calling:
- mmap.mmap()
- os.urandom()
- random.seed()
(cherry picked from commit 4484f9dca9149da135bbae035f10a50d20d1cbbb)
Co-authored-by: Nir Soffer <nirsof@gmail.com>
|
| |
|
|
|
|
|
| |
It was actually fixed in SQLite 3.8.8, not 3.8.7.
(cherry picked from commit bbf7bb7a636b3112ef6f6b31df385606d52517ce)
Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
|
| |
|
|
|
|
|
|
| |
Multi-phase initialized modules allow m_traverse to be called while the
module is still being initialized, so module authors may need to account
for that.
(cherry picked from commit c2b0b12d1a137ada1023ab7c10b8d9a0249d95f9)
Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit d7aed4102d2a40c74553240c7f03585624d27aea)
Co-authored-by: Emanuele Gaifas <lelegaifax@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-6010)
(cherry picked from commit 3b20d3454e8082e07dba93617793de5dc9237828)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit fc7df0e664198cb05cafd972f190a18ca422989c)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit bc3f2289b9007396bfb7f986bee477b6176c1822)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
|