Commit Graph

22883 Commits

Author SHA1 Message Date
Łukasz Langa 85da2ddc89 Python 3.8.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl2keYQACgkQsmmV4xAl
 BWgtYA/+OuuxCQieZTU9h10naQvzp42/4g69EjvV396wvgGWABxAUVQGJr5swX39
 M3Z8f26AhIhxyLP55BqHB+0RxnuEZ/9EtbPUhAu/LJFj6jct2YtFcObAect+Ey0l
 +rdPY5amCLgJGghG7sEaWD7MOn5SK/ub6jFbY9Jj7fBdaKe+jj703tw3iR0TfCtH
 m1vrBnD4iMt3+7N7FlOXV84UGfwQtYWOyNYn9mUCi+beFDmoScMItpkozKKK+1FC
 jEatdZIiWHOaacgSXcYRxDRPOt8W/YewW5wbnk+/i/7uiUcPJAKpoKr07tRImVDX
 D0Uc0IMJIyAKNw4jlo0yBoG1QdovqnFGCsJgnhmJKeQgWKiJMlFWF0jn7rnl/Awu
 xGp5xedIUVQ8wKuhIEkIalZ9LI/IKEmhwQTz7aPyV9okiFlHHonpxmgeQWFZgmzN
 4XD/+ihuZRJ+KUTshTqAYzbQ1uNjZJzOjJUwiV1LRXHaYxixW8yrFsr+jcpWGybF
 j2YTNKh7JSWloAa/bZdD+TPp8mATAXvGqoRa8YaDWzYogD8avpIsoSzNchKPEEO7
 HyapQykFlmR7roOOgqLt1BmJvnbLJeQYdNc/PadtNlyiI+IVaQiiEr9EYpe/Nnz7
 0krlnTZmcKekXoc7VopPhB9s2jLAoCVeIr/WE6CHbZ6NBeauIcQ=
 =u2+m
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl2k1EMQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaMhNEACVjtdwLS3T+U04gyYbYbBEv5ETpplDvhI8
 sNgNWncp2pHav5RJqzxOMoCUrlh1axgylqceMFtxkTbYiQvbEtna+K6jYW94mz2t
 TJhS9hWaSN8lUp9W637t0evn8ah3unuyfS3aqBs9LxLV9UJcn2hzJqbLJ288JClm
 7ZrAkD2CqQse2vs+XN6no2V2Pc4XRf40v4XstJS5dqykg7cvbaSnpnyHKYJEV3bM
 MyUoXUR/D7rxXtwOPLqtDlFrZj690IuAjPuV3o0+0MXXs6JJ+flWo5HFQ/EUGdt1
 Yq30gt4iau/Jdy/mVJCBggD79BVz3lcTfITZQ9CwpgxeivxeCqamlYsTwylanLrU
 CNyCLeyhEB5m2VyZ/yWIqoTcN7hxKXYqAn6ELKHIy2O/JcT00giG9IDDC7+OeW3Q
 8jN7zhb1AXhO1u+S+Kraw6fJDUxnq3AEknfShUpOW2KfyQwxh2HjpHJGPSrzIkjZ
 YMC8t6tyvHlpFnoqHWknLURkm4l8zfxl7rg4Z2tnu/41MmHtZE0MocDLKytzXUW2
 zsxJllqA6rRJPh4Rz/n6Mb6o4vgdJ5tHT2rsxhSmu2YiRjD4hp3Ovm5T6TMdMquh
 r+BXlMl+lN5J6xuEvwNSlUMcU/QKOrAvPBlgsSwhXMVp2/HZ20kfc2gRWg6O4PhM
 eMzH9by1Uw==
 =W9XA
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.0' into 3.8

Python 3.8.0
2019-10-14 22:02:08 +02:00
Miss Islington (bot) deba4fac5d Remove draft status. Add asyncio REPL example (GH-16785) (GH-16786)
(cherry picked from commit 274bd013da)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-14 09:08:30 -07:00
Łukasz Langa fa919fdf25
v3.8.0 2019-10-14 15:34:47 +02:00
Łukasz Langa e498329ebe
[3.8] bpo-37759: Polish What's New in Python 3.8. (GH-16769) (#16777)
(cherry picked from commit 298439ce3f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-14 15:25:46 +02:00
Miss Islington (bot) 3ac152948d bpo-37759: Add examples for the new typing features (GH-16763) (GH-16764)
(cherry picked from commit a3291531ea)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-13 23:45:45 -07:00
Miss Islington (bot) c09379bd6e bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) (GH-16762)
* bpo-38461: ncurses misspelled as curses

* bpo-38463: Fix broken link
(cherry picked from commit 61a6db5e79)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-13 21:54:05 -07:00
Raymond Hettinger 75d8a75295
Fix minor typos in Whatsnew (GH-16759) 2019-10-13 20:35:11 -07:00
Miss Islington (bot) 36f62860f6 bpo-38464: Document parameter for NormalDist.quantiles() (GH-16757) (GH-16758)
(cherry picked from commit 8a6cbf8adb)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-13 20:04:29 -07:00
Miss Islington (bot) 02d6f4f9bc Rebased version of what's new PR (GH-16745) (#16748)
* Use Unicode character for accent
* Various grammar fixes
* Sort library modules alphabetically; remove duplicated idlelib/IDLE section
(cherry picked from commit bb78f6cfa6)

Co-authored-by: Andrew Kuchling <amk@amk.ca>
2019-10-13 22:35:10 +02:00
Miss Islington (bot) c732660b7b
bpo-38467: Fix argument name of typing functions (GH-16753)
(cherry picked from commit fdfe2833ac)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2019-10-13 11:38:45 -07:00
Miss Islington (bot) e742826531
bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743)
Metaclass was removed in Python 3.7 (there is already a `versionchanged` item about this).

https://bugs.python.org/issue28556
(cherry picked from commit 8144095707)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-10-13 10:00:19 -07:00
Miss Islington (bot) fdc7cbeedc
Announce the change in the CancelledError inheritance (GH-16730)
This is a fairly noticeable change that requires adjustments in
existing asyncio code. It should therefore be announced.
(cherry picked from commit e634da2747)

Co-authored-by: Phil Jones <philip.graham.jones@googlemail.com>
2019-10-12 10:53:32 -07:00
Miss Islington (bot) 294c5229b1
Fix typo in the "Porting to Python 3.8" section. (GH-16435)
(cherry picked from commit dd6117c6d7)

Co-authored-by: bariod <35639254+bariod@users.noreply.github.com>
2019-10-11 14:09:44 -07:00
Miss Islington (bot) 6bfeb819e5
docs: Add asyncio source code links (GH-16640)
(cherry picked from commit f900064ac4)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-10-10 16:25:28 -07:00
Miss Islington (bot) baf8a9b03a
bpo-32996: Documentation fix-up. (GH-16646)
PR GH-4906 changed the typing.Generic class hierarchy, leaving an
outdated comment in the library reference. User-defined Generic ABCs now
must get a abc.ABCMeta metaclass from something other than typing.Generic
inheritance.
(cherry picked from commit d47f0dd2e8)

Co-authored-by: M. Eric Irrgang <mei2n@virginia.edu>
2019-10-10 04:19:03 -07:00
Miss Islington (bot) b731fc521c
bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442)
Prior to 3.7, re.escape escaped many characters that don't have
special meaning in Python, but that use to require escaping in other
tools and languages. This commit aims to make it clear which characters
were, but are no longer escaped.
(cherry picked from commit 15ae75d660)

Co-authored-by: Ricardo Bánffy <rbanffy@gmail.com>
2019-10-07 14:07:46 -07:00
Miss Islington (bot) 985ec986e8
bpo-38391: Fixing a typo for Py_DECREF (GH-16616)
(cherry picked from commit 038503e08a)

Co-authored-by: Krishna Oza <krishoza15sep@gmail.com>
2019-10-07 05:05:09 -07:00
Miss Islington (bot) f19b4d7474
bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
The `required` argument to `argparse.add_subparsers` was added in GH-3027. This PR specifies the earliest version of Python where it is available.

https://bugs.python.org/issue26510

Automerge-Triggered-By: @merwok
(cherry picked from commit 9e71917e02)

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2019-10-06 19:15:44 -07:00
Miss Islington (bot) 3af2733a82 bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16576)
(cherry picked from commit 3142c667b5)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
2019-10-04 09:14:01 +01:00
Miss Islington (bot) c4976a6095
Correct typos in the codecs module documentation (GH-15135)
(cherry picked from commit 891e9e3b44)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-10-01 14:02:29 -07:00
Miss Islington (bot) d49f096cc4
bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)
PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no
longer return PyStatus: they cannot fail anymore.
(cherry picked from commit 8462a4936b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-10-01 03:26:04 -07:00
Miss Islington (bot) 2f644c0dc9 Fix and improve `asyncio.run()` docs (GH-16403) (GH-16504)
(cherry picked from commit e407013089)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-30 18:46:43 -07:00
Victor Stinner bdace21b76 bpo-38304: Remove PyConfig.struct_size (GH-16500)
For now, we'll rely on the fact that the config structures aren't covered by the stable ABI.

We may revisit this in the future if we further explore the idea of offering a stable embedding API.
2019-10-01 08:46:42 +10:00
Miss Islington (bot) 1aeb720d64 bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389) (#16465)
(cherry picked from commit c5a7e0ce19)

Co-authored-by: Pascal Chambon <pythoniks@gmail.com>
2019-09-30 09:06:28 +02:00
Yury Selivanov 1c19d656a7
bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) (#16485)
See https://bugs.python.org/issue38242 for more details
2019-09-29 22:30:17 -07:00
Lisa Roach 21f24ead90
[3.8] bpo-38163: Child mocks detect their type as sync or async (GH-16471) (GH-16484) 2019-09-29 22:22:44 -07:00
Miss Islington (bot) c9ed9e6fc7
bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)
Fix warnings options priority: PyConfig.warnoptions has the highest
priority, as stated in the PEP 587.

* Document options order in PyConfig.warnoptions documentation.
* Make PyWideStringList_INIT macro private: replace "Py" prefix
  with "_Py".
* test_embed: add test_init_warnoptions().
(cherry picked from commit fb4ae152a9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-09-29 16:58:57 -07:00
Victor Stinner 6e128382b3
bpo-38304: Add PyConfig.struct_size (GH-16451) (GH-16453)
Add a new struct_size field to PyPreConfig and PyConfig structures to
allow to modify these structures in the future without breaking the
backward compatibility.

* Replace private _config_version field with public struct_size field
  in PyPreConfig and PyConfig.
* Public PyPreConfig_InitIsolatedConfig() and
  PyPreConfig_InitPythonConfig()
  return type becomes PyStatus, instead of void.
* Internal _PyConfig_InitCompatConfig(),
  _PyPreConfig_InitCompatConfig(), _PyPreConfig_InitFromConfig(),
  _PyPreConfig_InitFromPreConfig() return type becomes PyStatus,
  instead of void.
* Remove _Py_CONFIG_VERSION
* Update the Initialization Configuration documentation.

(cherry picked from commit 441b10cf28)
2019-09-28 04:50:43 +02:00
Lisa Roach 52bdd414ed
[3.8] bpo-38136: Updates await_count and call_count to be different things (GH-16192) (GH-16431) 2019-09-27 15:44:34 -07:00
Miss Islington (bot) 14ddca726a
bpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)
As mentioned in the bpo ticket, this mistake came up on two reviews:
- https://github.com/python/cpython/pull/16127GH-pullrequestreview-288312751
- https://github.com/python/cpython/pull/16071GH-pullrequestreview-287819525

Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry.

https://bugs.python.org/issue38206

Automerge-Triggered-By: @encukou
(cherry picked from commit 5faff977ad)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2019-09-27 04:18:24 -07:00
Victor Stinner 96c8475362
[3.8] bpo-38234: Backport init path config changes from master (GH-16423)
* bpo-38234: Py_SetPath() uses the program full path (GH-16357)

Py_SetPath() now sets sys.executable to the program full path
(Py_GetProgramFullPath()), rather than to the program name
(Py_GetProgramName()).

Fix also memory leaks in pathconfig_set_from_config().

(cherry picked from commit 1ce152a42e)

* bpo-38234: Add tests for Python init path config (GH-16358)


(cherry picked from commit bb6bf7d342)

* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)

Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed
to test pyvenv.cfg and pybuilddir.txt configuration files.

Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8
encoding, not ASCII.

(cherry picked from commit 52ad33abbf)

* bpo-38234: Cleanup getpath.c (GH-16367)

* search_for_prefix() directly calls reduce() if found is greater
  than 0.
* Add calculate_pybuilddir() subfunction.
* search_for_prefix(): add path string buffer for readability.
* Fix some error handling code paths: release resources on error.
* calculate_read_pyenv(): rename tmpbuffer to filename.
* test.pythoninfo now also logs windows.dll_path

(cherry picked from commit 221fd84703)

* bpo-38234: Fix test_embed pathconfig tests (GH-16390)

bpo-38234: On macOS and FreeBSD, the temporary directory can be
symbolic link. For example, /tmp can be a symbolic link to /var/tmp.
Call realpath() to resolve all symbolic links.

(cherry picked from commit 00508a7407)

* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)

* Add test_embed.test_init_setpath_config(): test Py_SetPath()
  with PyConfig.
* test_init_setpath() and test_init_setpythonhome() no longer call
  Py_SetProgramName(), but use the default program name.
* _PyPathConfig: isolated, site_import  and base_executable
  fields are now only available on Windows.
* If executable is set explicitly in the configuration, ignore
  calculated base_executable: _PyConfig_InitPathConfig() copies
  executable to base_executable.
* Complete path config documentation.

(cherry picked from commit 8bf39b606e)

* bpo-38234: Complete init config documentation (GH-16404)


(cherry picked from commit 88feaecd46)

* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)

Explicitly preinitializes with a Python preconfiguration to avoid
Py_SetPath() implicit preinitialization with a compat
preconfiguration.

Fix also test_init_setpath() and test_init_setpythonhome() on macOS:
use self.test_exe as the executable (and base_executable), rather
than shutil.which('python3').

(cherry picked from commit 49d99f01e6)

* bpo-38234: Py_Initialize() sets global path configuration (GH-16421)

* Py_InitializeFromConfig() now writes PyConfig path configuration to
  the global path configuration (_Py_path_config).
* Add test_embed.test_get_pathconfig().
* Fix typo in _PyWideStringList_Join().

(cherry picked from commit 12f2f177fc)
2019-09-26 16:17:34 +02:00
Miss Islington (bot) 68040edb79 bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16415)
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
(cherry picked from commit 1ad7be2f16)

Co-authored-by: Mohammad Dehghan <md.unicorn@gmail.com>
2019-09-26 11:16:38 +02:00
Miss Islington (bot) b3c35fea13 Doc: Use the `with` statement in the first example of the ftplib doc. (GH-16271) (GH-16412)
(cherry picked from commit 5d326abf2c)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-09-26 09:12:39 +02:00
Miss Islington (bot) 7444a5a402 bpo-38255: super() can search attributes as well as methods (GH-16368) (GH-16391)
Improvement suggested by Géry Ogam.
(cherry picked from commit 15ccc4fac0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-25 08:24:12 -07:00
Miss Islington (bot) 4633355a06
bpo-38260: Add Docs on asyncio.run (GH-16337)
Add docs about return and raise exception on asyncio.run

https://bugs.python.org/issue38260

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 17deb16883)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-25 02:12:47 -07:00
Victor Stinner c5c642565e
bpo-38236: Dump path config at first import error (GH-16300) (GH-16332)
Python now dumps path configuration if it fails to import the Python
codecs of the filesystem and stdio encodings.

(cherry picked from commit fcdb027234)
2019-09-23 15:59:00 +02:00
Miss Islington (bot) 37bc935523 bpo-38237: Let pow() support keyword arguments (GH-16302) (GH-16320)
Backported with release manager approval
2019-09-21 01:22:29 -07:00
Lisa Roach 865bb685a6 [3.8] bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) (GH-16299)
(cherry picked from commit 8b03f943c3)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2019-09-21 08:00:04 +02:00
Miss Islington (bot) 960f52adc9 Doc: Remove provisional note for asyncio.run() (GH-16310) (GH-16311)
Based on a comment from @asvetlov https://github.com/python/cpython/pull/15735GH-discussion_r323619076, this removes the provisional note for ``asyncio.run()`` in the documentation.

Automerge-Triggered-By: @1st1
(cherry picked from commit 77af2290e5)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-21 07:29:09 +02:00
Miss Islington (bot) c410390e89
bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439)
Mention frame.f_trace in sys.settrace docs, as well as the fact you still
need to call `sys.settrace` to enable the tracing machinery before setting
`frame.f_trace` will have any effect.
(cherry picked from commit 9c2682efc6)

Co-authored-by: Ram Rachum <ram@rachum.com>
2019-09-20 08:26:27 -07:00
Miss Islington (bot) 0ab6b01820
bpo-37353: Updated parser note about source code compatibility(GH-14277)
(cherry picked from commit 062cfe3b11)

Co-authored-by: Prateek Nayak <45075669+Kriyszig@users.noreply.github.com>
2019-09-20 07:03:21 -07:00
Miss Islington (bot) 16eb6232c0
Doc: Clarify dict equality irrespective of ordering. (GH-16266)
(cherry picked from commit 3171d67a6a)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
2019-09-18 22:58:42 -07:00
Miss Islington (bot) 6612a4fd36 [3.8] bpo-38218: Doc: Corrected syntax for return annotation (GH-16265) (GH-16274)
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038fe8)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
2019-09-19 07:42:57 +02:00
Victor Stinner 064e1e3841
bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16260)
dump_traceback_later() and cancel_dump_traceback_later() functions of
the faulthandler module are always available since Python 3.7.
2019-09-18 14:37:02 +02:00
Miss Islington (bot) 7a2f68776a bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234)
A little change on first paragraph of python tutorial to be more clearly

https://bugs.python.org/issue37904

Automerge-Triggered-By: @ericvsmith
(cherry picked from commit b57481318e)

Co-authored-by: Diego Alberto Barriga Martínez <diegobarriga@protonmail.com>
2019-09-18 06:36:15 -04:00
Miss Islington (bot) 728bea60e5
Doc: Fix grammar/spelling in ssl.VERIFY_CRL_CHECK_LEAF docs (GH-16221)
(cherry picked from commit 219fb9d65e)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
2019-09-17 03:49:20 -07:00
Miss Islington (bot) 1ba74719e3
bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202)
See https://bugs.python.org/issue38192 .

https://bugs.python.org/issue38192
(cherry picked from commit 5d359cc62e)

Co-authored-by: Hrvoje Nikšić <hniksic@gmail.com>
2019-09-17 00:24:31 -07:00
Miss Islington (bot) d90bb231c2 Doc: Add list(dict) in stdtypes library (GH-16209) (GH-16210)
(cherry picked from commit 63dedef48b)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2019-09-17 07:05:33 +02:00
Miss Islington (bot) 7076764992
bpo-28556: Update the opening note in typing docs (GH-16204)
This PR replaces the old note mentioning that `typing` is a provisional module with a new one mentioning types are not enforced at runtime. I am not sure if there was any official announcement about making `typing` non-provisional, but _de-facto_ no new features were added during Python 3.7, and no backwards incompatible changes were made except for few small things that were considered bugs.
(cherry picked from commit 81528ba2e8)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-09-16 15:11:10 -07:00
Miss Islington (bot) 9dc381c0aa Doc: Add link of GNU Readline library to interpreter tutorial (GH-16152) (GH-16189)
(cherry picked from commit f18242be16)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2019-09-16 18:30:04 +02:00
Miss Islington (bot) 07186c3959
bpo-33095: Add reference to isolated mode in -m and script option (GH-7764)
Attempt to make isolated mode easier to discover via additional inline documentation.

Co-Authored-By: Julien Palard <julien@palard.fr>
(cherry picked from commit bdd6945d4d)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-16 05:21:03 -07:00
Miss Islington (bot) 817227ebd5
Doc: remove duplicate word in controlflow tutorial (GH-16163)
(cherry picked from commit b7af4e7565)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2019-09-16 00:13:14 -07:00
Miss Islington (bot) 1cd6e926d3
bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159)
https://bugs.python.org/issue38178
(cherry picked from commit c717c73fa3)

Co-authored-by: Hrvoje Nikšić <hniksic@gmail.com>
2019-09-15 10:13:34 -07:00
Miss Islington (bot) b65be6cd3d bpo-38158: Removing nonexistant member "doc" from PyType_Spec documentation (GH-16142) (GH-16154)
(cherry picked from commit 8b31a11a69)

Co-authored-by: t k <tahia.khan@utoronto.ca>
2019-09-15 08:00:44 +01:00
Miss Islington (bot) 4a71df88cd
bpo-37635: Update arg name for seek() in IO tutorial (GH-16147)
Typically, the second positional argument for ``seek()`` is *whence*. That is the POSIX standard name (http://man7.org/linux/man-pages/man3/lseek.3p.html) and the name listed in the documentation for ``io`` module (https://docs.python.org/3/library/io.htmlGH-io.IOBase.seek).

The tutorial for IO is the only location where the second positional argument for ``seek()`` is referred to as *from_what*. I suspect this was created at an early point in Python's history, and was never updated (as this section predates the GitHub repository):

```
$ git grep "from_what"
Doc/tutorial/inputoutput.rst:To change the file object's position, use ``f.seek(offset, from_what)``.  The position is computed
Doc/tutorial/inputoutput.rst:the *from_what* argument.  A *from_what* value of 0 measures from the beginning
Doc/tutorial/inputoutput.rst:the reference point.  *from_what* can be omitted and defaults to 0, using the
```

For consistency, I am suggesting that the tutorial be updated to use the same argument name as the IO documentation and POSIX standard for ``seek()``, particularly since this is the only location where *from_what* is being used.

Note: In the POSIX standard, *whence* is technically the third positional argument, but the first argument *fildes* (file descriptor) is implicit in Python.

https://bugs.python.org/issue37635
(cherry picked from commit ff603f6c3d)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-14 13:47:31 -07:00
Stéphane Wirtel f05d39d42c
[3.8] Doc: Fix link to window.getch in curses documentation (GH-16132) (GH-16135)
(cherry picked from commit a26ace19bd)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2019-09-14 07:25:10 +01:00
Miss Islington (bot) 10873831ed
Doc: fcntl.lockf() is more powerful than written (GH-6750)
(cherry picked from commit 77cd0ceab2)

Co-authored-by: Eric O. LEBIGOT (EOL) <lebigot@users.noreply.github.com>
2019-09-13 10:39:42 -07:00
Miss Islington (bot) e6b14c026f
bpo-32790: Add info about alt format using GH- for 'g' in chart (GH-6624)
(cherry picked from commit d44542f9a2)

Co-authored-by: bchhabra2490 <bchhabra2490@gmail.com>
2019-09-13 10:28:46 -07:00
Miss Islington (bot) c27bcc3b47
bpo-26468: Doc: improve the documentation of shutil.copy2 when it can fail. (GH-13765)
(cherry picked from commit 9585f46b97)

Co-authored-by: Windson yang <wiwindson@outlook.com>
2019-09-13 06:43:34 -07:00
Miss Islington (bot) 4556b1d35c
bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)
(cherry picked from commit 375a3e2bdb)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-13 06:14:42 -07:00
Miss Islington (bot) 60d5e2c5a5
Doc: Improve consistency of os.path.normcase with other os.path functions (GH-14004)
(cherry picked from commit 53f78ec9e1)

Co-authored-by: Kexuan Sun <me@kianasun.com>
2019-09-13 06:07:48 -07:00
Miss Islington (bot) b9bfe143d1
bpo-36889: Document Stream class and add docstrings (GH-14488)
* This just copies the docs from `StreamWriter` and `StreamReader`.
* Add docstring for asyncio functions.

https://bugs.python.org/issue36889

Automerge-Triggered-By: @asvetlov
(cherry picked from commit d31b31516c)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-13 04:23:43 -07:00
Miss Islington (bot) 4145f62759
Emphasize the need to always call PySequence_Fast. (GH-11140)
(cherry picked from commit 57b7dbc46e)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2019-09-12 09:26:17 -07:00
Miss Islington (bot) 6dc3e61c51
bpo-37908: Add an example of ArgumentParser.exit() (GH-15455)
Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit b1a2abdb06)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-09-12 08:43:14 -07:00
Miss Islington (bot) d04c85f5a7 bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16062)
(cherry picked from commit 4210ad5ebd)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-12 08:20:31 -07:00
Miss Islington (bot) 307c5fe942
bpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773)
https://bugs.python.org/issue37488

Automerge-Triggered-By: @pganssle
(cherry picked from commit 1a53c785e6)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-09-12 07:55:48 -07:00
Miss Islington (bot) 8976359c59
Overhaul datetime documentation (GH-13410)
This is a restructuring of the datetime documentation to hopefully make
them more user-friendly and approachable to new users without losing any
of the detail.

Changes include:
 - Creating dedicated subsections for some concepts such as:
    - "Constants"
    - "Naive vs Aware"
    - "Determining if an Object is Aware"
 - Give 'naive vs aware' its own subsection
 - Give 'constants' their own subsection
 - Overhauling the strftime-strptime section by:
    - Breaking it into logical, linkable, and digestable parts
    - Adding a high-level comparison table
    - Moving the technical detail to bottom: readers come to this
      section primarily to remind themselves to things:
      - How do I write the format code for X?
      - strptime/strftime: which one is which again?
 - Touching up fromisoformat + isoformat sections by:
    - Revising fromisoformat + isoformat for date, time, and
      datetime
    - Adding basic examples
    - Enforcing consistency about putting formats (i.e. ``HH:MM``)
      in double backticks.  This was previously done in some places
      but not all
    - Putting long 'supported formats', on their own line to improve
      readability
 - Moving the 'seealso' section to the top and add a link to dateutil
    Rationale: This doesn't really belong nested under the
    'constants' section.  Let readers know right away that
    datetime is one of several related tools.
 - Moving common features of several types into one place:
    Previously, each type went out of its way to note separately
    that it was hashable and picklable.  These can be brought
    into one single place that is more prominent.
 - Reducing some verbose explanations to improve readability
 - Breaking up long paragraphs into digestable chunks
 - Displaying longer "equivalent to" examples, as short code blocks
 - Using the dot notation for datetime/time classes:
    Use :class:`.time` and :class:`.datetime` rather than :class:`time` and
    :class:`datetime`; otherwise, the generated links will route to the
    respective modules, not classes.
 - Rewording the tzinfo class description
    The top paragraph should get straight to the point of telling the reader
    what subclasses of tzinfo _do_.  Previously, that was hidden in a later
    paragraph.
 - Adding a note on .today() versus .now()
 - Rearranging and expanding example blocks, including:
    - Moved long, multiline inline examples to standalone examples
    - Simplified the example block for timedelta arithmetic:
        - Broke the example into two logical sections:
          1. normalization/parameter 'merging'
          2. timedelta arithmetic
        - Reduced the complexity of the some of the examples.  Show
          reasonable, real-world uses cases that are easy to follow
          along with and progres in difficult slightly.
    - Broke up the example sections for date and datetime sections by putting
      the easy examples first, progressing to more esoteric situations and
      breaking it up into logical sections based on what the methods are
      doing at a high level.
    - Simplified the KabulTz example:
        - Put the class definition itself into a non-REPL block since there is
          no interactive output involved there
        - Briefly explained what's happening before launching into the code
        - Broke the example section into visually separate chunks
 - Various whitespace, formatting, style and grammar fixes including:
    - Consistently using backctics for 'date_string' formats
    - Consistently using one space after periods.
    - Consistently using bold for vocab terms
    - Consistently using italics when referring to params:
      See https://devguide.python.org/documenting/GH-id4
    - Using '::' to lead into code blocks
        Per https://devguide.python.org/documenting/GH-source-code, this will
        let the reader use the 'expand/collapse' top-right button for REPL
        blocks to hide or show the prompt.
    - Using consistent captialization schemes
    - Removing use of the default role
    - Put 'example' blocks in Markdown subsections

This is a combination of 66 commits.

See bpo-36960: https://bugs.python.org/issue36960
(cherry picked from commit 3fb1363fe8)

Co-authored-by: Brad <brad.solomon.1124@gmail.com>
2019-09-12 07:37:36 -07:00
Miss Islington (bot) 2f01cf6187
bpo-37363: Document internal audit events (GH-14663)
Three internal cpython events were not documented, yet.

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

https://bugs.python.org/issue37363
(cherry picked from commit ed4b3216e5)

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-12 06:20:26 -07:00
Miss Islington (bot) 345bfc990f
bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)
(cherry picked from commit a488879cba)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-09-12 05:59:50 -07:00
Miss Islington (bot) 535863e3f5
bpo-26868: Fix example usage of PyModule_AddObject. (GH-15725)
* Add a note to the PyModule_AddObject docs.

* Correct example usages of PyModule_AddObject.

* Whitespace.

* Clean up wording.

* 📜🤖 Added by blurb_it.

* First code review.

* Add < 0 in the tests with PyModule_AddObject
(cherry picked from commit 224b8aaa7e)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2019-09-12 05:26:46 -07:00
Miss Islington (bot) 14afe203d6
bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040)
(cherry picked from commit 967b84c913)

Co-authored-by: Windson yang <wiwindson@outlook.com>
2019-09-12 05:25:54 -07:00
Miss Islington (bot) 648494b44a
bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456)
(cherry picked from commit 31a82e25b6)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-12 04:37:05 -07:00
Miss Islington (bot) 94a684734f
bpo-36675: Remove obsolete code. (GH-16024)
Does no longer work since Sphinx moved the trim_doctest_flag option in
the configuration.
(cherry picked from commit 2c910c1e73)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-12 04:31:17 -07:00
Stéphane Wirtel 1fc84b64f9
[3.8] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16027)
Prefer client or TLSv1_2 in examples

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

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-12 12:25:02 +01:00
Miss Islington (bot) 1e17c4d414
bpo-13927: time.ctime and time.asctime return string explantion (GH-11303)
* bpo-13927: time.ctime and time.asctime return string explantion

* Add note explaining that time.ctime and time.asctime returns a space padded date value in case it contains a single digit date

* Reformat linebreaks
(cherry picked from commit 2d32bf1ef2)

Co-authored-by: Harmandeep Singh <harmandeep.singh1@delhivery.com>
2019-09-12 03:31:43 -07:00
Miss Islington (bot) eb19c45298 Doc: Update pickle.rst (GH-14128) (GH-16014)
* Edits for readability and grammar
(cherry picked from commit 362f5350eb)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-09-12 09:19:12 +01:00
Paul Ganssle 2bb6bf0c8c bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) 2019-09-11 19:50:29 -07:00
Miss Islington (bot) f79a022d76
bpo-36270: Doc: add link to traceback object reference (GH-13119)
(cherry picked from commit 9936371af2)

Co-authored-by: Björn Meier <bjoern@opentrash.org>
2019-09-11 11:12:35 -07:00
Miss Islington (bot) c0acc0e53e Improve clarity of try-return-finally-return (GH-15677) (GH-15981)
Clarify execution in try-return-finally-return case.
(cherry picked from commit 0cc27417f2)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
2019-09-11 19:42:21 +02:00
Stéphane Wirtel 965e53a9de
[3.8] bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) (GH-15999)
https://bugs.python.org/issue37698
(cherry picked from commit 15f5a7527b)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-09-11 19:36:00 +02:00
Miss Islington (bot) d47993664e
Doc: recursive glob ** follows symlinks to directories (GH-12918)
(cherry picked from commit e24594bfe7)

Co-authored-by: Marc <Marc.Herbert+github@gmail.com>
2019-09-11 10:32:26 -07:00
Miss Islington (bot) 4cab7eb9e1 bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15990)
https://bugs.python.org/issue37750

Automerge-Triggered-By: @matrixise
(cherry picked from commit 5a56ce4a0e)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-09-11 19:09:57 +02:00
Miss Islington (bot) 05d692b08b
Doc: Fix missing negation. (GH-14640)
Reported by Hug Capella on docs@.

Automerge-Triggered-By: @matrixise
(cherry picked from commit 1fae844451)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-11 09:25:40 -07:00
Miss Islington (bot) c5a672315d bpo-36260: Add pitfalls to zipfile module documentation (GH-13378) (GH-15976)
* bpo-36260: Add pitfalls to zipfile module documentation

We saw vulnerability warning description (including zip bomb) in Doc/library/xml.rst file.
This gave us the idea of documentation improvement.

So, we moved a little bit forward :P
And the doc patch can be found (pr).

* fix trailing whitespace

* 📜🤖 Added by blurb_it.

* Reformat text for consistency.
(cherry picked from commit 3ba51d587f)

Co-authored-by: JunWei Song <sungboss2004@gmail.com>
2019-09-11 17:03:18 +01:00
Miss Islington (bot) 893653357c bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)
with the case of an existing file
(cherry picked from commit af636f4f91)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2019-09-11 17:55:31 +02:00
Miss Islington (bot) be2aa58fdc bpo-35224: Additional documentation for Assignment Expressions (GH-15935) (GH-15967)
Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis

https://bugs.python.org/issue35224

Automerge-Triggered-By: @matrixise
(cherry picked from commit 6357c95716)

Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
2019-09-11 17:12:09 +02:00
Miss Islington (bot) e784bb7c6b
bpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950)
https://bugs.python.org/issue37651

Automerge-Triggered-By: @1st1
(cherry picked from commit 7b69069e9a)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-11 08:08:47 -07:00
Miss Islington (bot) aa527174f0
Doc: Indicate locations of parse_qs, parse_qsl, escape (GH-14828)
Since they have been removed from cgi it's useful to remind people where they
can be found instead.
(cherry picked from commit 1abf54336f)

Co-authored-by: Simon Willison <swillison@gmail.com>
2019-09-11 08:04:02 -07:00
Miss Islington (bot) 2f2a867fe3
Update ftplib.all_errors documentation to match code (GH-15026)
The documentation doesn't mention the `EOFError` that https://github.com/python/cpython/blob/master/Lib/ftplib.pyGH-L66 includes
(cherry picked from commit 51adfc6ed2)

Co-authored-by: Andrew Scheller <github@loowis.durge.org>
2019-09-11 07:54:44 -07:00
Miss Islington (bot) 6cf0ba8a63 bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) (GH-15958)
(cherry picked from commit 97b817eae3)

Co-authored-by: Anjali Bansal <anjali.mca17.du@gmail.com>
2019-09-11 15:48:33 +01:00
Miss Islington (bot) 629f1f87e9 bpo-23460: Fix documentation for decimal string :g formatting (GH-11850) (GH-15954)
(cherry picked from commit 1660a61a10)

Co-authored-by: Brennan D Baraban <34765317+bdbaraban@users.noreply.github.com>
2019-09-11 16:38:25 +02:00
Miss Islington (bot) cbd7b2a399 bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582) (GH-15944)
* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
(cherry picked from commit 088a09af4b)

Co-authored-by: hui shang <shangdahao@gmail.com>
2019-09-11 15:12:54 +01:00
Miss Islington (bot) 4d2babd990 bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940)
https://bugs.python.org/issue33459

Automerge-Triggered-By: @matrixise
(cherry picked from commit dc26997109)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-11 15:38:17 +02:00
Miss Islington (bot) d1d968d45d bpo-33944: note about the intended use of code in .pth files (GH-10131) (GH-15942)
https://bugs.python.org/issue33944
(cherry picked from commit f9b5840fb4)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
2019-09-11 15:36:50 +02:00
Stéphane Wirtel c97ee1d3d8
[3.8] Doc: Use walrus operator in example. (GH-15934) (GH-15936)
(cherry picked from commit e1d455f3a3)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-11 15:17:48 +02:00
Miss Islington (bot) 43fb3bb223 bpo-35649: update http client example (GH-11441) (GH-15930)
(cherry picked from commit 62cf698142)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
2019-09-11 15:02:25 +02:00
Vinay Sajip 3b92ddb761
[3.8] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15927)
(cherry picked from commit 972cf5c06a)

Co-authored-by: Alex <a.v.shkop@gmail.com>
2019-09-11 13:39:52 +01:00
Miss Islington (bot) 01ae0e2698
Minor ReST formatting fixes in subprocess docs (GH-14876)
(cherry picked from commit 1a13efb7e0)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
2019-09-11 05:32:16 -07:00
Miss Islington (bot) e0dd713370
bpo-38103: fix conflicting labels in the docs. (GH-15906)
(cherry picked from commit 2d8d597bb8)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2019-09-11 05:28:06 -07:00
Miss Islington (bot) 44e36e8045
bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439)
(cherry picked from commit c78dae8d2b)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-11 05:24:55 -07:00
Miss Islington (bot) 0ba5dbd992 bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) (GH-15918)
* Document `unittest.IsolatedAsyncioTestCase` API
* Add a simple example with respect to order of evaluation of setup and teardown calls.

https://bugs.python.org/issue32972

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 6a9fd66f6e)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-11 14:17:14 +03:00
Miss Islington (bot) 4e914ab29f
bpo-25810: Clarify eval() docs, it does not keywords (GH-15173)
(cherry picked from commit 7a0023e8d1)

Co-authored-by: smokephil <smokephil@gmail.com>
2019-09-11 03:53:16 -07:00
Miss Islington (bot) 690a16d455
bpo-37585: Add clarification regarding comparing dict.values() (GH-14954)
(cherry picked from commit 6472ece5a0)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-11 03:46:53 -07:00
Miss Islington (bot) 80db4b4be5
bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521)
(cherry picked from commit 4576b5431b)

Co-authored-by: Anjali <anjali30malik@gmail.com>
2019-09-11 03:39:36 -07:00
Miss Islington (bot) f357cd022e bpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15893)
(cherry picked from commit efd5741ae9)

Co-authored-by: wwuck <301402+wwuck@users.noreply.github.com>
2019-09-11 07:56:10 +01:00
Miss Islington (bot) 63909cdc2f
bpo-37574: Mention helper functions for find_spec documentation (GH-14739)
(cherry picked from commit 9cbb97b29e)

Co-authored-by: jdkandersson <51036209+jdkandersson@users.noreply.github.com>
2019-09-10 10:13:55 -07:00
Miss Islington (bot) 78c3949407
Docs: Small tweaks to c-api/introGH-Include_Files (GH-14698)
(cherry picked from commit b6dafe5139)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-10 09:38:07 -07:00
Miss Islington (bot) 30a8fd7e73
Correct minor grammatical mistake in open docs (GH-15865)
(cherry picked from commit 05184515f9)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-10 09:24:06 -07:00
Miss Islington (bot) 6c588a00ed
Correct info about "f.read(size)". (GH13852)
In text mode, the "size" parameter indicates the number of characters, not bytes.
(cherry picked from commit faff81c05f)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2019-09-10 09:00:09 -07:00
Miss Islington (bot) 58ef7d341c bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15875)
(cherry picked from commit 912108891d)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-10 17:42:56 +02:00
Miss Islington (bot) 8072230882 Note regarding + mode truncation applies to both text and binary mode (GH-11314) (GH-15869)
* Improve doc on open's mode +

* Improve wording

* Address comment from Rémi
(cherry picked from commit c1d8c1cb8e)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-10 16:04:56 +01:00
Jason R. Coombs 97c2f68a4c
[3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840) (#15861)
https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21.
(cherry picked from commit 17499d8270)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2019-09-10 15:58:29 +01:00
Miss Islington (bot) 313f80192a bpo-37504: Fix documentation build with texinfo builder (GH-14606)
In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htmGH-AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.pyGH-L1129

* Doc: Add texinfo support to the Makefile
(cherry picked from commit c3d679fd39)

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
2019-09-10 15:51:43 +01:00
Steve Dower ed99bb9ca6
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383) 2019-09-10 15:31:26 +01:00
Miss Islington (bot) 5cf8155bbd bpo-21018: added missing documentation about escaping characters for configparser (GH-6137) (GH-15846)
Document how $ and % can be escaped in configparser.
(cherry picked from commit 9a94093189)

Co-authored-by: Arun Persaud <arun@nubati.net>
2019-09-10 15:32:56 +02:00
Miss Islington (bot) eaa1b09412
docs: Add references to AsyncMock in unittest.mock.patch (GH-13681)
Update the docs as patch can now return an AsyncMock if the patched
object is an async function.
(cherry picked from commit f5e7f39d29)

Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
2019-09-10 06:15:19 -07:00
Miss Islington (bot) 55daf1a561
bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] (GH-13950)
This PR deprecate explicit loop parameters in all public asyncio APIs

This issues is split to be easier to review.

fourth step: queue.py

https://bugs.python.org/issue36373
(cherry picked from commit 9008be303a)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-10 05:50:14 -07:00
Miss Islington (bot) bb8fc8bd30
bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [locks] (GH-13920)
This PR deprecate explicit loop parameters in all public asyncio APIs

This issues is split to be easier to review.

Third step: locks.py

https://bugs.python.org/issue36373
(cherry picked from commit 537877d85d)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-10 04:26:54 -07:00
Miss Islington (bot) ab74e52f76
bpo-37052: Add examples for mocking async iterators and context managers (GH-14660)
Add examples for mocking asynchronous iterators and asynchronous context managers.

https://bugs.python.org/issue37052
(cherry picked from commit c8dfa7333d)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-10 04:08:52 -07:00
Miss Islington (bot) 74b7413d3a
bpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768)
(cherry picked from commit 264e034f99)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2019-09-10 00:31:56 -07:00
Miss Islington (bot) d4391aa5eb
bpo-37383: Updates docs to reflect AsyncMock call_count after await. (GH-15761)
* bpo-351428: Updates documentation to reflect AsyncMock call_count after await.

* Adds skip and fixes warning.

* Removes extra >>>.

* Adds ... in front of await mock().
(cherry picked from commit b9f65f01fd)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2019-09-10 00:31:34 -07:00
Zachary Ware 99df5e8373
[3.8] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15816)
The "A4" pdfs were previously the wrong size due to a change in the options in Sphinx 1.5.

See also sphinx-doc/sphinxGH-5235
(cherry picked from commit b5381f6697)

Authored-by: Jean-François B <jfbu@free.fr>
2019-09-09 23:11:23 +01:00
Miss Islington (bot) c1c04cbc24
bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301)
The link we have points to the version from Unicode 6.0.0, dated 2010.
There have been numerous updates to it since then:
  https://www.unicode.org/reports/tr44/GH-Modifications

Change the link to one that points to the current version. Also, use HTTPS.
(cherry picked from commit 64c6ac74e2)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-09-09 11:41:13 -07:00
Miss Islington (bot) eadf6b8787
bpo-35803: Document and test dir=PathLike for tempfile (GH-11644)
Co-Authored-By: Ammar Askar <ammar_askar@hotmail.com>
(cherry picked from commit 370138ba9c)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2019-09-09 10:31:31 -07:00
Miss Islington (bot) 0468a85cc4
Clarify that shutil's copy functions can accept path-like values (GH-15141)
(cherry picked from commit 9488a5289d)

Co-authored-by: Boris Verhovsky <boris.verk@gmail.com>
2019-09-09 10:18:51 -07:00
Miss Islington (bot) cabcbbe7a5 bpo-36797: Fix a dead link in Doc/distutils/apiref (GH-15700) (GH-15704)
https://bugs.python.org/issue36797
(cherry picked from commit 2c2b561967)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2019-09-09 16:52:34 +02:00
Miss Islington (bot) 5e053eb98e
Fix typo in math.prod example (GH-15614)
(cherry picked from commit 1a8de82d3a)

Co-authored-by: Ashwin Vishnu <9155111+ashwinvis@users.noreply.github.com>
2019-09-09 06:42:50 -07:00
Miss Islington (bot) 252267925d
[3.8] Doc: Fix PDF build (NoUri). (GH-15739) (GH-15754)
(cherry picked from commit 63c98ed2d2)


Co-authored-by: Julien Palard <julien@palard.fr>

Automerge-Triggered-By: @JulienPalard
2019-09-09 04:29:10 -07:00
Miss Islington (bot) 6e3809c7ce
bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)
RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-09 02:07:51 -07:00
Raymond Hettinger cc1bdf91d5
[3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734) 2019-09-08 18:40:06 -07:00
Serhiy Storchaka 3be4b10749
[3.8] Correct Roman-numeral example in Unicode HOWTO. (GH-15541). (GH-15728)
(cherry picked from commit 32a960f8e1)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-09-08 13:17:24 +03:00
Miss Islington (bot) cc51a6d7c7
bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)
(cherry picked from commit 3ccdbc3338)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-09-07 00:12:34 -07:00
Miss Islington (bot) b8c66779c7 More refinements to the statistics docs (GH-15713) (GH-15715)
(cherry picked from commit d8c93aa5d2)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-05 23:19:13 -07:00
Miss Islington (bot) 7eaeddad75
Correct minor gramatical mistake in sys.settrace doc (GH-15637)
(cherry picked from commit 3038e87ba8)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-05 04:17:41 -07:00
Miss Islington (bot) f5649bfe76 bpo-36324: Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)
(cherry picked from commit 9b51570ffd)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-05 01:10:40 -07:00
Miss Islington (bot) dafbe32656 bpo-36324: Apply review comments from Allen Downey (GH-15693) (GH-15694)
(cherry picked from commit e4810b2a6c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-05 00:42:22 -07:00
Miss Islington (bot) 5e194f57c0
Fix grammar in asyncio-dev.rst (GH-15672)
Automerge-Triggered-By: @ned-deily
(cherry picked from commit 675d17cec4)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2019-09-03 23:10:45 -07:00
Miss Islington (bot) 4dd1c9d9c2
closes bpo-37966: Fully implement the UAX GH-15 quick-check algorithm. (GH-15558)
The purpose of the `unicodedata.is_normalized` function is to answer
the question `str == unicodedata.normalized(form, str)` more
efficiently than writing just that, by using the "quick check"
optimization described in the Unicode standard in UAX GH-15.

However, it turns out the code doesn't implement the full algorithm
from the standard, and as a result we often miss the optimization and
end up having to compute the whole normalized string after all.

Implement the standard's algorithm.  This greatly speeds up
`unicodedata.is_normalized` in many cases where our partial variant
of quick-check had been returning MAYBE and the standard algorithm
returns NO.

At a quick test on my desktop, the existing code takes about 4.4 ms/MB
(so 4.4 ns per byte) when the partial quick-check returns MAYBE and it
has to do the slow normalize-and-compare:

  $ build.base/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \
      -- 'unicodedata.is_normalized("NFD", s)'
  50 loops, best of 5: 4.39 msec per loop

With this patch, it gets the answer instantly (58 ns) on the same 1 MB
string:

  $ build.dev/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \
      -- 'unicodedata.is_normalized("NFD", s)'
  5000000 loops, best of 5: 58.2 nsec per loop

This restores a small optimization that the original version of this
code had for the `unicodedata.normalize` use case.

With this, that case is actually faster than in master!

$ build.base/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \
    -- 'unicodedata.normalize("NFD", s)'
500 loops, best of 5: 561 usec per loop

$ build.dev/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \
    -- 'unicodedata.normalize("NFD", s)'
500 loops, best of 5: 512 usec per loop
(cherry picked from commit 2f09413947)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-09-03 20:03:37 -07:00
Miss Islington (bot) b365cfae46 bpo-36853: Fix suspicious.py to actually print the unused rules (GH-13579) (GH-15649)
* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
(cherry picked from commit e1786b5416)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2019-09-02 12:12:19 -04:00
Miss Islington (bot) bf69e160c4 bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) (GH-15648)
Sync importlib.metadata with importlib_metadata 0.20.
(cherry picked from commit 102e9b40ff)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2019-09-02 12:11:01 -04:00
Miss Islington (bot) 6922b9e4fc bpo-37977: Warn more strongly and clearly about pickle security (GH-15595) (GH-15629)
(cherry picked from commit daa82d019c)

Co-authored-by: Daniel Pope <lordmauve@users.noreply.github.com>
2019-08-30 23:02:15 -07:00
Miss Islington (bot) 4bd1d05ee2
Fix typos mostly in comments, docs and test names (GH-15209)
(cherry picked from commit 39d87b5471)

Co-authored-by: Min ho Kim <minho42@gmail.com>
2019-08-30 13:42:54 -07:00
Miss Islington (bot) 9db66a2b5a
bpo-37979: Add alternative to fromisoformat in documentation (GH-15596)
Adds a link to `dateutil.parser.isoparse` in the documentation.

It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR.

CC: @pitrou

[bpo-37979](https://bugs.python.org/issue37979)

https://bugs.python.org/issue37979

Automerge-Triggered-By: @pitrou
(cherry picked from commit 59725f3bad)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
2019-08-29 07:54:37 -07:00
Miss Islington (bot) c71ae1a45b bpo-36743: __get__ is sometimes called without the owner argument (GH-12992) (GH-15589)
(cherry picked from commit 0dac68f1e5)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-29 02:02:51 -07:00
Miss Islington (bot) 0d45d50e42 bpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566) (GH-15587)
(cherry picked from commit 84125fed2a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-29 01:15:18 -07:00
Miss Islington (bot) 43b7ed77a8 bpo-23674: Clarify ambiguities in super() docs (GH-15564) (GH-15586)
(cherry picked from commit cd81f0500f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-29 01:02:58 -07:00
Serhiy Storchaka 097eae5b9b
[3.8] bpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH-15510) (GH-15582)
(cherry picked from commit e64f948e76)
2019-08-29 10:50:28 +03:00
Miss Islington (bot) 612d3935ec
bpo-35946: Improve assert_called_with documentation (GH-11796)
(cherry picked from commit f5896a05ed)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-08-28 23:39:47 -07:00
Miss Islington (bot) f3dca6acee bpo-25777: Wording describes a lookup, not a call (GH-15573) (GH-15576)
(cherry picked from commit 03acba6f1a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-28 23:12:13 -07:00
Miss Islington (bot) e009a91607
bpo-36167: fix an incorrect capitalization (GH-14482)
(cherry picked from commit 3aa48b88c7)

Co-authored-by: avinassh <avinassh@users.noreply.github.com>
2019-08-28 22:47:42 -07:00
Miss Islington (bot) 03c52f2f63
bpo-37951: Lift subprocess's fork() restriction (GH-15544)
(cherry picked from commit 98d90f745d)

Co-authored-by: Christian Heimes <christian@python.org>
2019-08-27 14:56:27 -07:00
Miss Islington (bot) 54449dacc4
Fix typo: Pyssize_t => Py_ssize_t (GH-15411)
(cherry picked from commit b3b9619f5e)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-26 08:54:26 -07:00
Miss Islington (bot) 522a394a72 [3.8] bpo-36917: Add default implementation of ast.NodeVisitor.visit_Constant(). (GH-15490) (GH-15509)
It emits a deprecation warning and calls corresponding method
visit_Num(), visit_Str(), etc.
(cherry picked from commit c3ea41e9bf)
2019-08-26 10:43:33 +03:00
Miss Islington (bot) c841fb9e06 bpo-15542: Documentation incorrectly suggests __init__ called after direct __new__ call (GH-15478) (GH-15506)
(cherry picked from commit 6b16d938d6)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-08-26 00:19:17 -07:00
Miss Islington (bot) 352a1239ff
Doc: Keep the venv/* exclude pattern. (GH-15229)
In case it has been previously created.
(cherry picked from commit 73e0549701)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-08-25 23:19:45 -07:00
Nick Coghlan 6ca030765d
[3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491)
- drop TargetScopeError in favour of raising SyntaxError directly
  as per the updated PEP 572
- comprehension iteration variables are explicitly local, but
  named expression targets in comprehensions are nonlocal or
  global. Raise SyntaxError as specified in PEP 572
- named expression targets in the outermost iterable of a
  comprehension have an ambiguous target scope. Avoid resolving
  that question now by raising SyntaxError. PEP 572
  originally required this only for cases where the bound name
  conflicts with the iteration variable in the comprehension,
  but CPython can't easily restrict the exception to that case
  (as it doesn't know the target variable names when visiting
  the outermost iterator expression)

(cherry picked from commit 5dbe0f59b7)
2019-08-26 00:41:47 +10:00
Miss Islington (bot) 970548c00b bpo-37905: Improve docs for NormalDist (GH-15486) (GH-15487)
(cherry picked from commit 8371799e30)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-25 01:04:24 -07:00
Miss Islington (bot) ffe43b2095
[3.8] Clarify argument types in datetime docs. (GH-15459) (GH-15472)
"Arguments may be integers... " could be misunderstand as they also
could be strings.

New wording makes it clear that arguments have to be integers.

modified:   Doc/library/datetime.rst



Automerge-Triggered-By: @pganssle
(cherry picked from commit c5218fce02)


Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>

Automerge-Triggered-By: @pganssle
2019-08-24 12:57:50 -07:00
Miss Islington (bot) a8424940b4 bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465) (GH-15469)
(cherry picked from commit 69ee87e99c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-24 11:33:18 -07:00
Miss Islington (bot) 0ad85681de bpo-32118: Simplify docs for sequence comparison (GH-15450) (#15466)
(cherry picked from commit edd21129dd)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-24 10:53:09 -07:00
Miss Islington (bot) 076d0b9f5d
bpo-29535: Remove promize about hash randomization of datetime objects. (GH-15269)
(cherry picked from commit e9c90aa431)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-08-24 03:19:51 -07:00
Miss Islington (bot) 7784d4bb15
Fix funny typo in Doc/bugs. (GH-15412)
Fix typo in description of link to mozilla bug report writing guidelines.

Though the URL is misleading, we're indeed trying to write bug _reports_, not to add bugs.

Automerge-Triggered-By: @ned-deily
(cherry picked from commit e17f201cd9)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
2019-08-23 21:16:28 -07:00
Miss Islington (bot) 761e5a7c7f bpo-26589: Add http status code 451 (GH-15413) (GH-15436)
(cherry picked from commit 8f080b0995)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-23 10:56:44 -07:00
Miss Islington (bot) 9cbdce3917
bpo-36763, doc: Add links in the new C API init doc (GH-15433)
(cherry picked from commit 1beb7c3de9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-23 10:05:59 -07:00
Miss Islington (bot) a6427cb2a2
bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)
(cherry picked from commit 3842f2997f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-23 09:24:42 -07:00
Miss Islington (bot) 994925b2cb
Correct minor grammar mistake (GH-15404)
(cherry picked from commit d288b29fc6)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-08-23 03:06:27 -07:00
Miss Islington (bot) b6341e676a bpo-30826: Improve control flow examples (GH-15407) (GH-15410)
(cherry picked from commit 6fcb6cfb13)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 23:52:12 -07:00
Miss Islington (bot) f6a7f5bc50 bpo-12634: Clarify an awkward section of the tutorial (GH-15406) (GH-15409)
(cherry picked from commit 483ae0cf1d)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 23:45:57 -07:00
Miss Islington (bot) 4a40498ea9 bpo-30550: Clarify JSON ordering guarantees (GH-15397) (GH-15403)
(cherry picked from commit 657008ea03)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 15:50:32 -07:00
Miss Islington (bot) cb8de91dad bpo-14050: Note that not all data can be sorted (GH-15381) (GH-15395)
(cherry picked from commit 4109263a7e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 09:39:52 -07:00
Miss Islington (bot) 2878f378e0
bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388)
(cherry picked from commit a38e9d1399)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-22 08:59:18 -07:00
Steve Dower 9eb3d54639
bpo-37834: Normalise handling of reparse points on Windows (GH-15370)
bpo-37834: Normalise handling of reparse points on Windows
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)
* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)
* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)
* nt.readlink() will read destinations for symlinks and junction points only

bpo-1311: os.path.exists('nul') now returns True on Windows
* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
2019-08-21 15:52:42 -07:00
Miss Islington (bot) c30c869e8d
bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287)
(cherry picked from commit 75e064962e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-08-21 14:09:33 -07:00
Miss Islington (bot) 349d897e0f Update asyncio.ensure_future() documentation (GH-15347) (GH-15364)
Added back mention that ensure_future actually scheduled obj. This documentation just mentions what ensure_future returns, so I did not realize that ensure_future also schedules obj.
(cherry picked from commit 092911d5c0)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2019-08-21 13:20:49 -04:00
Miss Islington (bot) c777dec6f4
bpo-37823: Fix open() link in telnetlib doc (GH-15281)
Fixed wrong link to Telnet.open() method in telnetlib documentation.
(cherry picked from commit e0b6117e27)

Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
2019-08-21 04:38:04 -07:00
Miss Islington (bot) 9aa0ab1a97
Remove 'unstable' warning for Windows Store package in docs (GH-15334)
(cherry picked from commit cf9360e524)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-08-19 10:14:31 -07:00
Greg Price 8c1c426a63 bpo-36502: Correct documentation of str.isspace() (GH-15019) (GH-15296)
The documented definition was much broader than the real one:
there are tons of characters with general category "Other",
and we don't (and shouldn't) treat most of them as whitespace.

Rewrite the definition to agree with the comment on
_PyUnicode_IsWhitespace, and with the logic in makeunicodedata.py,
which is what generates that function and so ultimately governs.

Add suitable breadcrumbs so that a reader who wants to pin down
exactly what this definition means (what's a "bidirectional class"
of "B"?) can do so.  The `unicodedata` module documentation is an
appropriate central place for our references to Unicode's own copious
documentation, so point there.

Also add to the isspace() test a thorough check that the
implementation agrees with the intended definition.
2019-08-19 10:53:22 +01:00
Miss Islington (bot) 7309cca147
[3.8] fix link to time function from time_ns doc (GH-15285) (GH-15321)
Because mod, func, class, etc all share one namespace, :func:time creates a link to the time module doc page rather than the time.time function.
(cherry picked from commit 1b1d0514ad)


Co-authored-by: Éric Araujo <merwok@netwok.org>

Automerge-Triggered-By: @merwok
2019-08-17 13:51:57 -07:00
Miss Islington (bot) f991912146
bpo-37256: Wording in Request class docs (GH-14792)
* bpo-37256: Wording in Request class docs

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Documentation/2019-07-16-14-48-12.bpo-37256.qJTrBb.rst

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 38c7199beb)

Co-authored-by: Ngalim Siregar <ngalim.siregar@gmail.com>
2019-08-16 01:27:35 -07:00
Miss Islington (bot) dbe4c286ce
bpo-37775: Update compileall doc for invalidation_mode parameter (GH-15148)
(cherry picked from commit 68e495df90)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-08-14 15:22:02 -07:00
Miss Islington (bot) 6ad902a088
bpo-37814: Document the empty tuple type annotation syntax (GH-15208)
https://bugs.python.org/issue37814:

> The empty tuple syntax in type annotations, `Tuple[()]`, is not obvious from the examples given in the documentation (I naively expected `Tuple[]` to work); it has been documented in PEP 484 and in mypy, but not in the documentation for the typing module.

https://bugs.python.org/issue37814
(cherry picked from commit 8a784af750)

Co-authored-by: Josh Holland <anowlcalledjosh@gmail.com>
2019-08-13 12:12:55 -07:00
Raymond Hettinger 9bedb8c9e6
bpo-37759: Second round of edits to Whatsnew 3.8 (GH-15204) (GH-15240)
(cherry picked from commit 66a34d35e4)
2019-08-12 18:02:58 -07:00
Miss Islington (bot) 2f087e279b Fix docs for assert_called and assert_called_once (GH-15219)
(cherry picked from commit f9590edfea)

Co-authored-by: Ismail S <ismail-s@users.noreply.github.com>
2019-08-12 09:19:47 +01:00
Miss Islington (bot) 5ba1cb0393 bpo-37819: Add Fraction.as_integer_ratio() (GH-15212) (GH-15215)
(cherry picked from commit f03b4c8a48)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-11 15:02:23 -07:00
Serhiy Storchaka 4c5b6bac24 [3.8] bpo-32912: Revert SyntaxWarning on invalid escape sequences (GH-15142)
* bpo-32912: Revert warnings for invalid escape sequences.

DeprecationWarning will continue to be emitted for invalid escape sequences in string and bytes literals in 3.8 just as it did in 3.7.

SyntaxWarning may be emitted in the future. But per mailing list discussion, we don't yet know when because we haven't settled on how to do so in a non-disruptive manner.
2019-08-09 15:34:22 -07:00
Miss Islington (bot) 5925b7d555 bpo-35892: Add usage note to mode() (GH-15122) (GH-15176)
(cherry picked from commit e43e7ed364)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-08 01:36:55 -07:00
Miss Islington (bot) 1a3a40c1cb bpo-37004: Documented asymmetry of string arguments in difflib.SequenceMatcher for ratio method (GH-13482) (#15157)
https://bugs.python.org/issue37004
(cherry picked from commit e9cbcd0018)

Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
2019-08-07 11:39:14 -04:00
Miss Islington (bot) 9341dcb4b9 bpo-37646: Document that eval() cannot access nested scopes (GH-15117) (GH-15155)
(cherry picked from commit 610a4823cc)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-06 18:07:59 -07:00
Miss Islington (bot) ef0b81927a
Improve signal documentation (GH-14274)
* add a missing ``.. availability::`` reST explicit markup;
* more consistent "see man page" sentences.
(cherry picked from commit cfebfef2de)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-08-06 14:53:27 -07:00
Miss Islington (bot) 26f91db5ba bpo-37759: First round of major edits to Whatsnew 3.8 (GH-15127) (GH-15139)
(cherry picked from commit 4f9ffc9d1a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-05 15:22:13 -07:00
Miss Islington (bot) 9c95fc752c
bpo-37748: Re-order the Run menu. (GH-15115)
Put the most common choice, Run Module, at the top.
(cherry picked from commit 14070299cd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-04 14:04:49 -07:00
Miss Islington (bot) fc6e3bc1cd Update itertools docs (GH-15114) (GH-15118)
* Remove suggestion that is less relevant now that global lookups are much faster
* Add link for installing the recipes
(cherry picked from commit adf02b36b3)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-04 13:52:59 -07:00
Miss Islington (bot) dd5f8abb54
bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062)
(cherry picked from commit ed5e8e06cb)

Co-authored-by: David H <dheiberg@mozilla.com>
2019-08-04 06:43:30 -07:00
Miss Islington (bot) dde944f9df
bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)
There was a discrepancy between the Python and C implementations.

Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
(cherry picked from commit 17e52649c0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-08-04 03:01:55 -07:00
Miss Islington (bot) 375f35be06 bpo-36487: Make C-API docs clear about what the main interpreter is. (gh-15080)
(cherry picked from commit 854d0a4b98) (gh-12666)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-08-02 11:49:38 -06:00
Miss Islington (bot) dcc53ebbff bpo-37726: Prefer argparse over getopt in stdlib tutorial (GH-15052) (#15070)
(cherry picked from commit 2491134029)

Co-authored-by: mental <m3nta1@yahoo.com>
2019-08-01 07:34:57 -07:00
Miss Islington (bot) 29a3a33d99
bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)
(cherry picked from commit 1b29af83bc)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-31 08:04:31 -07:00
Miss Islington (bot) d8b914a30b
bpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646)
Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.

This adds the following constants with a CAN_BCM prefix:

  * SETTIMER
  * STARTTIMER
  * TX_COUNTEVT
  * TX_ANNOUNCE
  * TX_CP_CAN_ID
  * RX_FILTER_ID
  * RX_CHECK_DLC
  * RX_NO_AUTOTIMER
  * RX_ANNOUNCE_RESUME
  * TX_RESET_MULTI_IDX
  * RX_RTR_FRAME
  * CAN_FD_FRAME

The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.
(cherry picked from commit 31c4fd2a10)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
2019-07-31 02:10:38 -07:00
Miss Islington (bot) 9b9cac4e5d Refined Qt GUI example in the logging cookbook. (GH-15045) (GH-15046)
(cherry picked from commit 472eced677)
2019-07-31 07:58:46 +01:00
Miss Islington (bot) 9e044ddefd
bpo-33821: Update IDLE section of What's New 3.7 (GH-15036)
* bpo-33821: Update IDLE section of What's New 3.7

* Fix roles.
(cherry picked from commit 5982b7201b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-30 22:23:05 -07:00
Miss Islington (bot) c7236b498f
bpo-33822: Add IDLE section of What's New 3.8 (GH-15035)
* bpo-33822: Add IDLE section of What's New 3.8

* Fix role.
(cherry picked from commit a72ca90eb9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-30 22:16:45 -07:00
Miss Islington (bot) 7026737d77
bpo-36084: Add threading Native ID information to What's New documentation (GH-14845)
(cherry picked from commit 84846b0187)

Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
2019-07-30 14:49:23 -07:00
Miss Islington (bot) 69372eea08
Remove trailing .0 from version changed note (GH-14987)
(cherry picked from commit 17a058ed6f)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2019-07-28 04:48:26 -07:00
Miss Islington (bot) 76821bab9c bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) (GH-14984)
(cherry picked from commit 6b5f1b496f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-27 14:26:58 -07:00
Miss Islington (bot) d38fa58695 Add Qt GUI example to the logging cookbook. (GH-14978) (GH-14979)
(cherry picked from commit 1ed915e8ae)
2019-07-27 14:04:13 +01:00
Miss Islington (bot) 06e8fc95d1
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
(cherry picked from commit 91e4957509)

Co-authored-by: Derek Keeler <d3r3kk@users.noreply.github.com>
2019-07-26 15:04:28 -07:00
Steve Dower 886e66d111
bpo-35524: Update Windows installer image in docs (GH-14966) 2019-07-26 13:39:51 -07:00
Miss Islington (bot) c594c274e9
Swap 'if' branches so content matches to condition in importlib example (GH-14947)
Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.

(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 544fa15ea1)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2019-07-25 10:27:59 -07:00
Miss Islington (bot) 6367391646 [3.8] bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) (GH-14935)
* Fix the formatting in the documentation of the tostring() functions.

* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.

* bpo-34160: Add an explanation of how users should deal with the attribute order.
(cherry picked from commit a3697db010)

Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
2019-07-24 20:32:56 +02:00
Miss Islington (bot) eb62274ed6
[3.8] Touch up venv docs (GH-14922) (GH-14923)
(cherry picked from commit 2f224a077a)


Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>

Automerge-Triggered-By: @brettcannon
2019-07-24 10:14:53 -07:00
Miss Islington (bot) 1da6a313dd
bpo-17535: IDLE editor line numbers (GH-14030)
(cherry picked from commit 7123ea009b)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-23 06:04:13 -07:00
Miss Islington (bot) 5b398520a8 Update logging cookbook to show multiple worker processes using the concurrent.futures module. (GH-14905) (GH-14906)
(cherry picked from commit d309352c6f)
2019-07-22 13:25:46 +01:00
Kyle Stanley 24b5b360fa [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)
(cherry picked from commit 96e12d5f4f)

Co-authored-by: Min ho Kim <minho42@gmail.com>
2019-07-21 22:48:45 -04:00
Miss Islington (bot) 0104841d12 Add examples to elucidate the formulas (GH-14898) (GH-14899)
(cherry picked from commit b530a4460b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-21 16:39:08 -07:00
Miss Islington (bot) 8f501647ca
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)
(cherry picked from commit 22f0483d44)

Co-authored-by: Ned Deily <nad@python.org>
2019-07-21 11:08:57 -07:00
Miss Islington (bot) a50a6225a0 bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858)
(cherry picked from commit 8dbe563aa6)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-19 02:17:21 -07:00
Miss Islington (bot) 840352455d
bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)
Move the Editors and IDE section out of the Unix section, to its own section.

https://bugs.python.org/issue37610
(cherry picked from commit 8f040b7a9f)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
2019-07-18 18:31:41 -07:00
Miss Islington (bot) 35d36dacd4
Docs: Correct formatting of a multiline code block (GH-13806)
(cherry picked from commit bd26a4466b)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
2019-07-17 01:32:53 -07:00
Miss Islington (bot) 86742d4ce8
Replace backquote with command substitution in subprocess doc example (GH-13941)
Replace backquotes with POSIXy command substitution in example.
(cherry picked from commit 6a61714cde)

Co-authored-by: David Jones <drj@pobox.com>
2019-07-16 08:05:39 -07:00
Miss Islington (bot) 1ff4c42774
bpo-37284: Add note to sys.implementation doc (GH-14328)
Add a brief note to indicate that any new required attributes must go through the PEP process.

https://bugs.python.org/issue37284
(cherry picked from commit 52693c10e8)

Co-authored-by: Giovanni Cappellotto <gcappellotto@fb.com>
2019-07-15 07:45:12 -07:00
Miss Islington (bot) 7a430109b9 bpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765)
(cherry picked from commit 40d2226a69)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-14 10:53:18 +02:00
Miss Islington (bot) 4f733f48b4
bpo-37571: Remove extra space in ctypes docs (GH14764)
(cherry picked from commit 68c74d05c1)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-07-14 01:22:57 -07:00
Miss Islington (bot) e7c114df38
bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 6b929580eb)

Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
2019-07-14 01:07:06 -07:00
Miss Islington (bot) 262779fb50
bpo-36261: Improve example of the preamble field in email docs (GH-14751)
(cherry picked from commit 8efade91b1)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2019-07-14 00:53:15 -07:00
Miss Islington (bot) b1e4d1b603 bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759)
The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytestGH-5469, so a backport to at least 3.8 would be great 😄
And this is my first PR to CPython, so please let me know if I've missed anything!

https://bugs.python.org/issue26967
(cherry picked from commit dffca9e925)

Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
2019-07-14 07:59:56 +02:00
Miss Islington (bot) b815669c83
bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163)
Hi,

I've faced an issue w/ `mailbox.Maildir()`. The case is following:
1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty
2. I pass that folder path as an argument when instantiating `mailbox.Maildir()`
3. Then I receive an exception happening because "there's no such file or directory" (namely `cur`, `tmp` or `new`) during interaction with Maildir

**Expected result:** subdirs are created during `Maildir()` instance creation.

**Actual result:** subdirs are assumed as existing which leads to exceptions during use.

**Workaround:** remove the actual dir before passing the path to `Maildir()`. It will be created automatically with all subdirs needed.

**Fix:** This PR. Basically it adds creation of subdirs regardless of whether the base dir existed before.

https://bugs.python.org/issue30088
(cherry picked from commit e44184749c)

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2019-07-13 07:59:48 -07:00
Miss Islington (bot) 5da83b417e
bpo-37580: Fix typo in http.cookiejar documentation (GH-14731)
[bpo-37580](https://bugs.python.org/issue37580): Markup typo in http.cookiejar doc

https://bugs.python.org/issue37580
(cherry picked from commit b5bbb8a740)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.de>
2019-07-13 03:24:48 -07:00
Miss Islington (bot) 25d371ab74
Fix typo in re.escape documentation (GH-14722)
(cherry picked from commit fb6c1f8d3b)

Co-authored-by: Robert DiPietro <rdipietro@gmail.com>
2019-07-13 01:42:25 -07:00
Miss Islington (bot) bfb709b771
[3.8] bpo-37521: No longer treat insertion into sys.modules as optional in importlib examples (GH-14723) (GH-14724)
Fix importlib examples to insert any newly created modules via importlib.util.module_from_spec() immediately into sys.modules instead of after calling loader.exec_module().

Thanks to Benjamin Mintz for finding the bug.


https://bugs.python.org/issue37521
(cherry picked from commit 0827064c95)


Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>


https://bugs.python.org/issue37521
2019-07-12 15:51:48 -07:00
Miss Islington (bot) 107171500d
closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692)
https://bugs.python.org/issue37554
(cherry picked from commit 7cbef72902)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2019-07-11 10:45:36 -07:00
Miss Islington (bot) dc0b6af42e
bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499)
(cherry picked from commit 79042ac434)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-11 07:16:03 -07:00
Miss Islington (bot) aca8297763
Document default parameter of .seek() in the signature. (GH-14691)
(cherry picked from commit 2a3d4d9c53)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-07-10 19:49:49 -07:00
Miss Islington (bot) 58f2c7f424 bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666)
Context manager catching threading.Thread exception using
threading.excepthook.
(cherry picked from commit 91b4f7ab7f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-09 13:35:59 +02:00
Miss Islington (bot) 54348f46f8
Doc: Fix example title. (GH-14639)
(cherry picked from commit 66b4150f6f)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-07-08 14:17:32 -07:00
Miss Islington (bot) 975d4d3651
Doc: Fix: Proper UpperCamelCase and lowercase. (GH-14644)
Initial report by Michael Blankenship on docs@
(cherry picked from commit 2da622ff77)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-07-08 14:13:57 -07:00
Miss Islington (bot) 3f7d0c9665
bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615)
(cherry picked from commit f6cdd3ff68)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-07 08:46:46 -07:00
Miss Islington (bot) e414aa9cb0
bpo-37478: Add missing 'and'. (GH-14631)
(cherry picked from commit a9b40e4546)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 19:50:48 -07:00
Miss Islington (bot) 4e6bfc4c60 bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14629)
(cherry picked from commit 0717b4d9b3)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-07-06 22:18:50 -04:00
Miss Islington (bot) 90631f9bc5 bpo-37456: Slash ('/') is now part of syntax. (GH-14627) (GH-14628)
(cherry picked from commit 6f2a8c0857)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 18:25:47 -04:00
Miss Islington (bot) ad3720359f bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14624)
0 is a legal index.
(cherry picked from commit f8709e804d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 17:54:56 -04:00
Miss Islington (bot) d4af55391f
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
This is done to compensate for the extra stack frames added by
IDLE itself, which cause problems when setting the recursion limit
to low values.

This wraps sys.setrecursionlimit() and sys.getrecursionlimit()
as invisibly as possible.
(cherry picked from commit fcf1d003bf)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-07-06 05:54:17 -07:00
Miss Islington (bot) ea9c8caa13
bpo-37149: Replace dead link for online Tkinter reference (GH-14616)
Also fix a name misspelling.
(cherry picked from commit 45bc61b971)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-05 23:38:30 -07:00
Miss Islington (bot) cf294c48e4
closes bpo-37508: Fix name of type in memory.rst. (GH-14604)
(cherry picked from commit 39a5d17a7f)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-05 21:09:57 -07:00
Miss Islington (bot) b4cd6ba1a0
bpo-37481: Deprecate distutils bdist_wininst command (GH-14553)
The distutils bdist_wininst command is now deprecated, use
bdist_wheel (wheel packages) instead.
(cherry picked from commit 1da4462765)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-05 02:03:23 -07:00
Miss Islington (bot) c3ef1a5244
Use OSError subclasses in os documentation (GH-14262)
(cherry picked from commit a55f75a6e3)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
2019-07-05 01:48:21 -07:00
Miss Islington (bot) 070d3d928d bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14580)
* bpo-37459: importlib docs improperly reference get_resource_loader()
(cherry picked from commit b607d992e7)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
2019-07-03 18:27:40 -07:00
Miss Islington (bot) b8e198a5d0
bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)
(cherry picked from commit aeecf38066)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-02 19:04:29 -07:00
Miss Islington (bot) 746992c1ae
bpo-37363: Add audit events on startup for the run commands (GH-14524)
(cherry picked from commit e226e83d36)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-07-01 16:22:29 -07:00
Miss Islington (bot) 91f9f098fc bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14533)
(cherry picked from commit 0f4e813282)
2019-07-01 20:53:39 +01:00
Miss Islington (bot) 6cde61369e bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14525)
(cherry picked from commit e6b64b756f)
2019-07-01 19:53:28 +01:00
Miss Islington (bot) 96f581cf9d
bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)
(cherry picked from commit 36242fd871)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-01 10:39:58 -07:00
Miss Islington (bot) 59ec9ee4d7
bpo-36168: Lowercase the word "subsequent" in get_value doc (GH-14485)
Subsequent -> subsequent

https://bugs.python.org/issue36168
(cherry picked from commit 12b436e3b0)

Co-authored-by: Krishna Oza <krishoza15sep@gmail.com>
2019-07-01 09:30:48 -07:00
Miss Islington (bot) e224d2865a bpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503) (GH-14512)
(cherry picked from commit ec6c1bd049)

Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
2019-07-01 16:05:02 +02:00
Miss Islington (bot) be5bb52f5f
bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506)
bdist_wininst depends on MBCS codec, unavailable on non-Windows,
and bdist_wininst have not worked since at least Python 3.2, possibly
never on Python 3.

Here we document that bdist_wininst is only supported on Windows,
and we mark it unsupported otherwise to skip tests.

Distributors of Python 3 can now safely drop the bdist_wininst .exe files
without the need to skip bdist_wininst related tests.
(cherry picked from commit 72cd653c4e)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2019-07-01 05:54:19 -07:00
Miss Islington (bot) 3db5c5c763 bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) (GH-14507)
(cherry picked from commit 84de34e39e)
2019-07-01 13:12:08 +01:00
Miss Islington (bot) cb083f7cdf bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New as a compatibility wrapper (GH-13959) (#14505)
Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper
(cherry picked from commit 4a2edc34a4)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-07-01 13:29:14 +02:00
Miss Islington (bot) ee72dda961
[3.8] bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448) (GH-14495)
Post-handshake authentication is required for conditional client cert authentication with TLS 1.3.


https://bugs.python.org/issue37440
(cherry picked from commit d1bd6e79da)


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


https://bugs.python.org/issue37440
2019-07-01 00:07:44 -07:00
Miss Islington (bot) bf8cb31803
bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread (GH-14344)
(cherry picked from commit 0d671c04c3)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-06-30 03:22:34 -07:00
Miss Islington (bot) 3e133c401a
bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469)
* Added documentation for textwrap.dedent behavior.
* Remove an obsolete note about pre-2.5 behavior from the docstring.
(cherry picked from commit eb97b9211e)

Co-authored-by: tmblweed <tmblweed@users.noreply.github.com>
2019-06-29 21:40:41 -07:00
Miss Islington (bot) 0cba121029
bpo-37403: Touch up venv docs (GH-14458)
Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.
(cherry picked from commit f9f8e3ce70)

Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
2019-06-28 12:36:09 -07:00
Miss Islington (bot) ad00640f93
bpo-37432: Doc: Fix signature of PyObject_Del() (GH-14430)
(cherry picked from commit b4bee03087)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-06-28 02:16:36 -07:00
Miss Islington (bot) 4fee28aa42
bpo-37390: Add audit event table to documentations (GH-14406)
Also updates some (unreleased) event names to be consistent with the others.
(cherry picked from commit 44f91c388a)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-06-27 11:07:16 -07:00
Steve Dower af7282e129
Improve Windows commands in tutorial (GH-14400) 2019-06-26 09:41:45 -07:00
Miss Islington (bot) 63429c839b
bpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)
The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.

os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.
(cherry picked from commit 689830ee62)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-26 09:14:30 -07:00
Steve Dower 25fbe33b92
bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes (GH-14375) 2019-06-25 08:20:43 -07:00
Miss Islington (bot) 8d6668c92b
Fix minor spelling error in What's new for Python 3.8 (GH-14371)
(cherry picked from commit de9b606c90)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-06-25 04:02:49 -07:00
Miss Islington (bot) ced9e11931
bpo-35224: Add What's new entry for evaluation order in dict comprehensions (GH-14319)
(cherry picked from commit b51b7137fa)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-06-24 18:49:07 -07:00
Miss Islington (bot) 7268fd0d21
bpo-36889: Document asyncio Stream and StreamServer (GH-14203)
(cherry picked from commit 6793cce155)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-06-24 11:33:11 -07:00
Miss Islington (bot) 8763d43a95
bpo-37363: Add audit events for a range of modules (GH-14301)
(cherry picked from commit 60419a7e96)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-06-24 09:09:47 -07:00
Miss Islington (bot) 2e0ec5b4b7
asyncio: Fix docs for default event loop (GH-14308)
When the Windows default event loop changed, `asyncio-policy.rst` was updated but `asyncio-eventloop.rst` was missed.
(cherry picked from commit 9ffca670ed)

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2019-06-23 17:33:00 -07:00
Miss Islington (bot) 874ff65e0a
bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)
… as proposed in PEP 572; key is now evaluated before value.

https://bugs.python.org/issue35224
(cherry picked from commit c8a35417db)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
2019-06-22 15:34:03 -07:00
Steve Dower fa23bd286f
bpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276) 2019-06-22 14:08:02 -07:00
Victor Stinner b0338be5d2
Update What's New in Python 3.8 (GH-14253) (GH-14294)
Fix bpo number of PyByteArray_Init removal

(cherry picked from commit c68e3fb15d)
2019-06-21 23:15:27 +02:00
Mariatta 52c4a4fb81 [3.8] bpo-32924: Fix the Show Source url in 3.8 documentation. (GH-14282)
The "Show Source" link in Python 3.8 docs is pointing
to the master branch. It should point to the 3.8 branch.



https://bugs.python.org/issue32924
2019-06-21 11:06:26 -07:00
Miss Islington (bot) 6258c1f716
bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)
It was listed as `binaryfunc`. It should be `unaryfunc`.
(cherry picked from commit bc5caf88ca)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-06-19 20:41:41 -07:00
Miss Islington (bot) 67cf0ae78a
Update What's New in Python 3.8 (GH-14239)
* Mention issue in which ByByteArray_Init() has been removed.
* Fix typo
(cherry picked from commit af41c567af)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-19 16:52:47 -07:00
Miss Islington (bot) 444c78a927
Add missing single quote in io.TextIOWrapper.reconfigure documentation (GH-14246)
Add a missing single quote character in the documentation for `io.TextIOWrapper.reconfigure`.
(cherry picked from commit 35068bd059)

Co-authored-by: Harmon <Harmon758@gmail.com>
2019-06-19 14:14:49 -07:00
Miss Islington (bot) d7232f0e46 bpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234) (GH-14235)
(cherry picked from commit f06b569305)
2019-06-19 15:42:35 +01:00
Miss Islington (bot) 95ff622028 bpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229) (GH-14230)
(cherry picked from commit 0150001653)
2019-06-19 14:46:55 +01:00
Miss Islington (bot) fff695b9ab
Document typing.ForwardRef (GH-14216)
(cherry picked from commit 809ff1181c)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-06-18 17:38:43 -07:00
Miss Islington (bot) 45da7437f5
[3.8] bpo-33416: Document changes in PyNode_AddChild and PyParser_AddToken (GH-14214) (GH-14215)
I didn't find any entries in the docs about these functions, so I just mentioned them, in "What's New".
(cherry picked from commit 47c2de7725)


Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>


https://bugs.python.org/issue33416
2019-06-18 17:33:34 -07:00
Miss Islington (bot) 35aa0b0ced
bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)
For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.

This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.

bpo-34903
(cherry picked from commit 6b9c204ee7)

Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
2019-06-18 12:21:27 -07:00
Miss Islington (bot) ae526ee320
bpo-5680: IDLE: Customize running a module (GH-13763)
The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
(cherry picked from commit 201bc2d18b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-06-17 19:47:55 -07:00
Miss Islington (bot) 4b68a8eb0d bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) (GH-14168)
Measure required height by quickly maximizing once per screen.
A search for a better method failed.
(cherry picked from commit 5bff3c86ab)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-06-17 16:15:53 -04:00
Victor Stinner 71031cf4ed
bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14157)
Mention explicitly that PyObject_CallXXX() functions raise an
exception an failure.

(cherry picked from commit 1ce2656f13)
2019-06-17 15:23:59 +02:00
Miss Islington (bot) e784f9f1c3
bpo-28805: document METH_FASTCALL (GH-14079)
(cherry picked from commit 5600b5e1b2)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
2019-06-16 16:25:37 -07:00
Miss Islington (bot) b0cb988420
Doc: Remove an ugly space before a dot. (GH-14123)
(cherry picked from commit 552951563c)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-06-16 01:32:30 -07:00
Miss Islington (bot) a8e7ebe288
Doc: Deprecation header: More precise wording. (GH-14109)
(cherry picked from commit cfa0394b97)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-06-15 11:42:45 -07:00
Miss Islington (bot) 298023633f
bpo-36785: PEP 574 What's New entry (GH-13931)
(cherry picked from commit c879ff247a)

Co-authored-by: Antoine Pitrou <antoine@python.org>
2019-06-15 09:02:57 -07:00
Miss Islington (bot) 6887814069
Update weakref.rst (GH-14098)
(cherry picked from commit f475729a71)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-06-15 04:49:43 -07:00
Miss Islington (bot) 3fde750cc4
bpo-36707: Document "m" removal from sys.abiflags (GH-14090)
(cherry picked from commit 7efc526e5c)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-14 18:31:44 -07:00
Steve Dower f78e66c3c9
Implement Windows release builds in Azure Pipelines (GH-14065)
Includes backported fixes from GH-14091
2019-06-14 14:20:16 -07:00
Miss Islington (bot) 322281e7ca
Document C API changes in What's New in Python 3.8 (GH-14092)
(cherry picked from commit bd5798f6d4)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-14 10:51:32 -07:00
Miss Islington (bot) 3b976d19c8
bpo-37261: Document sys.unraisablehook corner cases (GH-14059)
Document reference cycle and resurrected objects issues in
sys.unraisablehook() and threading.excepthook() documentation.

Fix test.support.catch_unraisable_exception(): __exit__() no longer
ignores unraisable exceptions.

Fix test_io test_writer_close_error_on_close(): use a second
catch_unraisable_exception() to catch the BufferedWriter unraisable
exception.
(cherry picked from commit 212646cae6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-14 09:59:54 -07:00
Miss Islington (bot) 047fa1ddae
Update concurrent.futures.rst (GH-14061)
This PR adds missing details in the [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html) documentation:

* the mention that `Future.cancel` also returns `False` if the call finished running;
* the mention of the states for `Future` that did not complete: pending or running.
(cherry picked from commit 431478d5d7)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-06-14 08:11:04 -07:00
Miss Islington (bot) 886d83e5aa
bpo-37077: Add native thread ID (TID) for AIX (GH-13624)
This is the followup  for issue36084

https://bugs.python.org/issue37077
(cherry picked from commit d0eeb936d8)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2019-06-13 15:54:04 -07:00
Miss Islington (bot) ec3839a215
bpo-6689: os.path.commonpath raises ValueError for different drives isn't documented (GH-14045)
It would raise ValueError("Paths don't have the same drive") if the paths on different drivers, which is not documented.

os.path.commonpath raises ValueError when the *paths* are in different drivers, but it is not documented.
Update the document according @Windsooon 's suggestion.
It actually raise ValueError according line 355 of [test of path](https://github.com/python/cpython/blob/master/Lib/test/test_ntpath.py)

https://bugs.python.org/issue6689
(cherry picked from commit 95492032c4)

Co-authored-by: Makdon <makdon@makdon.me>
2019-06-13 07:12:49 -07:00
Miss Islington (bot) b4f5b21253
bpo-37261: Fix support.catch_unraisable_exception() (GH-14052)
The __exit__() method of test.support.catch_unraisable_exception
context manager now ignores unraisable exception raised when clearing
self.unraisable attribute.
(cherry picked from commit 6d22cc8e90)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-13 06:25:59 -07:00
Victor Stinner f9445a391e
[3.8] bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019) (GH-14038)
* Update PyCompilerFlags structure documentation.
* Document the new cf_feature_version field in the Changes in the C
  API section of the What's New in Python 3.8 doc.

(cherry picked from commit 2c9b498759)
2019-06-13 02:40:41 +02:00
Miss Islington (bot) c9ca96dd96
bpo-37160: Thread native ID NetBSD support (GH-13835)
(cherry picked from commit 5287022eee)

Co-authored-by: David Carlier <dcarlier@afilias.info>
2019-06-12 09:03:04 -07:00