Commit Graph

22646 Commits

Author SHA1 Message Date
Miss Skeleton (bot) d8fc9c843e
Add missing asyncio changes from 3.8 whatsnew (GH-16911)
(cherry picked from commit 3bbb6db545)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-10-23 21:22:06 -07:00
Miss Skeleton (bot) c54b54b49d Spell Bitbucket correctly. (GH-16862) (GH-16898)
(cherry picked from commit d34ac30532)

Co-authored-by: Peter Bittner <django@bittner.it>
2019-10-23 15:18:10 +03:00
Miss Skeleton (bot) e113b5c3e7
Fix Zope URL (GH-16880)
(cherry picked from commit dfe726b1ac)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-10-22 15:55:12 -07:00
Miss Skeleton (bot) 6329a56ca7
bpo-38466: Fix threading.excepthook doc (GH-16891)
(cherry picked from commit 91528f40c3)

Co-authored-by: Daniel Baskal <MagnificentUrukHai@users.noreply.github.com>
2019-10-22 13:44:45 -07:00
Miss Islington (bot) db38522964 bpo-38531: document extend action's added version (GH-16865) (GH-16868)
(cherry picked from commit 74142078b3)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2019-10-20 13:25:25 -07:00
Miss Islington (bot) c39bc5c9e8 bpo-37759: More updates to Whatsnew 3.8 (GH-16854) (GH-16867)
* math.perm() and math.comb()

* math.isqrt()

* Add singledispatchmethod()

* itertools.accumulate()

* Optional headers for xmlrpc.client.ServerProxy

* IDLE non-BMP characters

* import collections.abc directly

* @coroutine is deprecated

* pprint.pp()

* New options for object.__reduce__()

* DictReader no longer returns OrderedDicts

* "force" option for logging.basicConfig()

* Fix spelling

* cProfile context manager

* Various markup/grammar fixes from Kyle Stanley.
Other minor fixes as well.
Also, dedup the __reduce__ entry.

* Fix markup

* Fix grammar nits found by MS Word
(cherry picked from commit c93883c6af)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-20 11:35:28 -07:00
Miss Islington (bot) bbd600a17b
Remove doc reference to unmaitained Nose package (GH-16849)
The Nose package is no longer maintained.
(cherry picked from commit 88eeda6311)

Co-authored-by: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-19 12:30:28 -07:00
Miss Islington (bot) de812682a6
Fix minor typos in What's New in Python 3.8. (GH-16770)
Added periods at the end of the sentences.
(cherry picked from commit b1fa72a5b7)

Co-authored-by: Jero Bado <tokidokitalkyou@gmail.com>
2019-10-18 00:55:22 -07:00
Miss Islington (bot) 380d443a6a
Doc: Add missing entry for functools.cached_property (GH-16803)
(cherry picked from commit 93b81e1fcb)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-10-18 00:21:05 -07:00
Miss Islington (bot) c615db608d
bpo-33604: Raise TypeError on missing hmac arg. (GH-16805)
Also updates the documentation to clarify the situation surrounding
the digestmod parameter that is required despite its position in the
argument list as of 3.8.0 as well as removing old python2 era
references to "binary strings".

We indavertently had this raise ValueError in 3.8.0 for the missing
arg.  This is not considered an API change as no reasonable code would
be catching this missing argument error in order to handle it.
(cherry picked from commit f33c57d5c7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-10-17 20:48:42 -07:00
Miss Islington (bot) 2d647c0728
Update doc switcher list for 3.8.0 (GH-16809)
(cherry picked from commit 3f36043db2)

Co-authored-by: Ned Deily <nad@python.org>
2019-10-15 14:33:34 -07:00
Miss Islington (bot) 42308e8b27
bpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791)
(cherry picked from commit 4d202281c1)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-10-14 15:52:47 -07:00
Miss Islington (bot) 6fa79f983d
Doc: 3.8 is now stable. (GH-16790)
(cherry picked from commit 4504b4500d)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-10-14 15:21:32 -07:00
Łukasz Langa 85da2ddc89 Python 3.8.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl2keYQACgkQsmmV4xAl
 BWgtYA/+OuuxCQieZTU9h10naQvzp42/4g69EjvV396wvg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uV3o0+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