Commit Graph

101274 Commits

Author SHA1 Message Date
Miss Islington (bot) 1487c37e7e
bpo-33378: Add Korean to the language switcher. (GH-6627)
(cherry picked from commit 5779483299)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-04-28 13:23:45 -07:00
Miss Islington (bot) b94d7396b6
Change "non-local state" to "content-local state". (GH-6617)
The wording here seems wrong, as per https://bugs.python.org/msg315792
(cherry picked from commit e022bbc169)

Co-authored-by: Tom Christie <tom@tomchristie.com>
2018-04-27 15:57:59 -07:00
Zsolt Dollenstein a93a663d6c [3.7] bpo-33363: raise SyntaxError for async for/with outside async functions (GH-6616). (GH-6619) 2018-04-27 18:33:37 -04:00
Miss Islington (bot) dd3ede7537
bpo-33358: Fix test_embed.test_pre_initialization_sys_options (GH-6612)
Fix test_embed.test_pre_initialization_sys_options() when building with --enable-shared
(cherry picked from commit 4114846265)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-04-27 05:41:25 -07:00
Miss Islington (bot) 291c9d4f74
bpo-33330: Improve error handling in PyImport_Cleanup(). (GH-6564)
(cherry picked from commit e9d9494d6b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-25 11:32:52 -07:00
Miss Islington (bot) 53d36cc961
bpo-33280: Reorganize external Tcl/Tk references. (GH-6473)
(cherry picked from commit 67a8f4fed3)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
2018-04-25 11:30:58 -07:00
Miss Islington (bot) 6a1799e6f0 bpo-33314: Fix rendering issues in the documentation for the os module (GH-6525) (GH-6597)
(cherry picked from commit d6ef6db9ff)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-04-25 21:30:43 +03:00
Miss Islington (bot) 1985849fe2
Mention both relevant PEPs in function annotations tutorial (GH-6304)
Patch by Neeraj Badlani.
(cherry picked from commit 643ff711fa)

Co-authored-by: Neeraj Badlani <neerajbadlani@gmail.com>
2018-04-25 11:04:49 -07:00
Miss Islington (bot) 52a5a17338
bpo-33128 Fix duplicated call to importlib._install_external_importers (GH-6273)
External importers were being added in both phases of the import
system initialisation.

They're only supposed to be added in the second phase, after the
import machinery has been appropriately configured.
(cherry picked from commit 0977091dca)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-04-24 19:48:04 -07:00
Miss Islington (bot) 75a3e3d5bc bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (GH-6579)
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 25038ecfb6)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2018-04-23 21:42:26 +02:00
Miss Islington (bot) 9fc998d761 bpo-991266: Fix quoting of Comment attribute of SimpleCookie (GH-6555)
(cherry picked from commit d5a2377c3d)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-04-23 03:58:23 +03:00
Miss Islington (bot) f9005030fe
bpo-33297: Mention Pillow to work with more image formats. (GH-6505)
Also update PIL doc references to Pillow.
(cherry picked from commit b81ca28b37)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
2018-04-21 06:03:49 -07:00
Miss Islington (bot) 3e0d23cd43
Clarify that __path__ can't be just any value (GH-6554)
(cherry picked from commit 441d945eb3)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
2018-04-20 16:45:14 -07:00
Miss Islington (bot) 32955299b4
Spelling fixes to docs, docstrings, and comments (GH-6374)
(cherry picked from commit 61f82e0e33)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2018-04-20 14:00:41 -07:00
Miss Islington (bot) b221107d32
bpo-33131: Upgrade ensurepip to bundle pip 10.0.1 (GH-6546)
Upgrade ensurepip to bundle pip 10.0.1
(cherry picked from commit 0399cf9b5e)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2018-04-20 13:47:44 -07:00
Miss Islington (bot) 11659d00b9 bpo-33312: update Tools/gdb/libpython.py to match. (GH-6549)
(cherry picked from commit 53f67d401d)
2018-04-20 13:02:30 -07:00
Miss Islington (bot) 392520bd78 bpo-33312: Fix clang ubsan out of bounds warnings in dict. (GH-6537) (GH-6543)
Fix clang ubsan (undefined behavior sanitizer) warnings in dictobject.c by
adjusting how the internal struct _dictkeysobject shared keys structure is
declared.

This remains ABI compatible.  We get rid of the union at the end of the
struct being used for conveinence to avoid typecasting in favor of char[]
variable length array at the end of a struct. This is known to clang to be
used for variable sized objects and will not cause an undefined behavior
problem.  Similarly, char arrays do not have strict aliasing undefined
behavior when cast.

PEP-007 does not currently list variable length arrays (VLAs) as allowed
in our subset of C99.  If this turns out to be a problem, the fix to this is
to change the char `dk_indices[]` into `dk_indices[1]` and restore the
three size computation subtractions this change removes:
  `- Py_MEMBER_SIZE(PyDictKeysObject, dk_indices)`

If this works as is I'll make a separate PR to update PEP-007.
(cherry picked from commit 397f1b28c4)
2018-04-20 10:06:21 -07:00
Miss Islington (bot) 18cd82815b
bpo-32232: by default, Setup modules are no longer built with -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 063db62aab)

Co-authored-by: xdegaye <xdegaye@gmail.com>
2018-04-20 08:39:18 -07:00
Miss Islington (bot) dc654c53e5 Clean up the readme text around PGO a bit. (GH-6538) (GH-6539)
(cherry picked from commit b87c1c92fc)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-04-19 09:14:36 -07:00
Miss Islington (bot) a4fb580f70
bpo-33189: pygettext.py now accepts only literal strings (GH-6364)
as docstrings and translatable strings, and rejects
bytes literals and f-string expressions.
(cherry picked from commit 69524821a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-18 23:49:15 -07:00
Miss Islington (bot) 198c0c0509
Update What's new in 3.7 to reference preadv, pwritev and posix_spawn (GH-6524)
(cherry picked from commit 9009f3e389)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-04-18 22:26:41 -07:00
Miss Islington (bot) b27c71cdc0
bpo-33308: Fix a crash in the parser module when convert an ST object. (GH-6519)
Converting with line_info=False and col_info=True crashed before.
(cherry picked from commit e5362eaa75)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-18 22:10:36 -07:00
Miss Islington (bot) 67067d85eb bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) (#6528)
(cherry picked from commit e3a523a0fa)

Co-authored-by: Denis Osipov <osipov_d@list.ru>
2018-04-18 17:15:09 -07:00
Miss Islington (bot) b88f73749d
bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479)
(cherry picked from commit 4b685bf719)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
2018-04-18 11:16:46 -07:00
Miss Islington (bot) 3b3be1fe10
bpo-11594: Ensure line-endings are respected when using 2to3 (GH-6483)
(cherry picked from commit c127a86e18)

Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
2018-04-17 14:58:34 -07:00
Miss Islington (bot) 902bb62d5a
bpo-33205: dict: Change GROWTH_RATE to `used*3` (GH-6350)
(cherry picked from commit 5fbc511f56)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-04-17 10:17:19 -07:00
Miss Islington (bot) ed1265526f Fix spelling typo (GH-6443) (GH-6507)
(cherry picked from commit 28e8b66d6c)

Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
2018-04-17 11:40:48 -04:00
Miss Islington (bot) f7379ddf1c bpo-33295: Skip test using missing external site (GH-6504) (GH-6509)
`test_urllib2net.OtherNetworkTests.test_sites_no_connection_close`
used `http://www.imdb.com/` but it is moved to https so the test is
not valid anymore.  Skip test for the moment to allow CI to proceed.
(cherry picked from commit 36d56ea826)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-04-17 11:33:48 -04:00
Miss Islington (bot) 7899153c1f
fix pydoc-topics to work with Sphinx 1.7 (GH-6475)
In fact, we now require a newer Sphinx version because APIs have moved around.
(cherry picked from commit acfb087f9f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-04-16 23:32:43 -07:00
Miss Islington (bot) 3b4e756b43 Revert 725476222a (GH-6494) (GH-6495)
This note in documentation was never true.
(cherry picked from commit a00d440edb)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2018-04-16 20:35:06 -07:00
Miss Islington (bot) 237148ecc0 acks += Zsolt Dollenstein (GH-6490) (GH-6492)
(cherry picked from commit 2bea947628)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2018-04-16 17:26:25 -07:00
Miss Islington (bot) dd6bdf610b Add support for all string literals to lib2to3 (GH-6457) (GH-6488)
(cherry picked from commit 8f37e84664)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2018-04-16 15:16:57 -07:00
Miss Islington (bot) 3bcca488fe
bpo-31947: remove None default for names param in Enum._create_ (GH-4288)
(cherry picked from commit b8e21f1289)

Co-authored-by: anentropic <ego@anentropic.com>
2018-04-16 13:49:34 -07:00
Miss Islington (bot) f20eca7c3f
Remove to-be-deprecated urllib.request.urlretrieve function reference (GH-6454)
(cherry picked from commit c89b221758)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
2018-04-16 07:16:20 -07:00
Miss Islington (bot) 986eaa86da
bpo-33185: Improve wording and markup (GH-6477)
Adds some working and markup fixes that I missed
in the initial commit for this issue.

(Follow-up to GH-6419)
(cherry picked from commit 1a5c4bdb6e)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-04-15 06:55:10 -07:00
Miss Islington (bot) d7ffa58207
bpo-33185: Fix regression in pydoc CLI sys.path handling (GH-6419)
The pydoc CLI assumed -m pydoc would add the empty string
to sys.path, and hence got confused when it switched to
adding the full initial working directory instead.

This refactors the pydoc CLI path manipulation to be
more testable, and ensures it won't accidentally
remove the standard library directory containing
pydoc itself from sys.path.
(cherry picked from commit 82a9481059)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-04-15 05:17:13 -07:00
Miss Islington (bot) df958ff28a
bpo-33184: Update Windows installer to OpenSSL 1.1.0h (GH-6463)
(cherry picked from commit b1dc07509f)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-04-13 17:52:02 -07:00
Ethan Furman 3715176557
[3.7] bpo-33217: deprecate non-Enum lookups in Enums (GH-6392)
deprecate non-Enum lookups in Enums

Lookups such as `1 in Color` and `2 in SomeFlag()` will raise TypeError
in 3.8+.
2018-04-11 18:56:25 -07:00
Miss Islington (bot) cbbf746186
Fix error messages in argparse examples (GH-6435)
The examples in argparse documentation use `error: too few arguments`
error message which was removed in this commit f97c59a in 2011.
(cherry picked from commit 04e8293465)

Co-authored-by: suic86 <marko.gabriel.cz@gmail.com>
2018-04-11 11:58:09 -07:00
Miss Islington (bot) 4dc3c8ff14
bpo-33260: Regenerate token.py after removing ASYNC and AWAIT. (GH-6447)
(cherry picked from commit d08972fdb9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-11 10:07:23 -07:00
Miss Islington (bot) b26265900a bpo-33097: Fix submit accepting callable after executor shutdown by interpreter exit (GH-6144) (GH-6445)
Executors in concurrent.futures accepted tasks after executor was shutdown by interpreter exit. Tasks were left in PENDING state forever. This fix changes submit to instead raise a RuntimeError.
(cherry picked from commit c4b695f85e)

Co-authored-by: Mark Nemec <mrknmc@me.com>
2018-04-10 20:35:02 +02:00
Miss Islington (bot) 9bb8cebdce
bpo-33253: Fix xxsubtype.bench() to accept correct str signature. (GH-6439)
(cherry picked from commit f178028f37)

Co-authored-by: Devon R <Gorialis@users.noreply.github.com>
2018-04-09 23:00:57 -07:00
Miss Islington (bot) 71a3837bf3 [3.7] bpo-31201: Clarify command to re-run failing test(s) with example (GH-6417) (GH-6437)
(cherry picked from commit 0f914b5b5f)

Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
2018-04-09 17:17:20 -04:00
Serhiy Storchaka b0f387d7ca
[3.7] bpo-33031: Remove dead code in C implementation of OrderedDict. (GH-6120) (GH-6433)
This code doesn't have effect on the final result, but causes
GCC 8 warnings and can have an undefined behavior.
(cherry picked from commit 827d49f3cf)
2018-04-09 21:46:41 +03:00
Miss Islington (bot) 9b25bd6e26
bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script. (GH-6259)
Based on patch by Oleg Krasnikov.
(cherry picked from commit c93938b5be)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-09 10:57:52 -07:00
Miss Islington (bot) 558e7e42be
Fix misleading docsting of shelve.open(). (GH-6427)
The protocol parameter can be any protocol supported by the
pickle module.
(cherry picked from commit 2ef65f346a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-09 07:57:31 -07:00
Miss Islington (bot) b571958f54
Improve highlighting of some code blocks. (GH-6401)
(cherry picked from commit 46936d5a71)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-04-09 07:56:44 -07:00
Miss Islington (bot) d964f51f81
Update docstring of tempfile._RandomNameSequence (GH-6414)
When bpo-12015 got resolved by increasing the length of the
random string generated by _RandomNameSequence from six to eight
characters, the docstring of the class was not adjusted accordingly.
(cherry picked from commit 9c463ec88b)

Co-authored-by: Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de>
2018-04-08 18:01:54 -07:00
Miss Islington (bot) 8a72266eca Add a prepend() recipe to teach a chain() idiom (GH-6415) (GH-6421)
(cherry picked from commit 9265dd72e5)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-04-08 14:37:30 -07:00
Miss Islington (bot) 31f1b52f1f bpo-33201: Modernize "Extension types" doc (GH-6337) (GH-6411)
* bpo-33201: Modernize "Extension types" doc
* Split tutorial and other topics
* Some small fixes
* Address some review comments
* Rename noddy* to custom* and shoddy to sublist
* Fix markup
(cherry picked from commit 1d80a56173)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2018-04-07 18:27:05 +02:00