Commit Graph

101898 Commits

Author SHA1 Message Date
Benjamin Peterson cadb66e173
[3.7] closes bpo-25041: Document AF_PACKET socket address format. (GH-9207)
(cherry picked from commit 731ff68eee)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-09-11 18:46:36 -07:00
Miss Islington (bot) 01ce535ba9
Delete old expat comment. (GH-9197)
(cherry picked from commit b9bf9d025e)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-11 18:04:33 -07:00
Miss Islington (bot) 4007e4e207
Make sure the line comes from the same node as the col offset. (GH-9189)
Followup to 90fc8980bb.

<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.

GH- Pull Request title

It should be in the following format:

```
bpo-NNNN: Summary of the changes made
```

Where: bpo-NNNN refers to the issue number in the https://bugs.python.org.

Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.

GH- Backport Pull Request title

If this is a backport PR (PR made against branches other than `master`),
please ensure that the PR title is in the following format:

```
[X.Y] <title from the original PR> (GH-NNNN)
```

Where: [X.Y] is the branch name, e.g. [3.6].

GH-NNNN refers to the PR number from `master`.

-->
(cherry picked from commit d13e59c1b5)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-11 16:32:52 -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) e2b40f4ce9
bpo-34365: Update date object documentation (GH-8814)
Python 3.x does not fall back to comparing object addresses when comparing two `dt` objects.

<!-- issue-number: [bpo-34365](https://www.bugs.python.org/issue34365) -->
https://bugs.python.org/issue34365
<!-- /issue-number -->
(cherry picked from commit 9c223794c7)

Co-authored-by: Danish Prakash <grafitykoncept@gmail.com>
2018-09-11 14:24:53 -07:00
Steve Dower d289df13d3
Update VSTS to Azure DevOps and simplify dependencies (GH-9168) 2018-09-11 14:01:13 -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) e02ca4270e
bpo-34613: document the correct value of limit argument of asyncio.StreamReader (GH-9121)
The default value of asyncio.StreamReader *limit* is `_DEFAULT_LIMIT` instead of `None`.

<!-- issue-number: [bpo-34613](https://www.bugs.python.org/issue34613) -->
https://bugs.python.org/issue34613
<!-- /issue-number -->
(cherry picked from commit b4ec36200a)

Co-authored-by: Bram <cortex@worlddomination.be>
2018-09-11 11:59:29 -07:00
Miss Islington (bot) 3e648f8371
bpo-28617 Fixed docs inaccuracies about the types that support membership tests (GH-9086)
<!-- issue-number: [bpo-28617](https://www.bugs.python.org/issue28617) -->
https://bugs.python.org/issue28617
<!-- /issue-number -->
(cherry picked from commit 08bcf647d8)

Co-authored-by: wim glenn <wim.glenn@gmail.com>
2018-09-11 11:13:33 -07:00
Miss Islington (bot) 3235fac0d7 bpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds (GH-9166) (GH-9167)
(cherry picked from commit 3102e24d83)

Co-authored-by: Ned Deily <nad@python.org>
2018-09-11 09:07:11 -07:00
Miss Islington (bot) c9ece5f4a9
closes bpo-33883: Mention type checkers in the FAQ. (GH-7760)
(cherry picked from commit a378254186)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-09-10 22:27:00 -07:00
Miss Islington (bot) 2bc4eea8f6
bpo-34625: Update vendorized expat version to 2.2.6. (GH-9150)
(cherry picked from commit 5033aa77aa)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-10 21:55:27 -07:00
Miss Islington (bot) 2110f78d92
bpo-33032: Mention the implicit cache in struct.Struct() docs (GH-7700)
Mention the implicit cache in struct.Struct() docs.

Consistent with the re.compile documentation note.
(cherry picked from commit 3666b3c1f6)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-09-10 21:50:41 -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) 6df2005b39 Fix missing line from example shell session (GH-9143) (GH-9155)
(cherry picked from commit 2064bb6d57)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-09-10 19:13:02 -07:00
Miss Islington (bot) 037582eb7f
bpo-33460: remove ellipsis that look like continuation prompts (GH-7851)
Remove ellipsis that look like continuation prompts,
has a side benefit of putting rest of error message in proper text color.
(cherry picked from commit f019579828)

Co-authored-by: Lew Kurtz <37632626+lew18@users.noreply.github.com>
2018-09-10 18:49:39 -07:00
Miss Islington (bot) f3d00ae3be
switch descriptor howto to return value annotation (GH-7796)
(cherry picked from commit 28ea4c2847)

Co-authored-by: NotAFile <notafile@gmail.com>
2018-09-10 17:44:58 -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
Benjamin Peterson 4d5d219a7a
[3.7] Fix misleading mentions of tp_size in comments. (GH-9136)
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize..
(cherry picked from commit 0e0bc4e221)

Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
2018-09-10 10:22:55 -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) 9c9ac9e697
Revert "Fix misindented yaml in logging how to example (GH-8604)" (GH-9081)
This reverts commit 10b59f1b01.
(cherry picked from commit 290a60bd8a)

Co-authored-by: Rémy HUBSCHER <hubscher.remy@gmail.com>
2018-09-10 02:13:18 -07:00
William Grzybowski 7a633ed79c [3.7] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9104)
Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit 28658485a5)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
2018-09-09 13:27:31 +02: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
Miss Islington (bot) 7399407725
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
(cherry picked from commit 4e519377b1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-09-07 15:15:30 -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) 854b740910 Doc: Missing 'f' in an f-string. (GH-9074) (GH-9095)
(cherry picked from commit 25fa141487)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-09-07 11:59:00 +02:00
Miss Islington (bot) f862f3abae
bpo-25750: fix refcounts in type_getattro() (GH-6118)
When calling tp_descr_get(self, obj, type), make sure that
we own a strong reference to "self".
(cherry picked from commit 8f735485ac)

Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
2018-09-07 00:50:35 -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
Miss Islington (bot) 5b17d7fccd
closes bpo-34581 : Conditionalize use of __pragma in Modules/socketmodule.c. (GH-9067)
(cherry picked from commit 874809ea38)

Co-authored-by: Erik Janssens <erik.janssens@conceptive.be>
2018-09-04 23:45:03 -07:00
Miss Islington (bot) e8ca8806a9 bpo-34563: Fix for invalid assert on big output of multiprocessing.Process (GH-9027) (GH-9064)
Fix for invalid assert on big output of multiprocessing.Process.
(cherry picked from commit 266f4904a2)

Co-authored-by: Alexander Buchkovsky <olex.buchkovsky@gmail.com>
2018-09-04 21:39:54 +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
Victor Stinner 84b0129b5e
_Py_CoerceLegacyLocale() restores LC_CTYPE on fail (GH-9044) (GH-9046)
bpo-34544: If _Py_CoerceLegacyLocale() fails to coerce the C locale,
restore the LC_CTYPE locale to the its previous value.

(cherry picked from commit 8ea09110d4)
2018-09-03 22:17:07 +02:00
Miss Islington (bot) f4c865eda8
Fix struct sequence glossary entry grammar (GH-9030)
... by removing a superfluous "either".

Reported by Никита Люшненко on docs@.
(cherry picked from commit 98b976a2f8)

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2018-09-01 22:13:34 -04:00
Miss Islington (bot) 4c532da120
closes bpo-34555: Fix incorrectly nested test for HAVE_LINUX_VM_SOCKETS_H (GH-9016)
(cherry picked from commit 2d7102e726)

Co-authored-by: Thomas Herzog <thomas@mcduke.net>
2018-09-01 18:30:44 -04: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
Miss Islington (bot) 5df3658f2d
bpo-34062: Add missing launcher argument and make behavior consistent between short and long arguments (GH-8827)
Added previously missing "--list" argument.
Made "--list" and "--list-paths" behavior consistent with the corresponding "-0" and "-0p" arguments.
(cherry picked from commit aada63b20e)

Co-authored-by: Brendan Gerrity <brerrity@gmail.com>
2018-08-31 11:32:22 -04:00
Steve Dower 9668d4e6af
Add VSTS status badge to readme (GH-8958) 2018-08-31 08:17:36 -07: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 98c49c6ab2
bpo-34485: Fix _Py_InitializeCore() for C locale coercion (GH-8979) (GH-8981)
* _Py_InitializeCore() now sets the LC_CTYPE locale to the user
  preferred locale before checking if the C locale should be coerced
  or not in _PyCoreConfig_Read().
* Fix pymain_read_conf(): remember if the C locale has been coerced
  when the configuration should be read again if the encoding has
  changed.

(cherry picked from commit 2c8ddcf4f1)
2018-08-29 01:13:29 +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