Commit Graph

43298 Commits

Author SHA1 Message Date
Miss Islington (bot) 321f28c5f4
bpo-1529353: IDLE: squeeze large output in the shell (GH-7626)
(cherry picked from commit 604e7b9931)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-09-25 05:38:45 -07:00
Miss Islington (bot) 65cc60b368
bpo-34162: Update idlelib/NEWS.txt to 2018-9-24. (GH-9551)
(cherry picked from commit 16fba62314)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-09-24 17:23:07 -07:00
Miss Islington (bot) 7a26222d7c
bpo-34783: Add test_cmd_line_script.test_nonexisting_script() (GH-9535)
Make sure that "./python script.py" does not crash if the script
file doesn't exist.
(cherry picked from commit a46467ff19)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-09-24 08:28:23 -07:00
Miss Islington (bot) 657fdf2eba bpo-34582: Update syntax of Azure Pipelines builds (GH-9521) 2018-09-24 08:43:33 -04:00
Christian Heimes 394e55a927 [3.7] bpo-17239: Disable external entities in SAX parser (GH-9217) (GH-9511)
The SAX parser no longer processes general external entities by default
to increase security. Before, the parser created network connections
to fetch remote files or loaded local files from the file system for DTD
and entities.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue17239.
(cherry picked from commit 17b1d5d4e3)

Co-authored-by: Christian Heimes <christian@python.org>



https://bugs.python.org/issue17239
2018-09-24 05:38:37 -07:00
Miss Islington (bot) aeadf59e45
bpo-34548: IDLE: use configured theme colors in TextView (GH-9008)
https://bugs.python.org/issue34548
(cherry picked from commit c87d9f406b)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-09-23 06:31:35 -07:00
Serhiy Storchaka c73df53569
bpo-34421: Improve distutils logging for non-ASCII strings. (GH-9126) (GH-9506)
Use "backslashreplace" instead of "unicode-escape".  It is not
implementation depended and escapes only non-encodable characters.

Also simplify the code.
(cherry picked from commit 4b860fd)
2018-09-23 10:31:53 +03:00
Christian Heimes 2756ef3165 [3.7] bpo-34670: Add TLS 1.3 post handshake auth (GH-9460) (GH-9505)
Add SSLContext.post_handshake_auth and
SSLSocket.verify_client_post_handshake for TLS 1.3 post-handshake
authentication.

Signed-off-by: Christian Heimes <christian@python.org>q

https://bugs.python.org/issue34670.
(cherry picked from commit 9fb051f032)

Co-authored-by: Christian Heimes <christian@python.org>



https://bugs.python.org/issue34670
2018-09-23 00:22:52 -07:00
Miss Islington (bot) 44989bc269 bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9399)
This makes streamed zips compatible with MacOS Archive Utility and
other applications.
(cherry picked from commit 4ba3b50bfe)

Co-authored-by: Silas Sewell <silas@sewell.org>
2018-09-22 21:03:04 +03:00
Ethan Furman 0c076caaa8
[3.7] bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) (GH-9486)
* bpo-29577: allow multiple mixin classes
2018-09-21 22:26:32 -07:00
Miss Islington (bot) c00f7037df
bpo-34759: Fix error handling in ssl 'unwrap()' (GH-9468)
OpenSSL follows the convention that whenever you call a function, it
returns an error indicator value; and if this value is negative, then
you need to go look at the actual error code to see what happened.

Commit c6fd1c1c3a introduced a small mistake in
_ssl__SSLSocket_shutdown_impl: instead of checking whether the error
indicator was negative, it started checking whether the actual error
code was negative, and it turns out that the error codes are never
negative. So the effect was that 'unwrap()' lost the ability to raise
SSL errors.

https://bugs.python.org/issue34759
(cherry picked from commit c0da582b22)

Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
2018-09-21 22:00:42 -07:00
Miss Islington (bot) e5fde1f992
bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483)
We cannot simply call locale.getpreferredencoding() here,
as GDB might have been linked against a different version
of Python with a different encoding and coercion policy
with respect to PEP 538 and PEP 540.

Thanks to Victor Stinner for a hint on how to fix this.
(cherry picked from commit 7279b5125e)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2018-09-21 18:29:34 -07:00
Steve Dower a73e790c78
Fixes tests requiring extra environment values on Windows (GH-9462) 2018-09-20 14:39:21 -07:00
Miss Islington (bot) 476177005e bpo-19756: Prevent test failures due to EADDRNOTAVAIL (GH-9446)
(cherry picked from commit 8213eaddf3)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-09-20 18:23:45 +03:00
Victor Stinner 95cc3ee00c
Revert "[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by default (GH-9379)" (GH-9416)
This reverts commit 144f1e2c6f.
2018-09-19 12:01:52 -07:00
Miss Islington (bot) 1a89cb5c47 bpo-34582: Adds JUnit XML output for regression tests (GH-9210)
(cherry picked from commit d0f49d2f50)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-09-18 11:48:22 -07:00
Victor Stinner 144f1e2c6f
[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by default (GH-9379)
* bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)

_PyCoreConfig:

* Rename coerce_c_locale to _coerce_c_locale
* Rename coerce_c_locale_warn to _coerce_c_locale_warn

These fields are now private (name prefixed by "_").

(cherry picked from commit 188ebfa475)

* bpo-34589: C locale coercion off by default (GH-9073)

Py_Initialize() and Py_Main() cannot enable the C locale coercion
(PEP 538) anymore: it is always disabled. It can now only be enabled
by the Python program ("python3).

test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8
nor PYTHONCOERCECLOCALE, these variables are already set in the
parent.

(cherry picked from commit 7a0791b699)

* bpo-34589: Add -X coerce_c_locale command line option (GH-9378)

Add a new -X coerce_c_locale command line option to control C locale
coercion (PEP 538).

(cherry picked from commit dbdee0073c)
2018-09-17 18:01:39 -07:00
Miss Islington (bot) b7f58d7f80
bpo-34587, test_socket: remove RDSTest.testCongestion() (GH-9277)
The test tries to fill the receiver's socket buffer and expects an
error. But the RDS protocol doesn't require that. Moreover, the Linux
implementation of RDS expects that the producer of the messages
reduces its rate, it's not the role of the receiver to trigger an
error.

The test fails on Fedora 28 by design, so remove it.
(cherry picked from commit 7484bdfd1e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-09-17 14:27:59 -07:00
Miss Islington (bot) efdf316d23
bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683)
(cherry picked from commit 9bdb7be482)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-09-17 06:08:45 -07:00
Miss Islington (bot) 1d30788493
bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. (GH-9113)
(cherry picked from commit e0e5065dae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-09-17 05:10:56 -07:00
Miss Islington (bot) e3f6aa7fe4
bpo-34603, ctypes/libffi_msvc: Fix returning structs from functions (GH-9258)
(cherry picked from commit 7843caeb90)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-09-15 22:53:13 -07:00
Miss Islington (bot) 51dbae867e
closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950)
(cherry picked from commit 10a428b64b)

Co-authored-by: Monson Shao <holymonson@gmail.com>
2018-09-15 10:52:57 -07:00
Miss Islington (bot) c83c375ed9 bpo-32933: Implement __iter__ method on mock_open() (GH-5974)
(cherry picked from commit 2087023fde)

Co-authored-by: Tony Flury <anthony.flury@btinternet.com>
2018-09-15 00:30:04 +03:00
Miss Islington (bot) 78aa3d8f52 bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are namedtuples. (GH-9151) (GH-9304)
(cherry picked from commit 9b9d97dd13)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-09-14 13:47:14 -04:00
Miss Islington (bot) bd979b2d2b Change the xkcd link in comment over https. (GH-9293)
(cherry picked from commit 83df50ea57)

Co-authored-by: 觉 <Xdminsy@users.noreply.github.com>
2018-09-14 09:28:07 -07:00
Andrew Svetlov d0491cd7fd
[3.7] bpo-34490: Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (GH-8907) (#9286)
* [3.7] Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (GH-8907).
(cherry picked from commit 413118ebf3)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>

* Update test_events.py
2018-09-13 17:03:35 -07:00
Miss Islington (bot) 2b162941c0
bpo-31132: Remove prlimit permission test. (GH-9280)
This test is doesn't work when the test process is privledged, which is hard to detect.

https://bugs.python.org/issue34668
(cherry picked from commit 01e0afa994)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-13 15:13:55 -07:00
Miss Islington (bot) b2a6aa32f3
closes bpo-34664: Only check file permission bits of newly created directories. (GH-9273)
(cherry picked from commit 84db4a9978)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-13 12:42:26 -07:00
Miss Islington (bot) 218b4bf474
bpo-34661: Fix test skipping call. (GH-9266)
(cherry picked from commit e78734d579)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-13 11:35:18 -07:00
Miss Islington (bot) 1550b73112
closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)
(cherry picked from commit a710ebd21b)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-13 10:27:52 -07:00
Miss Islington (bot) 90f7d455b7
bpo-34200: Fix non-determinism of test_pkg (GH-9248)
This causes the tearDown code to only unimport the test modules specifically created as part of each test via the self.mkhier method rather than abusing test.support.modules_setup() and the scary test.support.modules_cleanup() code.

https://bugs.python.org/issue34200
(cherry picked from commit 4ae8ece5cd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-09-12 18:29:08 -07:00
Miss Islington (bot) ea2fcd3db6
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
(cherry picked from commit e1a34ceb54)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-12 16:54:10 -07:00
Benjamin Peterson 0aef909d63
[3.7] closes bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it supported. (GH-9236)
musl doesn't support the scheduler API, but declares stubs that alway return ENOSYS..
(cherry picked from commit c7042224b8)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-12 16:00:06 -07:00
Miss Islington (bot) b608fcd444
closes bpo-34004: Skip lock interruption tests on musl. (GH-9224)
Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX
feature. musl does not provide this feature, so some threadsignal tests fail
when Python is built against it.

There's no good way to test for musl, so we skip if we're on Linux and not using
glibc pthreads.

Also, hedge in the threading documentation about when we can provide interrupts
from lock acquisition.
(cherry picked from commit 5b10d5111d)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-12 14:10:56 -07:00
Miss Islington (bot) 329ea4ef7c
bpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752)
(cherry picked from commit 0bd1a2dcfd)

Co-authored-by: Oren Milman <orenmn@gmail.com>
2018-09-12 12:46:30 -07:00
Miss Islington (bot) d8bc7a666b
closes bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point to the "async" keyword. (GH-4175)
Previously, col_offset points to the keyword after "async".
(cherry picked from commit 90fc8980bb)

Co-authored-by: guoci <zguoci@gmail.com>
2018-09-11 15:21:11 -07:00
Miss Islington (bot) 536e45accf
closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque with a bad __new__(). (GH-3788)
(cherry picked from commit 24bd50bdcc)

Co-authored-by: Oren Milman <orenmn@gmail.com>
2018-09-11 12:08:10 -07:00
Miss Islington (bot) 9c4a63fc17 bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242) (GH-9148)
When subprocess.Popen() stdin= stdout= or stderr= handles are specified
and appear in pass_fds=, don't close the original fds after dup'ing them.

This implementation and unittest primarily came from @izbyshev (see the PR)

See also b89b52f284

This also removes the old manual p2cread, c2pwrite, and errwrite closing logic
as inheritable flags and _close_open_fds takes care of that properly today without special treatment.

This code is within child_exec() where it is the only thread so there is no
race condition between the dup and _Py_set_inheritable_async_safe call.
(cherry picked from commit ce34410b8b)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2018-09-10 21:36:20 -07:00
Miss Islington (bot) 011141f312
closes bpo-34525: Fix smtplib's authobject() documentation (GH-8965)
(cherry picked from commit 78deb7f332)

Co-authored-by: Sebastian Rittau <srittau@rittau.org>
2018-09-10 11:13:13 -07:00
orlnub123 c0d63bf73b [3.7] bpo-34282: Fix Enum._convert method shadowing members named _convert (GH-9034)
* Fix Enum._convert shadowing members named _convert
2018-09-10 09:39:48 -07:00
Miss Islington (bot) 4902017430
bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)
The recursive frame pruning code always undercounted the number of elided frames
by one. That is, in the "[Previous line repeated N more times]" message, N would
always be one too few. Near the recursive pruning cutoff, one frame could be
silently dropped. That situation is demonstrated in the OP of the bug report.

The fix is to start the identical frame counter at 1.
(cherry picked from commit d545869d08)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-10 09:00:08 -07:00
Tal Einat d53f1cabe8
[3.7] bpo-34621: fix uuid.UUID (un)pickling compatbility with older Python versions (<3.7) (GH-9133) 2018-09-10 18:47:29 +03:00
Miss Islington (bot) e9119a5de6
Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)
(cherry picked from commit 1f36bf6077)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-09-10 03:45:54 -07:00
Miss Islington (bot) 77b92b15a5
bpo-34421 avoid unicode error in distutils logging (GH-8799)
This caused installation errors in some cases on Windows.
Patch by Julien Malard.
(cherry picked from commit 0afada163c)

Co-authored-by: Julien Malard <julien.malard@mail.mcgill.ca>
2018-09-08 13:52:59 -07:00
Miss Islington (bot) 9835696ec4
bpo-34246: Use no mutable default args in smtplib (GH-8554)
Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls.
(cherry picked from commit d5fbe9b1a3)

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2018-09-07 15:29:27 -07:00
Zackery Spytz 18d7dff1bb [3.7] bpo-34594: Don't hardcode errno values in the tests. (GH-9094)
(cherry picked from commit b03c2c5190)
2018-09-07 09:17:32 -07:00
Miss Islington (bot) 2d3f2dc9f8 bpo-34542: Update test certs and keys (GH-8997) (GH-9007)
Update all test certs and keys to use future proof crypto settings:

* 3072 bit RSA keys
* SHA-256 signature

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e6dac00779)
2018-09-06 15:13:24 +02:00
Serhiy Storchaka 20a8392cec
[3.7] bpo-26544: Get rid of dependence from distutils in platform. (GH-8356). (GH-8970)
(cherry picked from commit 7d81e8f599)
2018-09-04 17:31:18 +03:00
Miss Islington (bot) 7aa3eadca2
bpo-34530: Fix distutils find_executable() (GH-9049)
distutils.spawn.find_executable() now falls back on os.defpath if the
PATH environment variable is not set.
(cherry picked from commit 39487196c8)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-09-04 05:19:13 -04:00
Miss Islington (bot) 1e921236d7 bpo-26901: Fix the Argument Clinic test suite (GH-8879) (GH-9048)
* Fix Tools/clinic/clinic_test.py: add missing
  FakeClinic.destination_buffers attribute and pass a file argument
  to Clinic().
* Rename Tools/clinic/clinic_test.py to Lib/test/test_clinic.py:
  add temporary Tools/clinic/ to sys.path to import the clinic
  module.

Co-Authored-By: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit 65fc98e7b1)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-09-04 00:24:17 +02:00
Miss Islington (bot) f6d70b8b17
Fix typo in typing.py module docstring (GH-9014)
"explicitelly" → "explicitly"
(cherry picked from commit 5265b3a98b)

Co-authored-by: Tim McNamara <code@timmcnamara.co.nz>
2018-09-01 05:15:40 -04:00
Miss Islington (bot) 89c9043ee0
bpo-34558: Add missing parentheses in _aix.py (GH-9017)
p.wait()
(cherry picked from commit 172a71f19b)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2018-08-31 22:46:32 -04:00
Miss Islington (bot) 4da71814b3
bpo-34007: Skip traceback tests if the Program Counter is not available. (GH-9018)
Sometimes some versions of the shared libraries that are part of the
traceback are compiled in optimised mode and the Program Counter (PC)
is not present, not allowing gdb to walk the frames back. When this
happens, the Python bindings of gdb raise an exception, making the
test impossible to succeed.
(cherry picked from commit f2ef51f8be)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-08-31 18:47:20 -04:00
Victor Stinner 0b9ea4b211
[3.7] bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986) (GH-8987)
* bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986)

Standard streams like sys.stdout now use the "surrogateescape" error
handler, instead of "strict", on the POSIX locale (when the C locale is not
coerced and the UTF-8 Mode is disabled).

Add tests on sys.stdout.errors with LC_ALL=POSIX.

Fix the error handler of standard streams like sys.stdout:
PYTHONIOENCODING=":" is now ignored instead of setting the error handler to
"strict".

(cherry picked from commit 315877dc36)
2018-08-29 11:01:33 +02:00
Victor Stinner 65ef7425a3
bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) (GH-8974)
* The UTF-8 Mode is now also enabled by the "POSIX" locale, not only
  by the "C" locale.
* On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also forces
  the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if
  the LC_CTYPE locale is "C".
* test_utf8_mode.test_cmd_line() checks also that the command line
  arguments are decoded from UTF-8 when the the UTF-8 Mode is enabled
  with POSIX locale or C locale.

(cherry picked from commit 5cb258950c)
2018-08-28 13:51:20 +02:00
Miss Islington (bot) e3f20828f6 bpo-34171: Fix test_trace. (GH-8940) (GH-8951)
Remove "trace.cover" left from previous test runs before testing
that it is no longer created.
(cherry picked from commit b44a1d4f71)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-08-28 11:41:43 +03:00
Miss Islington (bot) 2cf33161f7
bpo-33635: Handling Bad file descriptor in Path.is_file and related. (GH-8542)
(cherry picked from commit 216b745eaf)

Co-authored-by: Przemysław Spodymek <przemyslaw@spodymek.com>
2018-08-27 18:37:18 -04:00
Miss Islington (bot) 55b8c4bff8
Remove AIX workaround test_subprocess (GH-8939)
An old apparent AIX behavior workaround in test_subprocess's
test_undecodable_env is no longer needed.
(cherry picked from commit 89d79b1449)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2018-08-26 20:32:48 -04:00
Miss Islington (bot) 80e9fedcf5
bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (GH-8841)
(cherry picked from commit c406d5cd74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-08-25 03:47:22 -04:00
Miss Islington (bot) d5f017bbd6
bpo-13312: Avoid int underflow in time year. (GH-8912)
Avoids an integer underflow in the time module's year handling code.
(cherry picked from commit 76be0fffff)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-08-25 01:53:00 -04:00
Miss Islington (bot) 3e6020c4dd
bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)
(cherry picked from commit 91cb298f81)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-08-24 10:44:47 -04:00
Miss Islington (bot) 89b1654e0b
bpo-34454: fix .fromisoformat() methods crashing on inputs with surrogate code points (GH-8862)
The current C implementations **crash** if the input includes a surrogate
Unicode code point, which is not possible to encode in UTF-8.

Important notes:

1.  It is possible to pass a non-UTF-8 string as a separator to the
    `.isoformat()` methods.
2.  The pure-Python `datetime.fromisoformat()` implementation accepts
    strings with a surrogate as the separator.

In `datetime.fromisoformat()`, in the special case of non-UTF-8 separators,
this implementation will take a performance hit by making a copy of the
input string and replacing the separator with 'T'.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Co-authored-by: Paul Ganssle <paul@ganssle.io>
(cherry picked from commit 096329f0b2)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2018-08-23 11:54:33 -04:00
Miss Islington (bot) d1f0ccc7e6
bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835)
The missing NULL check was reported by Svace static analyzer.
(cherry picked from commit cdbf50cba1)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-20 16:42:18 -04:00
Miss Islington (bot) 2e4ae8f1b3 bpo-34415: Updated logging.Formatter docstring. (GH-8811) (GH-8817)
(cherry picked from commit d3d3171da8)
2018-08-19 08:20:13 +01:00
Miss Islington (bot) 870247a57e [3.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8789)
Read from data socket to avoid "[SSL] shutdown while in init" exception
during shutdown of the dummy server.

Signed-off-by: Christian Heimes <christian@python.org>

<!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) -->
https://bugs.python.org/issue34391
<!-- /issue-number -->
(cherry picked from commit 1590c39336)


Co-authored-by: Christian Heimes <christian@python.org>
2018-08-16 21:37:20 +02:00
Miss Islington (bot) e3228a3f44 bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8763)
Downstream vendors have started to deprecate weak keys. Update all RSA keys
and DH params to use at least 2048 bits.

Finite field DH param file use RFC 7919 values, generated with

    certtool --get-dh-params --sec-param=high

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 88bfd0bce0)

Co-authored-by: Christian Heimes <christian@python.org>
2018-08-14 16:52:27 +02:00
Miss Islington (bot) 32e58fc321
bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452)
(cherry picked from commit 4d12e4dc28)

Co-authored-by: Vadim Pushtaev <pushtaev.vm@gmail.com>
2018-08-12 20:32:44 -07:00
Miss Islington (bot) 8fc21c80af bpo-26818: Add a test to make sure the bug is fixed (GH-8664)
The main cause of this bug was fixed as part of bpo-31908.
(cherry picked from commit c8b0dbc492)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-08-11 09:28:34 +03:00
Miss Islington (bot) c614121224 bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663)
(cherry picked from commit 423d05f6f5)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-08-11 09:00:11 +03:00
Miss Islington (bot) ea8835fb30
bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678)
(cherry picked from commit 077059e0f0)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-08-09 23:43:06 -07:00
Miss Islington (bot) 5799e5a84c bpo-18540: Fix EAI_NONAME in imaplib.IMAP4*() (GH-8634)
(cherry picked from commit e4dcbbd7f4)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-08-07 05:37:38 +03:00
Miss Islington (bot) a1ff5f9031
bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567)
(cherry picked from commit 8f7bb100d0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-08-06 07:11:04 -07:00
Miss Islington (bot) 416f3435c5
bpo-19891: Ignore error while writing history file (GH-8483)
(cherry picked from commit b2499669ef)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2018-08-06 02:03:43 -07:00
Victor Stinner 0c90d6f759
[3.7] bpo-34247: Fix Python 3.7 initialization (#8659)
* -X dev: it is now possible to override the memory allocator using
  PYTHONMALLOC even if the developer mode is enabled.
* Add _Py_InitializeFromConfig()
* Add _Py_Initialize_ReadEnvVars() to set global configuration
  variables from environment variables
* Fix the code to initialize Python: Py_Initialize() now also reads
  environment variables
* _Py_InitializeCore() can now be called twice: the second call
  only replaces the configuration.
* Write unit tests on Py_Initialize() and the different ways to
  configure Python
* The isolated mode now always sets Py_IgnoreEnvironmentFlag and
  Py_NoUserSiteDirectory to 1.
* pymain_read_conf() now saves/restores the configuration
  if the encoding changed
2018-08-05 12:31:59 +02:00
Miss Islington (bot) e65ec491fb
bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683)
* make CallTip and ToolTip sub-classes of a common abstract base class
* remove ListboxToolTip (unused and ugly)
* greatly increase test coverage
* tested on Windows, Linux and macOS
(cherry picked from commit 87e59ac11e)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-08-04 23:47:28 -07:00
Miss Islington (bot) 39fcd99498 bpo-34329: Doc'd how to remove suffix of pathlib.Path() (GH-8655)
(cherry picked from commit 46dc4e34ed)

Co-authored-by: Stefan Otte <stefan.otte@gmail.com>
2018-08-04 00:45:46 +03:00
Miss Islington (bot) 28dbfb2fd3
Fix docstring of Profiler class (GH-8651)
(cherry picked from commit 2ebd3813af)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-08-03 02:30:49 -07:00
Miss Islington (bot) ffd6364745
bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639)
Some MacOS-tk combinations need .update_idletasks().
The call is both unneeded and innocuous on Linux and Windows.
Patch by Kevin Waltzer.
(cherry picked from commit 9beaef6225)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-08-02 20:39:36 -07:00
Miss Islington (bot) 50d7867789
bpo-30317: Fix multiprocessing test_timeout() (GH-8621)
Multiprocessing test_timeout() now accepts a delta of 100 ms instead
of just 50 ms, since the test failed with 135.8 ms instead of the
expected 200 ms.
(cherry picked from commit 5640d030e1)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-08-02 17:26:57 -07:00
Miss Islington (bot) 0f9df886d6 bpo-27910: Update documentation of traceback module (GH-6116)
In the documentation for the traceback module, the definitions of functions
extract_tb(), format_list() and classmethod StackSummary.from_list()
mention the old style 4-tuples that these functions used to return or accept.

Since Python 3.5, however, they return or accept a FrameSummary object
instead of a 4-tuple, or a StackSummary object instead of a list of 4-tuples.

Co-authored-by: torsava <torsava@redhat.com>
Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>

(cherry picked from commit f394ee5eaf)
2018-08-02 19:51:48 +03:00
Miss Islington (bot) 60586de02d
bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616)
(cherry picked from commit dd74369cb7)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-08-02 00:52:22 -07:00
Miss Islington (bot) d9fc795487
bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)
Added missing .grab_release() calls to all places where we call .grab_set().
(cherry picked from commit 10ea9409ce)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-08-01 23:37:50 -07:00
Miss Islington (bot) 172a81e42b [3.7] bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) (GH-8586) 2018-07-31 11:29:07 -04:00
Miss Islington (bot) 3e4b688759
bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931)
* Fix integer overflow in os.readv(), os.writev(), os.preadv()
  and os.pwritev() and in os.sendfile() with headers or trailers
  arguments (on BSD-based OSes and MacOS).

* Fix sending the part of the file in os.sendfile() on MacOS.
  Using the trailers argument could cause sending more bytes from
  the input file than was specified.

Thanks Ned Deily for testing on 32-bit MacOS.
(cherry picked from commit 9d5727326a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-31 02:20:06 -07:00
Serhiy Storchaka 47957dab94
[3.7] bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346) (GH-8581)
* help(hashlib) didn't work because of incorrect module name in blake2b and
  blake2s classes.
* Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly
  accepted keyword argument "string" for binary data, but documented as
  accepting the "data" keyword argument. Now this parameter is positional-only.
* Keyword-only parameters in blake2b() and blake2s() were not documented as
  keyword-only.
* Default value for some parameters of blake2b() and blake2s() was None,
  which is not acceptable value.
* The length argument for shake_*.digest() was wrapped out to 32 bits.
* The argument for shake_128.digest() and shake_128.hexdigest() was not
  positional-only as intended.
* TypeError messages for incorrect arguments in all constructors sha3_*(),
  shake_*() and keccak_*() incorrectly referred to sha3_224.

Also made the following enhancements:

* More accurately specified input and result types for strings, bytes and
  bytes-like objects.
* Unified positional parameter names for update() and constructors.
* Improved formatting.
(cherry picked from commit f1d36d8efa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-31 10:22:44 +03:00
Miss Islington (bot) 9ecbe3321f
Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (GH-8241)
This reverts commit af810b35b4.

This is not valid syntax (see bpo-32012).
(cherry picked from commit 4b8a7f51da)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-30 23:52:49 -07:00
Miss Islington (bot) d5c75be555
bpo-33833: Fix ProactorSocketTransport AssertionError (GH-7893)
(cherry picked from commit 9045199c5a)

Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
2018-07-30 13:04:30 -07:00
Miss Islington (bot) ad4f64d58c
bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527)
(cherry picked from commit 3f8c6913b8)

Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
2018-07-29 12:57:21 -07:00
Miss Islington (bot) 990de2f4ca
bpo-34182: Fix test_pydoc running as a script. (GH-8389)
(cherry picked from commit 4e11c461ed)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2018-07-29 12:50:33 -07:00
Miss Islington (bot) 5753b13cb9
bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544)
(cherry picked from commit d2e902e4fb)

Co-authored-by: Franz Wöllert <franz.woellert@gmail.com>
2018-07-29 08:42:18 -07:00
Miss Islington (bot) 1e98d87961
bpo-34251: Restore msilib.Win64 to preserve compatibility (GH-8510)
(cherry picked from commit 11eb1a9470)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-07-28 17:14:44 -07:00
Miss Islington (bot) 2be0124b82
bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484)
(cherry picked from commit 8fe9eed937)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-07-28 08:41:26 -07:00
Steve Dower 3cc505e950
bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) 2018-07-26 17:17:02 +01:00
Miss Islington (bot) 89352b08aa bpo-32663 Make SMTPUTF8SimTests run (GH-5314) (#8471)
Enable and fix SMTPUTF8SimTests in test_smtplib.

The tests for SMTPUTF8SimTests in test_smtplib.py were not actually
being run because test_smtplib was still using the 'test_main' pattern,
and the class was never added to test_main.

Additionally, one of the tests needed to be moved to the non-UTF8 server
class because it relies on the server not being UTF-8 compatible (and it
had a bug in in).
(cherry picked from commit 48ed88a93b)

Co-authored-by: chason <chason@gmail.com>
2018-07-26 09:58:16 -04:00
Miss Islington (bot) 973649342c bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) (GH-8466)
On Windows, passing a negative value to local results in an OSError because localtime_s on Windows does not support negative timestamps. Unfortunately this means that fold detection for timestamps between 0 and max_fold_seconds will result in this OSError since we subtract max_fold_seconds from the timestamp to detect a fold. However, since we know there haven't been any folds in the interval [0, max_fold_seconds) in any timezone, we can hackily just forego fold detection for this time range on Windows.
(cherry picked from commit 96d1e69a12)

Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
2018-07-25 16:34:09 -04:00
Miss Islington (bot) 23a3297ff1 [3.7] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8365)
(cherry picked from commit 06ca3f0c09)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 15:05:57 +03:00
Miss Islington (bot) 0b27169183 bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8435)
Now base64.Error is always raised instead of UnboundLocalError or
OverflowError.
(cherry picked from commit ac0b3c2f4d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 13:53:39 +03:00
Miss Islington (bot) 220afffb68 bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8423)
(cherry picked from commit aba24ff360)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 01:41:26 +03:00
Miss Islington (bot) 519fc551d7 bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) (GH-8422)
(cherry picked from commit db8e3a1e44)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 01:02:00 +03:00
Miss Islington (bot) 635338248f bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) (GH-8421)
(cherry picked from commit 3fe5cccb08)
2018-07-24 00:25:11 +03:00