| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
(GH-5912) (GH-5931)
* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"
This reverts commit dd42cb71f2cb02f3a32f016137b12a146bc0d0e2.
(cherry picked from commit be50a7b627d0aa37e08fa8e2d5568891f19903ce)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenSSL 1.1 has introduced a new API to set the minimum and maximum
supported protocol version. The API is easier to use than the old
OP_NO_TLS1 option flags, too.
Since OpenSSL has no call to set minimum version to highest supported,
the implementation emulate maximum_version = MINIMUM_SUPPORTED and
minimum_version = MAXIMUM_SUPPORTED by figuring out the minumum and
maximum supported version at compile time.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 698dde16f60729d9e3f53c23a4ddb8e5ffe818bf)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Direct instantiation of SSLSocket and SSLObject objects is now prohibited.
The constructors were never documented, tested, or designed as public
constructors. The SSLSocket constructor had limitations. For example it was
not possible to enabled hostname verification except was
ssl_version=PROTOCOL_TLS_CLIENT with cert_reqs=CERT_REQUIRED.
SSLContext.wrap_socket() and SSLContext.wrap_bio are the recommended API
to construct SSLSocket and SSLObject instances. ssl.wrap_socket() is
also deprecated.
The only test case for direct instantiation was added a couple of days
ago for IDNA testing.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9d50ab563df6307cabbcc9883cb8c52c614b0f22)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes
Misc fixes and workarounds for compatibility with OpenSSL 1.1.1-pre1 and
TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by
default. Some test cases only apply to TLS 1.2. Other tests currently
fail because the threaded or async test servers stop after failure.
I'm going to address these issues when OpenSSL 1.1.1 reaches beta.
OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS
1.3. The feature is enabled by default for maximum compatibility with
broken middle boxes. Users should be able to disable the hack and CPython's test suite needs
it to verify default options.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 05d9fe32a1245b9a798e49e0c1eb91f110935b69)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
| |
classes and vice-versa, (GH-5919) (GH-5920)
This restriction will be relaxed at a future date.
(cherry picked from commit 2fa6b9eae07e2385e2acbf2e40093a21fb3a10c4)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 72d9b2be36f091793ae7ffc5ad751f040c6e6ad3)
Co-authored-by: Joffrey F <f.joffrey@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-4745)
(cherry picked from commit eee72d4778a5513038edd5236cdd87ccce2bc60a)
Co-authored-by: Tobotimus <Tobotimus@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 19e7d48ce89422091f9af93038b9fee075d46e9e)
Co-authored-by: animalize <animalize@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(GH-5832)
(cherry picked from commit 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
unsafe_hash. (GH-5891) (GH-5902)
unsafe_hash=False is now the default. It is the same behavior as the old hash=None parameter. unsafe_hash=True will try to add __hash__. If it already exists, TypeError is raised.
(cherry picked from commit dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 973cae07d6ce7f5a93bd9cd3bcb724a96cfe14e9)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
| |
* Support sendfile on Windows Proactor event loop naively.
(cherry picked from commit a19fb3c6aaa7632410d1d9dcb395d7101d124da4)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
|
|
| |
in anticipation of changing how non-default hashing is handled. (GH-5834) (GH-5889)
(cherry picked from commit 718070db26b35da4aedc03088c58558a833ccf6e)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
| |
|
|
|
|
| |
Add tests to verify connection with secp384r1 ECDH curves.
(cherry picked from commit b7b9225831a729bff84eb7c43bad138416b994fe)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The SSLSocket is no longer implemented on top of SSLObject to
avoid an extra level of indirection.
* Owner and session are now handled in the internal constructor.
* _ssl._SSLSocket now uses the same method names as SSLSocket and
SSLObject.
* Channel binding type check is now handled in C code. Channel binding
is always available.
The patch also changes the signature of SSLObject.__init__(). In my
opinion it's fine. A SSLObject is not a user-constructable object.
SSLContext.wrap_bio() is the only valid factory.
(cherry picked from commit 141c5e8c2437a9fed95a04c81e400ef725592a17)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
ssl.match_hostname() has been simplified and no longer depends on re and
ipaddress module for wildcard and IP addresses. Error reporting for invalid
wildcards has been improved.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit aef1283ba428e33397d87cee3c54a5110861552d)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the ssl module stored international domain names (IDNs)
as U-labels. This is problematic for a number of reasons -- for
example, it made it impossible for users to use a different version
of IDNA than the one built into Python.
After this change, we always convert to A-labels as soon as possible,
and use them for all internal processing. In particular, server_hostname
attribute is now an A-label, and on the server side there's a new
sni_callback that receives the SNI servername as an A-label rather than
a U-label.
(cherry picked from commit 11a1493bc4198f1def5e572049485779cf54dc57)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
| |
Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup.
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)
Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
|
| |
|
|
|
| |
(cherry picked from commit a049f5790e38fe1b1ba1d4c10ed5ab35150806fa)
Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
Python (GH-5756)
(cherry picked from commit 48e8c82fc63d2ddcddce8aa637a892839b551619)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
| |
|
|
|
|
|
| |
now correctly convert from bytes. (GH-5761)
(cherry picked from commit 23ad6d0d1a7a6145a01494f4f3913a63d1f0250c)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
| |
|
|
|
|
| |
The CPython runtime assumes that there is a one-to-one relationship (for a given interpreter) between PyThreadState and OS threads. Sending and receiving on a channel in the same interpreter was causing crashes because of this (specifically due to a check in PyThreadState_Swap()). The solution is to not switch threads if the interpreter is the same.
(cherry picked from commit f53d9f2778a87bdd48eb9030f782a4ebf9e7622f)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
chunk is not found (GH-5240)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 6240917b773b52f8883387b9e3a5f327a4372068)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
| |
|
|
|
| |
(cherry picked from commit 5537646bfacec463b450871dde31cb06c44a0556)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 4c7108a77144493d0aa6fc0105b67d3797e143f5)
Co-authored-by: pmp-p <pmp-p@users.noreply.github.com>
|
| |
|
|
| |
This adds C versions of methods used by ABCMeta that
improve performance of various ABC operations.
|
| | |
|
| |
|
|
|
| |
(cherry picked from commit 9f4223261fd129ad7b9a09b2b0d625d1bb90b22b)
Co-authored-by: Kyle Altendorf <sda@fstab.net>
|
| |
|
|
|
|
|
| |
(gh-5710)
(cherry picked from commit 4c6955e2b0ccf88c705f8d1fac685a8e65f9699e)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 5746510b7aef423fa4afc92b2abb919307b1dbb9)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit f0bc645dfede8118c84844bad319cd952c4d1905)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)
Co-authored-by: Oren Milman <orenmn@gmail.com>
|
| |
|
|
|
|
|
| |
The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.
(cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7)
Co-authored-by: SSE4 <tomskside@gmail.com>
|
| |
|
|
|
|
|
| |
(#5641)
(cherry picked from commit 7766b96ab80b04509bbac708ee5ecf3c1c5934fc)
Co-authored-by: Коренберг Марк <socketpair@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 3793f95f98c3112ce447288a5bf9899eb9e35423)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
| |
|
|
|
| |
Co-authored-by: Jake Davis <jcdavis@awedge.net>
(cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
fnmatch.translate() no longer produces patterns which contain set
operations.
Sets starting with '[' or containing '--', '&&', '~~' or '||' will
be interpreted differently in regular expressions in future versions.
Currently they emit warnings. fnmatch.translate() now avoids producing
patterns containing such sets by accident.
(cherry picked from commit 23cdbfa744f0ec0e9e7575d378df4cb758691cd3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
it was using our mocked listdir to check when the files were gone.
(cherry picked from commit 4ad703b7ca463d1183539277dde90ffb1c808487)
Co-authored-by: Bernhard M. Wiedemann <githubbmw@lsmod.de>
|
| |
|
|
|
| |
(cherry picked from commit 95c3262762f7d0da97ad633f40bed7cd2df9814c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
Previously the module name was used, which broke relative imports when pdb was run against a plain module or submodule.
(cherry picked from commit 38bfa8418f5d39bcc7478b8f7aef4a632c26172e)
Co-authored-by: Mario Corchero <mariocj89@gmail.com>
|
| |
|
|
|
|
| |
Fix typos found by codespell in docs, docstrings, and comments.
(cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)
Co-authored-by: Leo Arias <leo.arias@canonical.com>
|
| |
|
|
|
| |
(cherry picked from commit 4e9da0d163731caa79811c723c703ee416c31826)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.
https://bugs.python.org/issue32303
https://bugs.python.org/issue32305
(cherry picked from commit bbbcf8693b876daae4469765aa62f8924f39a7d2)
Co-authored-by: Barry Warsaw <barry@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 2f79c014931cbb23b08a7d16c534a3cc9607ae14)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 72a0d218dcc94a3cc409a9ef32dfcd5a7bbcb43c.
The reverted commit had a few issues so it was unanimously decided
to undo it. See the bpo issue for details.
(cherry picked from commit 383b32fe108ea627699cc9c644fba5f8bae95d73)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
| |
(cherry picked from commit 2efb9735899c7c642f3e75a121af82b1679577d3)
Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
|
| |
|
|
|
| |
(cherry picked from commit 3d4dbd8f019c0bbac99fc9248077044ff1039ca3)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
| |
When using customized decode error handlers, it is possible for builtin decoders
to write out-of-bounds and then crash.
|