Commit Graph

104919 Commits

Author SHA1 Message Date
Miss Islington (bot) 3d75857dfa
IDLE: Fix 2 typos found by Min ho Kim. (GH-15617)
(cherry picked from commit 15119bc2a7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-30 13:36:06 -07:00
Miss Islington (bot) 17f61ed25a
bpo-37140: Fix StructUnionType_paramfunc() (GH-15612)
Fix a ctypes regression of Python 3.8. When a ctypes.Structure is
passed by copy to a function, ctypes internals created a temporary
object which had the side effect of calling the structure finalizer
(__del__) twice. The Python semantics requires a finalizer to be
called exactly once. Fix ctypes internals to no longer call the
finalizer twice.

Create a new internal StructParam_Type which is only used by
_ctypes_callproc() to call PyMem_Free(ptr) on Py_DECREF(argument).
StructUnionType_paramfunc() creates such object.
(cherry picked from commit 96b4087ce7)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-30 05:50:44 -07:00
Łukasz Langa 1553e3b5fc
Post v3.8.0b4 2019-08-30 11:01:34 +02:00
Łukasz Langa 23d532a435 Python 3.8.0b4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl1oSsoACgkQsmmV4xAl
 BWiZ2w/9EGp9XonU8NCJShlmjmat3q1S1FKQD69W4817cQRNtj8Lv6UP17epkVtX
 8ASRA5IdUuMhU30A6eUMmk0HmVjTDvxQTCpC0qSa1gDxd6vysydTDOmxyoRExR5R
 secZIYswJVsKUGyiR0+aOaOqDJSS4zUMLttdBeiEKwZEXyXntqOStB3nx/lURKkM
 wLzQM0N7HQKvqY9lc3ANQ12LcD9rpj9xn4dx3mauINNOJlA1sy3ymt/6iiRJlYYC
 LwoahzS8q1TSvz6X/E0kHZ3cZ//uiAgDF9XpuDUm5bwKwClHm5hxnDF53do6FP3V
 u4CIDNySksrvxha+5F9Y8Ln9M8t2pjfl+XzKMPoEb7pGugV8TAhnWdRk0CO6FkS4
 ApLiY0CsxrB+vpQxOVBwIchqM9QXXf6kZxh8T/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KSb9RRZC1HoZx1Hgk92hUtpliVQ/Rmh7jpE+0G
 M6l5t87ofA==
 =hIaU
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.0b4' into 3.8

Python 3.8.0b4
2019-08-30 11:01:00 +02:00
Miss Islington (bot) 27f418640c bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592) (GH-15608)
(cherry picked from commit 6a650aaf77)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-29 23:23:17 -07:00
Miss Islington (bot) c19d6bca55 Steven Bethard designated a new maintainer for argparse (GH-15605) (GH-15606)
(cherry picked from commit 496058f599)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-29 21:27:33 -07:00
Łukasz Langa d93605de72
Python 3.8.0b4 2019-08-29 23:59:20 +02:00
Łukasz Langa 25a044ee6c
[3.8] bpo-37834: Prevent shutil.rmtree exception (GH-15602) (#15603)
when built on non-Windows system without fd system call support,
like older versions of macOS.
(cherry picked from commit 7fcc2088a5)

Co-authored-by: Ned Deily <nad@python.org>
2019-08-29 23:51:19 +02:00
Serhiy Storchaka 96631dcb11
[3.8] bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593). (GH-15599)
(cherry picked from commit 4901fe274b)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-08-29 18:29:59 +03: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) 384c6d72d9
bpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)
With `symtable_visit_expr` now correctly adjusting the recursion depth for named
expressions, `symtable_handle_namedexpr` should be leaving it alone.

Also adds a new check to `PySymtable_BuildObject` that raises `SystemError`
if a successful first symbol analysis pass fails to keep the stack depth
accounting clean.
(cherry picked from commit 06145230c8)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2019-08-29 06:46:20 -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) 102130a63c
bpo-37960: Silence only necessary errors in repr() of buffered and text streams. (GH-15543)
(cherry picked from commit b235a1b473)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-08-29 01:13:29 -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
Miss Islington (bot) d1d42bf4a4
bpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds>=24. (GH-14307)
(cherry picked from commit 122376df55)

Co-authored-by: Justin Blanchard <UncombedCoconut@gmail.com>
2019-08-29 00:56:04 -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) 38d311d79e bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH15578)
* Fix call_matcher for mock when using methods

* Add NEWS entry

* Use None check and convert doctest to unittest

* Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.

* Use reset_mock instead of reinitialization. Change inner class constructor signature for check

* Reword comment regarding call object lookup logic
(cherry picked from commit c96127821e)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-08-29 07:58:27 +01: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) f92bb6ed33
bpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit test (GH-15081)
* Define THREAD_STACK_SIZE for AIX to pass default recursion limit test
(cherry picked from commit 9670ce76b8)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2019-08-28 22:35:41 -07:00
Miss Islington (bot) ed00fee7d4
bpo-36511: Fix failures in Windows ARM32 buildbot (GH-15181)
(cherry picked from commit ed70a344b5)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
2019-08-28 22:18:15 -07:00
Miss Islington (bot) 4adcaf8151 bpo-34775: Return NotImplemented in PurePath division. (GH-9509) (GH-15172)
(cherry picked from commit 4c69be22df)

Co-authored-by: aiudirog <aiudirog@gmail.com>
2019-08-29 01:05:59 -04:00
Miss Islington (bot) e471a543a4
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736)
(cherry picked from commit b0caf32981)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2019-08-28 21:56:00 -07:00
bsiem bd127b1b7d [3.8] bpo-37482: Fix email address name with encoded words and special chars (GH-14561) (GH-15380)
Special characters in email address header display names are normally
put within double quotes. However, encoded words (=?charset?x?...?=) are
not allowed withing double quotes. When the header contains a word with
special characters and another word that must be encoded, the first one
must also be encoded.

In the next example, the display name in the From header is quoted and
therefore the comma is allowed; in the To header, the comma is not
within quotes and not encoded, which is not allowed and therefore
rejected by some mail servers.

From: "Foo Bar, France" <foo@example.com>
To: Foo Bar, =?utf-8?q?Espa=C3=B1a?= <foo@example.com>

https://bugs.python.org/issue37482
(cherry picked from commit df0c21ff46)

Co-authored-by: bsiem <52461103+bsiem@users.noreply.github.com>
2019-08-29 00:47:15 -04:00
Miss Islington (bot) 23985c6a64 closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15561)
https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
(cherry picked from commit 55aabee075)

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2019-08-28 10:32:34 -07:00
Miss Islington (bot) 2cb82d2a88 bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138) (GH-15557)
(cherry picked from commit 2a16eea71f)

Co-authored-by: Daniel Fortunov <asqui@users.noreply.github.com>
2019-08-27 21:59:54 -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) caf7a30efe
bpo-37936: Remove some .gitignore rules that were intended locally. (GH-15542)
These appeared in commit c5ae169e1.  The comment on them, as well as
the presence among them of a rule for the .gitignore file itself,
indicate that the author intended these lines to remain only in their
own local working tree -- not to get committed even to their own repo,
let alone merged upstream.

They did nevertheless get committed, because it turns out that Git
takes no notice of what .gitignore says about files that it's already
tracking... for example, this .gitignore file itself.

Give effect to these lines' original intention, by deleting them. :-)

Git tip, for reference: the `.git/info/exclude` file is a handy way
to do exactly what these lines were originally intended to do.  A
related handy file is `~/.config/git/ignore`.  See gitignore(5),
aka `git help ignore`, for details.

https://bugs.python.org/issue37936

Automerge-Triggered-By: @zware
(cherry picked from commit 8c9e9b0cd5)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-08-27 11:35:11 -07:00
Miss Islington (bot) d5ba8bbdae Fix unused variable and signed/unsigned warnings (GH-15537) (GH-15551)
(cherry picked from commit 0138c4ceab)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-27 10:13:52 -07:00
Miss Islington (bot) 91020fade6
bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
(cherry picked from commit 8bf5fef873)

Co-authored-by: vrajivk <3413293+vrajivk@users.noreply.github.com>
2019-08-26 21:34:32 -07:00
Miss Islington (bot) 1d4285a042
bpo-36763: Make Py_BytesMain() public (GH-15532)
Declare Py_BytesMain() in Include/pylifecycle.h, rather in
Include/internal/pycore_pylifecycle.h.
(cherry picked from commit 9a943b4ce1)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-26 16:17:56 -07:00
Miss Islington (bot) c75f0e5bde
Fix an invalid assertEqual() call in test_descr.py (GH-15318)
(cherry picked from commit 6b2e3256b6)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-08-26 16:02:21 -07:00
Miss Islington (bot) b8a22ac856
bpo-37925: Mention --embed in python-config usage (GH-15458)
(cherry picked from commit d3cc189b17)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2019-08-26 14:55:31 -07:00
Steve Dower 04b750740b
bpo-37664: Update ensurepip bundled wheels, again (GH-15483) 2019-08-26 12:57:57 -07:00
Miss Islington (bot) 56c4d2d057 bpo-37798: Minor code formatting and comment clean-ups. (GH-15526) (GH-15527)
(cherry picked from commit 6fee0f8ea7)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-26 12:10:00 -07:00
Miss Islington (bot) 2bb4fc379b
bpo-37055: fix warnings in _blake2 module (GH-14646)
https://bugs.python.org/issue37055

Automerge-Triggered-By: @tiran
(cherry picked from commit b27cbec801)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2019-08-26 11:23:55 -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) ed8af33cce
bpo-37954: Fix reference leak in the symtable (GH-15514)
(cherry picked from commit 4901dc46da)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-08-26 08:49:44 -07:00
Miss Islington (bot) 82f4bfdbb0
Remove leftovers from the times when long long wasn't required (GH-15501)
In a38e9d1399 pyconfig.h.in was
manually edited and that edit was overwritten when running autoreconf.
(cherry picked from commit 52c1a6a15a)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-26 08:33:49 -07:00
Pablo Galindo 3769425abd
[3.8] bpo-37947: Adjust correctly the recursion level in symtable for named expressions (GH-15499) (GH-15515)
(cherry picked from commit 0e4ea16336)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-08-26 16:27:31 +01:00
Miss Islington (bot) 69d22b8fee
bpo-34679: Restore instantiation Windows IOCP event loop from non-main thread (GH-15492)
* Restore running proactor event loop from non-main thread

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

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-08-26 03:14:54 -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) a3875171d7
bpo-37805: Add tests for json.dump(..., skipkeys=True) (GH-15489)
https://bugs.python.org/issue37805

Automerge-Triggered-By: @methane
(cherry picked from commit 44cd86bbdd)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-08-26 00:27:31 -07: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) 077887059a bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)
Cease turning SyntaxWarnings into SyntaxErrors.
(cherry picked from commit 1039f39c9c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-26 02:52:45 -04: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