Commit Graph

101307 Commits

Author SHA1 Message Date
Miss Islington (bot) 67d3f8b85a Fix a reference to the MRE book in re docs (GH-1113)
Reported by Maksym Nikulyak on docs.p.o.
(cherry picked from commit a0a42d22d8)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-03-23 18:55:26 +03:00
Serhiy Storchaka b9744e924c
bpo-33041: Fixed jumping if the function contains an "async for" loop. (GH-6154) 2018-03-23 14:35:33 +02:00
Miss Islington (bot) c71edab15d
bpo-32999: ast: Convert useless check to assert (GH-6197)
(cherry picked from commit c65bf3fe4a)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-03-23 02:43:11 -07:00
Miss Islington (bot) 3b4c6b16c5
bpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but doesn't have a type annotation. (GH-6192)
If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.
(cherry picked from commit 56970b8ce9)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-22 13:58:59 -07:00
Miss Islington (bot) 5d8bb5d07b bpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189) (GH-6190)
bpo-33018 (GH-5944) fixed bpo-32999 too.  So fc7df0e6 is not required
anymore.  Revert it except test case.
(cherry picked from commit f757b72b25)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-03-22 14:00:11 +00:00
Miss Islington (bot) 346964ba05
bpo-33018: Improve issubclass() error checking and message. (GH-5944)
This improves error message for situations when a non-class is
checked w.r.t. an abstract base class.
(cherry picked from commit 40472dd42d)

Co-authored-by: jab <jab@users.noreply.github.com>
2018-03-22 04:49:26 -07:00
Miss Islington (bot) 8f46176f0e Upgrade pip to v9.0.3 and setuptools to v39.0.1 (GH-6184)
(cherry picked from commit d93b5161af)

Co-authored-by: Donald Stufft <donald@stufft.io>
2018-03-21 23:38:24 -04:00
Miss Islington (bot) 4ddc99d159 bpo-33116: Add 'Field' to dataclasses.__all__. (GH-6182) (GH-6183)
- Add missing 'Field' to __all__.
- Improve tests to catch this.
(cherry picked from commit 8e4560a9da)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-21 17:44:23 -04:00
Miss Islington (bot) f5625d58fa FIX failure on OSX sem_getvalue (GH-6180) (GH-6181)
(cherry picked from commit dec1c7786f)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
2018-03-21 20:00:55 +01:00
Miss Islington (bot) bb5b529197 bpo-33078 - Fix queue size on pickling error (GH-6119) (GH-6178)
(cherry picked from commit e2f33add63)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
2018-03-21 17:21:15 +01:00
Miss Islington (bot) 22136c94b6 bpo-32896: Fix error when subclassing a dataclass with a field that uses a default_factory (GH-6170) (GH-6171)
Fix the way that new annotations in a class are detected.
(cherry picked from commit 8f6eccdc64)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-21 05:17:30 -04:00
Miss Islington (bot) 56f530ef8a
Fix typos in mmap() error messages (GH-6173)
(cherry picked from commit 9308dea3e1)

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

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

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

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-03-20 15:44:21 -07:00
Miss Islington (bot) 56cce1ca84 [3.7] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6159)
fstat may block for long time if the file descriptor is on a
non-responsive NFS server, hanging all threads. Most fstat() calls are
handled by _Py_fstat(), releasing the GIL internally, but but
_Py_fstat_noraise() does not release the GIL, and most calls release the
GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs
when calling:
- mmap.mmap()
- os.urandom()
- random.seed()
(cherry picked from commit 4484f9dca9)

Co-authored-by: Nir Soffer <nirsof@gmail.com>
2018-03-20 20:16:30 +01:00
Miss Islington (bot) 3d41f48259 bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152) (GH-6153)
If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
(cherry picked from commit 7389fd935c)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-19 21:31:22 -04:00
Miss Islington (bot) 45648312e5 bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (GH-6147) (GH-6148)
If a non-dataclass derives from a frozen dataclass, allow attributes to be set.
Require either all of the dataclasses in a class hierarchy to be frozen, or all non-frozen.
Store `@dataclass` parameters on the class object under `__dataclass_params__`. This is needed to detect frozen base classes.
(cherry picked from commit f199bc655e)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-03-18 21:03:36 -04:00
Miss Islington (bot) 3c0a5a7c7b
bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)
(cherry picked from commit 134cb01cda)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-18 13:50:41 -07:00
Miss Islington (bot) fdd8e8b4ff
bpo-19417: Add test_bdb.py (GH-5217)
(cherry picked from commit 3fe33043ee)

Co-authored-by: xdegaye <xdegaye@gmail.com>
2018-03-18 13:25:15 -07:00
Miss Islington (bot) a90df5085b
Revert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)
This reverts commit ac317700ce.

(Reverts only the lib2to3 part.)
(cherry picked from commit f64aae46da)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2018-03-18 12:15:52 -07:00
Serhiy Storchaka 773573e9ac
[3.7] bpo-33041: Add tests for jumps in/out of 'async with' blocks. (GH-6110). (GH-6140)
(cherry picked from commit bc300ce205)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-18 12:31:37 +02:00
Miss Islington (bot) 429ca448d2 bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)
It was actually fixed in SQLite 3.8.8, not 3.8.7.

(cherry picked from commit bbf7bb7a63)

Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
2018-03-18 09:24:33 +03:00
Miss Islington (bot) d7b8103741 Update pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (#6134)
(cherry picked from commit 7f81bb2add)

Co-authored-by: Donald Stufft <donald@stufft.io>
2018-03-17 11:46:05 -04:00
Miss Islington (bot) 136905fffd
bpo-32374: m_traverse may be called with m_state=NULL (GH-5140)
Multi-phase initialized modules allow m_traverse to be called while the
module is still being initialized, so module authors may need to account
for that.
(cherry picked from commit c2b0b12d1a)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
2018-03-16 23:03:56 -07:00
Miss Islington (bot) 6e65e44626 [3.7] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772) (#6103)
Creating backup files with ~ suffix can be undesirable in some environment,
such as when building RPM packages. Instead of requiring the user to remove
those files manually, option -n was added, that simply disables this feature.

-n was selected because 2to3 has the same option with this behavior.
(cherry picked from commit 5affd5c29e)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2018-03-14 18:52:28 +01:00
Miss Islington (bot) 7d0528dd3f lib2to3: Add more tests (GH-6101) (#6108)
(cherry picked from commit 74f56878cd)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2018-03-13 11:20:38 -07:00
Miss Islington (bot) f216cbf9ab bpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (GH-6084) (#6092)
(cherry picked from commit 095ee415ce)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
2018-03-13 10:10:57 +01:00
xdegaye e32bbaf376 [3.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-5928) 2018-03-13 10:52:35 +02:00
Miss Islington (bot) b4c8871ca4 bpo-33064: lib2to3: support trailing comma after *args and **kwargs (GH-6096) (#6097)
New tests also added.

I also made the comments in line with the builtin Grammar/Grammar. PEP 306 was
withdrawn, Kees Blom's railroad program has been lost to the sands of time for
at least 16 years now (I found a python-dev post from people looking for it).
(cherry picked from commit b51f5de711)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2018-03-13 01:08:02 -07:00
Ned Deily d461ed84b5
bpo-29719: Remove Date and Release field in whatsnew/3.7 (GH-6094) 2018-03-12 21:16:54 -04:00
Ned Deily 6f415c4819 Add macOS installer Conclusion file 2018-03-12 17:08:32 -04:00
Miss Islington (bot) ee28cd57df
Fix docs markup for asyncio current_task() and all_tasks() (GH-6089)
(cherry picked from commit b21505e710)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-03-12 12:12:05 -07:00
Miss Islington (bot) ff5d21331e bpo-31804: Fix multiprocessing.Process with broken standard streams (GH-6079) (GH-6080)
In some conditions the standard streams will be None or closed in the child process (for example if using "pythonw" instead of "python" on Windows).  Avoid failing with a non-0 exit code in those conditions.

Report and initial patch by poxthegreat.
(cherry picked from commit e756f66c83)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2018-03-11 19:42:37 +01:00
Serhiy Storchaka 04aadf23ea
[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (#6074)
(cherry picked from commit 26c9f565d0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-11 09:30:13 +02:00
Miss Islington (bot) 39441fce02
bpo-32338: OrderedDict import is no longer needed in re. (GH-4891)
(cherry picked from commit b931bd0a2f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-10 23:01:58 -08:00
Miss Islington (bot) 720a4b69c6
bpo-32996: Improve What's New in 3.7. (GH-5983)
(cherry picked from commit 51302a5fcc)

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

Co-authored-by: Matt Eaton <agnosticdev@gmail.com>
2018-03-11 04:21:27 +03:00
Miss Islington (bot) c546a62c4d bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)
(cherry picked from commit 7280a4eef5)

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

Co-authored-by: Steven M. Vascellaro <S.Vascellaro@gmail.com>
2018-03-10 15:25:14 -08:00
Miss Islington (bot) 5506d60302
bpo-32836: Remove obsolete code from symtable pass (GH-5680)
When comprehensions switched to using a nested scope, the old
code for generating a temporary name to hold the accumulation
target became redundant, but was never actually removed.

Patch by Nitish Chandra.
(cherry picked from commit 3a087beddd)

Co-authored-by: Nitish Chandra <nitishchandrachinta@gmail.com>
2018-03-10 15:11:47 -08:00
Miss Islington (bot) e8a5a92037 bpo-27645: Add support for native backup facility of SQLite (GH-4238)
(cherry picked from commit d7aed4102d)

Co-authored-by: Emanuele Gaifas <lelegaifax@gmail.com>
2018-03-11 01:29:19 +03:00
Serhiy Storchaka 9e94c0d3c7
[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060)
and remove redundant code.
(cherry picked from commit 67ee07795b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-10 20:45:05 +02:00
Miss Islington (bot) bf0d116517 bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) (GH-6057)
* Skip write()/data_received() if sslpipe is destroyed
(cherry picked from commit 5e80a71ab6)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-03-10 18:27:01 +02:00
Miss Islington (bot) 89090789de
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)
(cherry picked from commit 496431ffb6)

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

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

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

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

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
2018-03-09 12:35:42 -08:00
Miss Islington (bot) 3c39beb65d
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
(cherry picked from commit 12f74d8608)

Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com>
2018-03-09 10:14:14 -08:00