Commit Graph

21334 Commits

Author SHA1 Message Date
Miss Islington (bot) 77fa7835da
bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). (GH-6332)
(cherry picked from commit ef347535f2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-01 07:18:44 -07:00
Miss Islington (bot) 2e5fa38c5a
bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467)
(cherry picked from commit 3ab9365dca)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
2018-04-30 12:30:26 -07:00
Miss Islington (bot) cebce2e8d1
bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223)
(cherry picked from commit 9f3535c9cd)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2018-04-29 12:09:34 -07:00
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
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) 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) 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) 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) 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) 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
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) 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) 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
Miss Islington (bot) 98e8ac8d82 [3.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) (GH-6404)
(cherry picked from commit ef5ce884a4)

Co-authored-by: Jay Crotts <crotts.jay@gmail.com>
2018-04-06 22:00:06 -04:00
Brett Cannon a09bb87c1e
[3.7] bpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating caches (GH-6402) (GH-6403)
An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
(cherry picked from commit 9e2be60634)
2018-04-06 17:02:18 -07:00
Miss Islington (bot) 252f10cbac fixed capitalization of class name (GH-6396) (GH-6397)
(cherry picked from commit 1d87c7b80b)

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2018-04-06 08:46:05 -04:00
Miss Islington (bot) b8fc2d6580
bpo-33195: Doc: Deprecate Py_UNICODE in c-api/arg (GH-6329)
Py_UNICODE is deprecated since Python 3.3.
But the deprecation is missed in the c-api/arg document.
(cherry picked from commit 42ec190761)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-04-03 22:13:38 -07:00
Miss Islington (bot) 9216dffbc8
bpo-32337: Update documentats about dict order (GH-4973)
(cherry picked from commit dfbbbf16f9)

Co-authored-by: hui shang <shangdahao@gmail.com>
2018-04-03 22:01:46 -07:00
Miss Islington (bot) 0c533573c5
bpo-32360: Remove object_pairs_hook=OrderedDict examples (GH-5001)
(cherry picked from commit 629338f140)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-04-02 21:31:27 -07:00
Miss Islington (bot) f6d1d65803
closes bpo-33202: fix os.walk mentioning os.listdir instead of os.scandir (GH-6335)
(cherry picked from commit badb894bbb)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
2018-04-02 20:33:38 -07:00
Miss Islington (bot) ab84572321
bpo-20104: Add os.posix_spawn documentation. (GH-6334)
(cherry picked from commit 79760ed256)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-04-01 12:13:37 -07:00
Miss Islington (bot) 7dcfd6c663
Fix socket type in DatagramHandler documentation: TCP -> UDP (GH-6272)
(cherry picked from commit 233de021d9)

Co-authored-by: Mike DePalatis <mike@depalatis.net>
2018-03-30 00:48:45 -07:00
Miss Islington (bot) a470b7462d Fix typos '.::' should typically just be '::'. (GH-6165) (GH-6300)
(cherry picked from commit 78553138be)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-03-29 04:34:44 -04:00
Miss Islington (bot) a48614bee5 FIX documentation and NEWS of ThreadedHTTPServer. (GH-6207) (GH-6302)
(cherry picked from commit 79c3bab35c)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-03-29 04:33:47 -04:00
Serhiy Storchaka fd93666c8a
[3.7] Fix duplicating words words. (GH-6296) (GH-6297)
Most of them have been added in 3.7.
(cherry picked from commit bac2d5ba30)
2018-03-28 23:05:24 +03:00
Miss Islington (bot) 6124d8ec0d bpo-33126: Document PyBuffer_ToContiguous() (GH-6292) (GH-6294)
(cherry picked from commit aa50bf08e6)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2018-03-28 17:50:24 +02:00
Miss Islington (bot) 6cb556ffa6
s/the the/the/ (GH-6287)
(cherry picked from commit 40a536be53)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-03-28 06:23:32 -07:00
Miss Islington (bot) 211c0dbc6a Fix senfile typo (GH-6265) (#6274)
* Also in docs
(cherry picked from commit 65a34709f6)

Co-authored-by: Sam Dunster <me@sdunster.com>
2018-03-27 18:34:15 -07:00
Miss Islington (bot) f328caf4ca bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (#GH-6266)
(cherry picked from commit da1734c58d)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-03-26 19:23:34 -07:00
Miss Islington (bot) d01a805a38
Corrected link targets in collections.rst (GH-1052)
(cherry picked from commit e105294708)

Co-authored-by: Michael Seifert <michaelseifert04@yahoo.de>
2018-03-26 05:52:35 -07:00
Miss Islington (bot) 7aef29779f
Fix description about SimpleXMLRPCServer constructor parameter bind_and_activate. (GH-776)
Passing True as the `bind_and_activate` *do* immediately opening and binding to their socket.
(cherry picked from commit e6223579c8)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
2018-03-26 05:09:23 -07:00
Miss Islington (bot) bc3e009f65
Clarify fd inheritance when close_fds=False. (GH-6240)
Clarify the subprocess documentation.
(cherry picked from commit dfb6e54dd8)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-03-25 10:40:38 -07:00
Nick Coghlan ee3784594b
bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.

(cherry picked from commit d5d9e02dd3)
2018-03-25 23:43:50 +10:00
Miss Islington (bot) c6d94c37f4
bpo-33042: Fix pre-initialization sys module configuration (GH-6157)
- new test case for pre-initialization of sys.warnoptions and sys._xoptions
- restored ability to call these APIs prior to Py_Initialize
- updated the docs for the affected APIs to make it clear they can be
  called before Py_Initialize
- also enhanced the existing embedding test cases
  to check for expected settings in the sys module
(cherry picked from commit bc77eff8b9)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-03-25 04:27:57 -07:00
Miss Islington (bot) 45738ede5a
bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)
(cherry picked from commit 5cbb84106e)

Co-authored-by: Himanshu Lakhara <himanshulakhara1947@gmail.com>
2018-03-23 14:41:26 -07:00
Miss Islington (bot) f8d2c3cf5f
bpo-31639: Use threads in http.server module. (GH-5018)
(cherry picked from commit 8bcfa02e4b)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-03-23 13:31:20 -07:00
Miss Islington (bot) 67d3f8b85a Fix a reference to the MRE book in re docs (GH-1113)
Reported by Maksym Nikulyak on docs.p.o.
(cherry picked from commit a0a42d22d8)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-03-23 18:55:26 +03:00
Miss Islington (bot) 3326c9267f
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
The result of host() was not empty when the network is constructed by a tuple containing an
integer mask and only 1 bit left for addresses.
(cherry picked from commit 10b134a07c)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2018-03-20 18:22:23 -07:00
Miss Islington (bot) a323eee4c4
bpo-18802: Add more details to ipaddress documentation (GH-6083)
Original patch by Jon Foster and Berker Peksag.
(cherry picked from commit 5609b78392)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-03-20 17:30:43 -07:00
Miss Islington (bot) a70b8f5936
bpo-28247: Document Windows executable creation in zipapp (GH-6158)
(cherry picked from commit 4be79f2946)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-03-20 15:44:21 -07:00
Miss Islington (bot) 136905fffd
bpo-32374: m_traverse may be called with m_state=NULL (GH-5140)
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 c2b0b12d1a)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
2018-03-16 23:03:56 -07:00
Ned Deily d461ed84b5
bpo-29719: Remove Date and Release field in whatsnew/3.7 (GH-6094) 2018-03-12 21:16:54 -04:00
Miss Islington (bot) ee28cd57df
Fix docs markup for asyncio current_task() and all_tasks() (GH-6089)
(cherry picked from commit b21505e710)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-03-12 12:12:05 -07:00
Miss Islington (bot) 720a4b69c6
bpo-32996: Improve What's New in 3.7. (GH-5983)
(cherry picked from commit 51302a5fcc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-10 22:29:30 -08:00
Miss Islington (bot) 17b6c19d39 bpo-33045: Fix typos in SSL documentation (GH-6065)
(cherry picked from commit 9cf8c42f32)

Co-authored-by: Matt Eaton <agnosticdev@gmail.com>
2018-03-11 04:21:27 +03:00
Miss Islington (bot) 3ca5efcef5
controlflow: Use full example for "5 through 9" (GH-5907)
Replace example result of "5 through 9" with complete list: "5, 6, 7, 8, 9".
This format is more consistent with the surrounding examples.
(cherry picked from commit 83d7062d2d)

Co-authored-by: Steven M. Vascellaro <S.Vascellaro@gmail.com>
2018-03-10 15:25:14 -08:00
Miss Islington (bot) e8a5a92037 bpo-27645: Add support for native backup facility of SQLite (GH-4238)
(cherry picked from commit d7aed4102d)

Co-authored-by: Emanuele Gaifas <lelegaifax@gmail.com>
2018-03-11 01:29:19 +03:00
Miss Islington (bot) 89090789de
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)
(cherry picked from commit 496431ffb6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-10 07:49:24 -08:00
Miss Islington (bot) f34e0d60e2 bpo-26701: Add documentation for __trunc__ (GH-6049)
`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
(cherry picked from commit 308eab979d)

Co-authored-by: Eric Appelt <eric.appelt@gmail.com>
2018-03-11 01:10:32 +10:00
Miss Islington (bot) 6826589415 Warn that dbm.dumb.open() can crash Python (GH-6047) (GH-6048)
(cherry picked from commit 10485ebd40)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
2018-03-09 16:12:54 -08:00
Miss Islington (bot) fc5e0956fe Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-6045)
(cherry picked from commit f7a6ff6fca)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
2018-03-09 13:40:26 -08:00
Miss Islington (bot) f2fffd41b4 bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960) (GH-6041)
(cherry picked from commit 7a7f100eb3)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
2018-03-09 12:35:42 -08:00
Miss Islington (bot) c072e25885
Fix some ipaddress documentation errors (GH-6021)
* fix a typo: documention -> documentation
* fix the type of IPv?Network.hostmask
* add documentation about IPv?Network.netmask
* fix IPv6Network constructor doc that extended netmasks are not supported
(cherry picked from commit e405096ea9)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2018-03-07 20:35:52 -08:00
Miss Islington (bot) c4d77a6611
bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)
(cherry picked from commit bc3f2289b9)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2018-03-06 21:26:19 -08:00
Miss Islington (bot) 063c637cdb Add What's New for issues 32303 and 32305 (GH-5994) (GH-5995)
(cherry picked from commit 4c19b95734)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-03-05 12:51:56 -08:00
Miss Islington (bot) f92478d57a [3.7] bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978) (GH-5979)
(cherry picked from commit 18fd892463)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-03-04 18:22:32 -05:00
Miss Islington (bot) 0f7cf7eb8a
Fix missing coroutine declaration in the asyncio documentation. (GH-5964)
(cherry picked from commit 13cfd57dcf)

Co-authored-by: Joongi Kim <me@daybreaker.info>
2018-03-03 13:22:49 -08:00
Miss Islington (bot) a13b65422a
bpo-32964: Reuse a testing implementation of the path protocol in tests. (GH-5930)
(cherry picked from commit b21d155f57)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-02 02:17:51 -08:00
Miss Islington (bot) 0e06be836c Add What's new entry for datetime.fromisoformat (GH-5559) (GH-5939)
Documents bpo-15873
(cherry picked from commit 22864bc8e4)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2018-03-01 13:48:10 -05:00
Miss Islington (bot) 82734a6769
Fix typo in logging doc: picked -> pickled (GH-5942)
(cherry picked from commit 982c723384)

Co-authored-by: James Walker <19191463+jdswalker@users.noreply.github.com>
2018-02-28 15:58:58 -08:00
Miss Islington (bot) b7dcae358e Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) (GH-5931)
* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"

This reverts commit dd42cb71f2.
(cherry picked from commit be50a7b627)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-02-27 18:30:30 -05:00
Miss Islington (bot) fff596f792 bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) (gh-5929)
* Add What's New entry for addition of datetime.timezone to the C API

Closes bpo-10381

* Add what's new entry for date and datetime optimizations

Closes bpo-32403
(cherry picked from commit 5bd04f964b)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2018-02-27 14:58:28 -05:00
Miss Islington (bot) 4c842b0920
bpo-31453: Add setter for min/max protocol version (GH-5259)
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 698dde16f6)

Co-authored-by: Christian Heimes <christian@python.org>
2018-02-27 03:41:04 -08:00
Christian Heimes 89c2051a55
[3.7] bpo-32951: Disable SSLSocket/SSLObject constructor (GH-5864) (#5925)
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 9d50ab563d)

Co-authored-by: Christian Heimes <christian@python.org>
2018-02-27 11:17:32 +01:00
Miss Islington (bot) 102d5204ad
bpo-28124: deprecate ssl.wrap_socket() (GH-5888)
The ssl module function ssl.wrap_socket() has been de-emphasized
and deprecated in favor of the more secure and efficient
SSLContext.wrap_socket() method.

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

Co-authored-by: Christian Heimes <christian@python.org>
2018-02-27 01:45:31 -08:00
Miss Islington (bot) 2614ed4c6e
bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes (GH-5663)
* 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 05d9fe32a1)

Co-authored-by: Christian Heimes <christian@python.org>
2018-02-27 00:17:49 -08:00
Miss Islington (bot) 53d3f8a899
bpo-32394: Remove some TCP options on old version Windows. (GH-5523)
(cherry picked from commit 19e7d48ce8)

Co-authored-by: animalize <animalize@users.noreply.github.com>
2018-02-26 10:36:17 -08:00
Miss Islington (bot) 139e64694f
bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767)
Dropped the part that says: "For objects that do not provide sequence protocol".
(cherry picked from commit 7a1e1786f9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-02-25 13:19:55 -08:00
Miss Islington (bot) e48e6499bb
bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)
(cherry picked from commit fbee88244e)

Co-authored-by: Mario Corchero <mariocj89@gmail.com>
2018-02-25 11:35:52 -08:00
Miss Islington (bot) ddf2485103
bpo-25059: Clarify the print separator usage in tutorial (GH-5879)
By default `print` adds spaces between its arguments.
(cherry picked from commit 84c4b0cc67)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-25 11:13:33 -08:00
Miss Islington (bot) b5655f3d18
bpo-17232: Clarify docs for -O and -OO command line options (GH-5839)
The 'optimization' is for space in the executable file, not for run time.
(cherry picked from commit 186b606d8a)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-24 19:24:08 -08:00
Miss Islington (bot) 01d9c23e47 [3.7] bpo-30622: Improve NPN support detection (GH-5859) (#5860)
The ssl module now detects missing NPN support in LibreSSL.

Co-Authored-By: Bernard Spil <brnrd@FreeBSD.org>
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 6cdb7954b0)

Co-authored-by: Christian Heimes <christian@python.org>
2018-02-24 23:04:27 +01:00
Miss Islington (bot) 1c37e27719 [bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128) (GH-5843)
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 11a1493bc4)

Co-authored-by: Christian Heimes <christian@python.org>
2018-02-23 19:18:28 -08:00
Miss Islington (bot) 1ad6ca5eb9
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
`whilst` and `while` are both english words, `whilst` is not as commonly used.
This can be confusing to readers whose primary language is not english.
(cherry picked from commit 98f42aac23)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2018-02-23 10:14:23 -08:00
Mariatta 079d75d099
bpo-32924: Fix the Show Source url in the docs. (GH-5835)
The Show Source link in Python 3.7 docs is pointing to GitHub's master branch.
It should point to the 3.7 branch.
2018-02-23 10:02:30 -08:00
Miss Islington (bot) c673a62d5f
bpo-32087: Doc: Make "deprecated-removed" directive translatable (GH-4473)
(cherry picked from commit 0febc05373)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
2018-02-23 04:08:45 -08:00
Miss Islington (bot) e5d38deb04
bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
It's bad form to pin to an old version of TLS. ssl.SSLContext has the right
protocol default, so let's not pass anyway.
(cherry picked from commit e9edee0b65)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-02-20 22:02:18 -08:00
Miss Islington (bot) 7452f6d8fa bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176)
(cherry picked from commit 52c6b89796)

Co-authored-by: Harshul jain <harshulrobo@gmail.com>
2018-02-21 14:24:22 +09:00
Miss Islington (bot) 98a86cbb9b bpo-32540: Update venv documentation (GH-5736)
If the directory already exists, it will be re-used.

(cherry picked from commit e8eb972514)

Co-authored-by: TROUVERIE Joachim <joachim.trouverie@linoame.fr>
2018-02-20 20:25:37 -08:00
Miss Islington (bot) 034a945fa7
bpo-31333: Fix typo in whatsnew/3.7.rst (GH-5744)
(cherry picked from commit 3fb813d2c6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-02-18 14:35:40 -08:00
Ivan Levkivskyi 3892899288
bpo-31333: Re-implement ABCMeta in C (GH-5733)
This adds C versions of methods used by ABCMeta that
improve performance of various ABC operations.
2018-02-18 17:39:43 +00:00
Miss Islington (bot) aeb5d73b0d
Fix a typo in asyncio docs (GH-5721)
(cherry picked from commit 17ab8f0e8e)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-02-17 10:02:46 -08:00
Miss Islington (bot) 025544a855
DOC: fix documentation for copyright and credits (GH-5706)
Adapt documentation for `copyright` and `credits` to reality.  Previously, the documentation implied that all each of `copyright`,
`credits`, and `license`, would print a message to call the object in order to see the full text.  In reality, only `license` exhibits this
behaviour, and `copyright` and `credit` print their full text either when printed, displayed, or called.
(cherry picked from commit 243d6d7126)

Co-authored-by: Gerrit Holl <gerrit.holl@gmail.com>
2018-02-16 20:09:20 -08:00
Miss Islington (bot) 0f76411059
bpo-32860: Fix a missing asterisk in the documentation for glob.iglob() (GH-5712)
(cherry picked from commit 6887d86e9a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-02-16 19:51:09 -08:00
Miss Islington (bot) 803e1a5722
Correct the code example in Python 3.7's What's New (GH-5696)
There was an extra dash in the example for re.sub().
(cherry picked from commit b65cb163d6)

Co-authored-by: xpvpc <32843902+xpvpc@users.noreply.github.com>
2018-02-16 10:28:18 -08:00
Miss Islington (bot) af6eaae306
bpo-32436: Add docs for contextvars (GH-5685)
(cherry picked from commit bd093355a6)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-02-16 09:03:18 -08:00
Miss Islington (bot) f26b0190c2 Update and sync importlib.resources documentation (GH-5694) (#5697)
(cherry picked from commit 997b8c140e)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-02-16 11:07:53 -05:00
Miss Islington (bot) 8e29fd4b3b
Fix installation instructions for *nix (GH-5605)
Remove pkg_add -r python from FreeBSD installation section.
Moved to OpenBSD.
(cherry picked from commit 3384d38d51)

Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
2018-02-13 19:53:31 -08:00
Miss Islington (bot) 2e8d9003ed bpo-27846: Delete incorrect note in base64 docs (GH-5666)
This note incorrectly stated that "Base64 has an expansion factor of 6
to 4" (it is actually 4 to 3). It was decided to remove the note.

(cherry picked from commit 88c38a4049)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-02-14 03:48:00 +03:00
Miss Islington (bot) 53374cc57f
bpo-30579: Docs for dynamic traceback creation (GH-5653)
(cherry picked from commit aec7532ed3)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-02-13 00:53:37 -08:00
Miss Islington (bot) 0442599961 bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (GH-5449) (#5641)
(cherry picked from commit 7766b96ab8)

Co-authored-by: Коренберг Марк <socketpair@gmail.com>
2018-02-12 15:12:24 -05:00
Miss Islington (bot) ba4f218657 bpo-32815: Improve docs on the subprocess API *text* parameter (GH-5622) (GH-5631)
Describe *text* as an alias for *universal_newlines* in more places that people are likely to be referred to.
(cherry picked from commit e14c010378)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-02-11 15:21:02 -08:00
Miss Islington (bot) a0b998df31 bpo-11015: Update test.support documentation (GH-5619)
(cherry picked from commit 988fb28431)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-12 02:34:28 +10:00
Miss Islington (bot) e603320975 bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5611)
The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f4038)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
2018-02-10 18:08:34 -05:00
Miss Islington (bot) 3a047a781a Make formatting of some return codes conforming to the general style. (GH-5587) (GH-5597)
(cherry picked from commit 5bb0005f9f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-02-09 14:08:04 +02:00
Miss Islington (bot) 105fcbfd6a bpo-32585: Add tkinter.ttk.Spinbox. (GH-5221) (GH-5592)
(cherry picked from commit a48e78a0b7)

Co-authored-by: Alan D Moore <me@alandmoore.com>
2018-02-09 13:40:14 +02:00
Miss Islington (bot) a747cf6d9b bpo-32720: Fixed the replacement field grammar documentation. (GH-5544) (GH-5546)
`arg_name` and `element_index` are defined as `digit`+ instead of `integer`.
(cherry picked from commit 7a561afd2c)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2018-02-06 18:14:20 -07:00
Miss Islington (bot) a702f6b442 Fix typo in whatsnew/3.7.rst (GH-5551) (GH-5553)
now longer -> no longer
(cherry picked from commit c309bcfb9f)

Co-authored-by: Dag Heyman <dag@yubico.com>
2018-02-06 18:13:47 -07:00
Miss Islington (bot) 4e7a964aaf bpo-6135: Fix subprocess.check_output doc to mention changes in 3.6 (GH-5564) (GH-5572)
Fixes the documentation for `subprocess.check_output()` not mentioning that the encoding and errors parameters were added in 3.6.
(cherry picked from commit fc1ce810f1)

Co-authored-by: Brice Gros <brice-gros@users.noreply.github.com>
2018-02-06 17:12:06 -08:00
Miss Islington (bot) fea0a12f6b [3.7] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-5543)
When `__getattr__` is implemented, attribute lookup will always fall back to that,
even if the initial failure comes from `__getattribute__` or a descriptor's `__get__`
method (including property methods).
(cherry picked from commit d1f318105b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-05 13:16:49 +10:00
Miss Islington (bot) 5c5e61bc9f Fix typo -- missing "not" (GH-5528) (GH-5530) 2018-02-04 10:10:17 -08:00
Miss Islington (bot) 133514e9dc bpo-32720: Fixed the definition for width and precision in format mini-language doc (GH-5482) (GH-5524)
Changed the definition of width and precision from "integer" to "digit+" in format mini-language doc.
(cherry picked from commit 8b5fa289fd)

Co-authored-by: nathankerr96 <nathankerr96@gmail.com>
2018-02-04 01:03:21 -05:00
Miss Islington (bot) e86db34dd3 [3.7] bpo-32746: Fix multiple typos (GH-5144) (GH-5520)
Fix typos found by codespell in docs, docstrings, and comments.
(cherry picked from commit c3d9508ff2)

Co-authored-by: Leo Arias <leo.arias@canonical.com>
2018-02-03 20:41:43 -05:00
Miss Islington (bot) 52f745852e bpo-32739: Show default value for rotate() (GH-5485) (GH-5514)
(cherry picked from commit 589c718a8e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-02-03 09:08:42 -08:00
Barry Warsaw a23d30f64b
bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5503)
* 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 bbbcf8693b)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-02-02 19:49:25 -05:00
Miss Islington (bot) c7de1d7ca6 bpo-32614: Modify re examples to use a raw string to prevent warning (GH-5265) (#5499)
Modify RE examples in documentation to use raw strings to prevent DeprecationWarning.
Add text to REGEX HOWTO to highlight the deprecation.  Approved by Serhiy Storchaka.
(cherry picked from commit 66771422d0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-02 16:50:44 -05:00
Miss Islington (bot) 29fd9eae43 Revert "bpo-31356: Add context manager to temporarily disable GC GH-5495 (#5496)
This reverts commit 72a0d218dc.

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 383b32fe10)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-02-02 10:04:32 -05:00
Miss Islington (bot) 71a0b0e6e8 Implement TimerHandle.when() (GH-5473) (GH-5480)
(cherry picked from commit 3d4dbd8f01)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-02-01 21:56:03 +02:00
Miss Islington (bot) 4d6543005d bpo-32565: Add missed versionadded directives for all new opcodes. (GH-5199) (GH-5470)
(cherry picked from commit 12e7cd8a51)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-02-01 14:12:55 +02:00
Ned Deily 7f38637853 Update Doc build for split off of 3.7 branch 2018-01-31 18:24:44 -05:00
Cheryl Sabella 70e304252a bpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464)
The f-string example for using datetime format specifier does not match the given output.
Changed the format from %b to %B so it matches the output of "January".
2018-01-31 17:02:57 -05:00
Xiang Zhang f3da70f8ab Make site documentation more clear (#5461)
Mention only ImportError caused by importing sitecustomize.py/usercustomize.py
themselves will be silently ignored.
2018-01-31 17:02:28 -05:00
Bernhard M. Wiedemann 57750be4ad bpo-30693: zip+tarfile: sort directory listing (#2263)
tarfile and zipfile now sort directory listing to generate tar and zip archives
in a more reproducible way.

See also https://reproducible-builds.org/docs/stable-inputs/ on that topic.
2018-01-31 17:01:55 -05:00
Stéphane Wirtel 67adb31a41 bpo-32724: Fix references to commands in Doc/pdb.rst (GH-5444)
Some commands are specified in the documentation, but there is no direct
references.
2018-01-30 11:34:33 +02:00
John Jolly 066df4fd45 bpo-22908: Add seek and tell functionality to ZipExtFile (GH-4966)
This allows for nested zip files, tar files within zip files, zip files within tar files, etc.

Contributed by: John Jolly
2018-01-30 00:51:35 -08:00
Anders Lorentsen dd42cb71f2 bpo-31961: subprocess now accepts path-like args (GH-4329)
Allow os.PathLike args in subprocess APIs.
2018-01-29 23:27:28 -08:00
Bo Bayles ce0f33d045 bpo-32102 Add "capture_output=True" to subprocess.run (GH-5149)
Add "capture_output=True" option to subprocess.run, this is equivalent to
setting stdout=PIPE, stderr=PIPE but is much more readable.
2018-01-29 22:40:39 -08:00
Bo Bayles ce237c7d58 bpo-21417: Add compresslevel= to the zipfile module (GH-5385)
This allows the compression level to be specified when writing zipfiles
(for the entire file *and* overridden on a per-file basis).

Contributed by Bo Bayles
2018-01-29 21:54:07 -08:00
Julien Palard 9424dcbb3e bpo-32701: Clarify the quotetabs flag in quopri documentation (GH-5401) 2018-01-29 19:36:06 -08:00
Mark Shannon 332cd5ee4f bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181) 2018-01-29 16:41:04 -08:00
Christian Heimes b6e43af669
bpo-28134: Auto-detect socket values from file descriptor (#1349)
Fix socket(fileno=fd) by auto-detecting the socket's family, type,
and proto from the file descriptor. The auto-detection can be overruled
by passing in family, type, and proto explicitly.

Without the fix, all socket except for TCP/IP over IPv4 are basically broken:

>>> s = socket.create_connection(('www.python.org', 443))
>>> s
<socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)>
>>> socket.socket(fileno=s.fileno())
<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)>

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-29 22:37:58 +01:00
Pablo Galindo 72a0d218dc bpo-31356: Add context manager to temporarily disable GC (GH-4224) 2018-01-29 12:37:09 -08:00
Raymond Hettinger e6d342156d
bpo-25988: Deprecate exposing collections.abc in collections GH-5414 2018-01-29 08:27:49 -08:00
Christian Heimes 892d66e422
bpo-31429: Define TLS cipher suite on build time (#3532)
Until now Python used a hard coded white list of default TLS cipher
suites. The old approach has multiple downsides. OpenSSL's default
selection was completely overruled. Python did neither benefit from new
cipher suites (ChaCha20, TLS 1.3 suites) nor blacklisted cipher suites.
For example we used to re-enable 3DES.

Python now defaults to OpenSSL DEFAULT cipher suite selection and black
lists all unwanted ciphers. Downstream vendors can override the default
cipher list with --with-ssl-default-suites.

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-29 14:10:18 +01:00
Victor Stinner db8189bb8d
bpo-31233, bpo-31151: Document socketserver changes (#5417)
socketserver.ForkingMixIn.server_close() and
socketserver.ThreadingMixIn.server_close() now waits until all child
processes and non-daemonic threads complete.
2018-01-29 12:10:22 +01:00
Victor Stinner 2914bb32e2
bpo-20891: Py_Initialize() now creates the GIL (#4700)
The GIL is no longer created "on demand" to fix a race condition when
PyGILState_Ensure() is called in a non-Python thread.
2018-01-29 11:57:45 +01:00
cocoatomo 2a3260bb03 Fix minor markup typo (#5407) 2018-01-29 00:30:48 -08:00
Yury Selivanov 07627e9a6a
bpo-32251: Fix docs (#5408) 2018-01-28 23:51:08 -05:00
Gregory P. Smith f5b04a360e
Document the error return of PyLong_As* APIs. (#5396)
Document the error return of PyLong_As* APIs.

A frequent Python C API usage error is neglecting to check the return
value and/or PyErr_Occurred().
2018-01-28 17:48:31 -08:00
Steve Dower 15ea3a6a32
bpo-32699: Improves doc for .pth files in presense of a ._pth file (#5399) 2018-01-29 10:34:09 +11:00
Yury Selivanov f11b460d87
bpo-32373: Add socket.getblocking() method. (#4926) 2018-01-28 17:27:38 -05:00
Yury Selivanov 631fd38dbf
bpo-32251: Implement asyncio.BufferedProtocol. (#4755) 2018-01-28 16:30:26 -05:00
Yury Selivanov 0ceb717689
Revert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" (#5394)
This reverts commit 47c0b1f7d4.
2018-01-28 16:08:32 -05:00
larryhastings f36ba12809
bpo-32697: Definition order of kwonly params is now guaranteed preserved. (#5391)
Definition order of kwonly params is now guaranteed preserved.
2018-01-28 11:13:09 -08:00
Yury Selivanov bec2372b7e
bpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)
I've run some tests on 3.7 asyncio and it appears that too many
things assume that run_in_executor returns a Future.
2018-01-28 14:09:40 -05:00
Xiang Zhang 79db11ce99
Fix PyTrace_RETURN documentation (GH-5384)
It will be triggered when propagating an exception.
2018-01-28 22:54:42 +08:00
Eric V. Smith 4d0296649a
Add example for PEP 557. (GH-5383) 2018-01-28 09:25:45 -05:00
jcea 6c51d51880
bpo-32659: Solaris "stat" should support "st_fstype" (#5307)
* bpo-32659: Solaris "stat" should support "st_fstype"

* Add 'versionadded'
2018-01-28 14:00:08 +01:00
Xiang Zhang 255f7a26da bpo-32649: Add C API docs for per-opcode tracing & profiling (GH-5360)
Updating the C API docs was missed when the per-opcode
tracing & profiling support was initially added.
2018-01-28 19:53:38 +10:00