]> granicus.if.org Git - python/log
python
5 years agoDo not use explicit inheritance from object in the documentation. (GH-13936)
Serhiy Storchaka [Mon, 10 Jun 2019 10:35:52 +0000 (13:35 +0300)]
Do not use explicit inheritance from object in the documentation. (GH-13936)

5 years agobpo-36785: PEP 574 What's New entry (#13931)
Antoine Pitrou [Sun, 9 Jun 2019 12:47:15 +0000 (14:47 +0200)]
bpo-36785: PEP 574 What's New entry (#13931)

5 years agoAdd some placeholder notes for major 3.8 features (GH-13927)
Nick Coghlan [Sun, 9 Jun 2019 09:07:42 +0000 (19:07 +1000)]
Add some placeholder notes for major 3.8 features (GH-13927)

5 years agobpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)
Marcin Niemira [Sat, 8 Jun 2019 21:05:06 +0000 (07:05 +1000)]
bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)

5 years agobpo-37178: Allow a one argument form of math.perm() (GH-13905)
Raymond Hettinger [Sat, 8 Jun 2019 15:58:11 +0000 (08:58 -0700)]
bpo-37178: Allow a one argument form of math.perm() (GH-13905)

5 years agobpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727)
Rémi Lapeyre [Sat, 8 Jun 2019 14:56:24 +0000 (16:56 +0200)]
bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727)

Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.

5 years agobpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907)
Ammar Askar [Sat, 8 Jun 2019 14:43:16 +0000 (07:43 -0700)]
bpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907)

5 years agobpo-37173: Show passed class in inspect.getfile error (GH-13861)
Philipp A [Sat, 8 Jun 2019 12:05:46 +0000 (14:05 +0200)]
bpo-37173: Show passed class in inspect.getfile error (GH-13861)

Currently, inspect.getfile(str) will report nonsense:

```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```

This fixes that

https://bugs.python.org/issue37173

5 years agocross port importlib-metadata PR #76 (#13903)
Anthony Sottile [Fri, 7 Jun 2019 21:23:39 +0000 (14:23 -0700)]
cross port importlib-metadata PR #76 (#13903)

https://gitlab.com/python-devs/importlib_metadata/merge_requests/76

5 years agobpo-37150: Throw ValueError if FileType class object was passed in add_argument ...
zygocephalus [Fri, 7 Jun 2019 20:08:36 +0000 (23:08 +0300)]
bpo-37150: Throw ValueError if FileType class object was passed in add_argument (GH-13805)

There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it.

Example:
```python
parser = argparse.ArgumentParser()
parser.add_argument('-x', type=argparse.FileType)
```

https://bugs.python.org/issue37150

5 years agobpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867)
Jeroen Demeyer [Fri, 7 Jun 2019 18:01:53 +0000 (20:01 +0200)]
bpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867)

5 years agobpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872)
Paul Monson [Fri, 7 Jun 2019 17:58:41 +0000 (10:58 -0700)]
bpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872)

5 years agobpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)
Victor Stinner [Fri, 7 Jun 2019 15:51:28 +0000 (17:51 +0200)]
bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)

5 years agobpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888)
Victor Stinner [Fri, 7 Jun 2019 14:22:21 +0000 (16:22 +0200)]
bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888)

Replace two Python function calls with a single one to ensure that no
memory allocation is done between the invalid object is created and
when _PyObject_IsFreed() is called.

5 years agobpo-37151: simplify classmethoddescr_call (GH-13340)
Jeroen Demeyer [Fri, 7 Jun 2019 10:20:24 +0000 (12:20 +0200)]
bpo-37151: simplify classmethoddescr_call (GH-13340)

5 years agoUse assertEqual(). (#13883)
Stefan Krah [Fri, 7 Jun 2019 09:18:34 +0000 (11:18 +0200)]
Use assertEqual(). (#13883)

5 years agoIDLE: Standardize naming convention for DummyEditwin in tests (GH-13876)
Cheryl Sabella [Fri, 7 Jun 2019 09:08:20 +0000 (05:08 -0400)]
IDLE: Standardize naming convention for DummyEditwin in tests (GH-13876)

* Change from Dummy_Editwin to DummyEditwin to match other tests.

5 years agobpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13881)
Eric Wieser [Fri, 7 Jun 2019 08:13:26 +0000 (01:13 -0700)]
bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13881)

5 years agobpo-37177: make IDLE's search dialogs transient (GH-13869)
Tal Einat [Fri, 7 Jun 2019 05:54:40 +0000 (08:54 +0300)]
bpo-37177: make IDLE's search dialogs transient (GH-13869)

This avoids the search dialogs being hidden behind the editor window.

5 years agobpo-37134: Add PEP570 notation to the signature of byte{array}.translate (GH-13874)
Pablo Galindo [Thu, 6 Jun 2019 23:38:41 +0000 (00:38 +0100)]
bpo-37134: Add PEP570 notation to the signature of byte{array}.translate (GH-13874)

5 years agobpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860)
Zackery Spytz [Thu, 6 Jun 2019 20:39:23 +0000 (14:39 -0600)]
bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860)

5 years agobpo-36520: Email header folded incorrectly (#13608)
websurfer5 [Thu, 6 Jun 2019 19:53:27 +0000 (12:53 -0700)]
bpo-36520: Email header folded incorrectly (#13608)

* bpo-36520: reset the encoded word offset when starting a new
line during an email header folding operation

* 📜🤖 Added by blurb_it.

* bpo-36520: add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests

* bpo-36520: fix whitespace issue

* bpo-36520: changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue #" in comments

5 years agobpo-37156: Fix libssl DLL tag in MSI sources (GH-13866)
Steve Dower [Thu, 6 Jun 2019 16:06:51 +0000 (09:06 -0700)]
bpo-37156: Fix libssl DLL tag in MSI sources (GH-13866)

5 years agobpo-36763, _testembed: enable assert() in release mode (GH-13857)
Victor Stinner [Thu, 6 Jun 2019 12:25:18 +0000 (14:25 +0200)]
bpo-36763, _testembed: enable assert() in release mode (GH-13857)

5 years agobpo-2661: Make mapping tests better usable for custom mapping classes. (GH-11157)
Walter Dörwald [Thu, 6 Jun 2019 10:13:08 +0000 (12:13 +0200)]
bpo-2661: Make mapping tests better usable for custom mapping classes. (GH-11157)

In test_fromkeys() the derived test class now supports all arguments in its
constructor so that the class to be tested can use its own constructor in its
fromkeys() implementation.

In test_mutatingiteration() the test fails as soon as iterating over a
dictionary with one entry and adding new entries in the loop iterates more
than once (to avoid endless loops in faulty implementations).

https://bugs.python.org/issue2661

5 years agobpo-35551: remove mac_centeuro encoding (GH-13856)
Inada Naoki [Thu, 6 Jun 2019 05:38:52 +0000 (14:38 +0900)]
bpo-35551: remove mac_centeuro encoding (GH-13856)

It is alias to mac_latin2 now.

5 years agoAdd importlib.metadata to what's new. (#13855)
Barry Warsaw [Thu, 6 Jun 2019 02:40:19 +0000 (19:40 -0700)]
Add importlib.metadata to what's new. (#13855)

5 years agobpo-37134: Use PEP570 syntax for sum() (GH-13851)
Pablo Galindo [Wed, 5 Jun 2019 23:11:46 +0000 (00:11 +0100)]
bpo-37134: Use PEP570 syntax for sum() (GH-13851)

5 years agobpo-37165: Convert _count_elements to the argument clinic (GH-13848)
Raymond Hettinger [Wed, 5 Jun 2019 23:05:25 +0000 (16:05 -0700)]
bpo-37165: Convert _count_elements to the argument clinic (GH-13848)

5 years agobpo-35551: encodings update (GH-11446)
Ashwin Ramaswami [Wed, 5 Jun 2019 22:18:07 +0000 (15:18 -0700)]
bpo-35551: encodings update (GH-11446)

5 years agobpo-37134: Add PEP570 notation to the documentation (GH-13743)
Pablo Galindo [Wed, 5 Jun 2019 20:24:28 +0000 (21:24 +0100)]
bpo-37134: Add PEP570 notation to the documentation (GH-13743)

5 years agobpo-33725, multiprocessing doc: rephase warning against fork on macOS (GH-13841)
Victor Stinner [Wed, 5 Jun 2019 19:59:33 +0000 (21:59 +0200)]
bpo-33725, multiprocessing doc: rephase warning against fork on macOS (GH-13841)

Co-Authored-By: Barry Warsaw <barry@python.org>
5 years agobpo-21315: Fix parsing of encoded words with missing leading ws. (#13425)
Abhilash Raj [Wed, 5 Jun 2019 16:56:33 +0000 (12:56 -0400)]
bpo-21315: Fix parsing of encoded words with missing leading ws. (#13425)

* bpo-21315: Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.

5 years ago[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)
Serhiy Storchaka [Wed, 5 Jun 2019 15:22:31 +0000 (18:22 +0300)]
[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)

Turn deprecation warnings added in 3.8 into TypeError.

5 years agobpo-37158: Simplify and speed-up statistics.fmean() (GH-13832)
Raymond Hettinger [Wed, 5 Jun 2019 14:39:38 +0000 (07:39 -0700)]
bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832)

5 years agobpo-26836: Document os.memfd_create() name parameter (GH-13838)
Victor Stinner [Wed, 5 Jun 2019 10:24:52 +0000 (12:24 +0200)]
bpo-26836: Document os.memfd_create() name parameter (GH-13838)

https://bugs.python.org/issue26836

5 years agobpo-34767: Do not always create a collections.deque() in asyncio.Lock() (GH-13834)
Zackery Spytz [Wed, 5 Jun 2019 09:33:27 +0000 (03:33 -0600)]
bpo-34767: Do not always create a collections.deque() in asyncio.Lock() (GH-13834)

https://bugs.python.org/issue34767

5 years agoFix documentation (GH-13721)
Benjamin Yeh [Wed, 5 Jun 2019 09:08:04 +0000 (02:08 -0700)]
Fix documentation (GH-13721)

Based on the source code https://github.com/python/cpython/blob/4a686504eb2bbf69adf78077458508a7ba131667/Lib/multiprocessing/pool.py#L755 AsyncResult.successful() raises a ValueError, not an AssertionError.

5 years agobpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [streams...
Emmanuel Arias [Wed, 5 Jun 2019 05:45:53 +0000 (02:45 -0300)]
bpo-36373:  Deprecate explicit loop parameter in all public asyncio APIs [streams] (GH-13671)

This PR deprecate explicit loop parameters in all public asyncio APIs

This issues is split to be easier to review.

Second step: streams.py

https://bugs.python.org/issue36373

5 years ago bpo-35763: Make IDLE calltip note about '/' less obtrusive (GH-13791)
Terry Jan Reedy [Wed, 5 Jun 2019 01:55:37 +0000 (21:55 -0400)]
 bpo-35763: Make IDLE calltip note about '/' less obtrusive (GH-13791)

Add it to the end of the first line if there is room.  Tests were reworked.

5 years agoDoc: Python 3.9 in sidebar and version switcher. (GH-13824)
Julien Palard [Tue, 4 Jun 2019 23:15:33 +0000 (01:15 +0200)]
Doc: Python 3.9 in sidebar and version switcher. (GH-13824)

5 years agobpo-34282: Remove deprecated enum _convert method (GH-13823)
Zachary Ware [Tue, 4 Jun 2019 21:03:10 +0000 (16:03 -0500)]
bpo-34282: Remove deprecated enum _convert method (GH-13823)

5 years agoBump version in AppVeyor config (#13822)
Zachary Ware [Tue, 4 Jun 2019 20:57:15 +0000 (15:57 -0500)]
Bump version in AppVeyor config (#13822)

5 years agoBump to 3.9.0a0
Łukasz Langa [Tue, 4 Jun 2019 20:12:32 +0000 (22:12 +0200)]
Bump to 3.9.0a0

5 years agoMerge tag 'v3.8.0b1'
Łukasz Langa [Tue, 4 Jun 2019 19:53:26 +0000 (21:53 +0200)]
Merge tag 'v3.8.0b1'

Python 3.8.0b1

5 years agobpo-35047: Update whatsnew/3.8 for better mock error message (GH-13746)
Petter Strandmark [Tue, 4 Jun 2019 19:34:49 +0000 (21:34 +0200)]
bpo-35047: Update whatsnew/3.8 for better mock error message (GH-13746)

5 years agobpo-30835: email: Fix AttributeError when parsing invalid CTE (GH-13598)
Abhilash Raj [Tue, 4 Jun 2019 18:00:47 +0000 (14:00 -0400)]
bpo-30835: email: Fix AttributeError when parsing invalid CTE (GH-13598)

* bpo-30835: email: Fix AttributeError when parsing invalid Content-Transfer-Encoding

Parsing an email containing a multipart Content-Type, along with a
Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte
will fail. email.feedparser.FeedParser._parsegen() gets the header and
attempts to convert it to lowercase before comparing it with the accepted
encodings, but as the header contains an invalid byte, it's returned as a
Header object rather than a str.

Cast the Content-Transfer-Encoding header to a str to avoid this.

Found using the AFL fuzzer.

Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Andrew Donnellan <andrew@donnellan.id.au>
* Add email and NEWS entry for the bugfix.

5 years agoPython 3.8.0b1 v3.8.0b1
Łukasz Langa [Tue, 4 Jun 2019 17:44:34 +0000 (19:44 +0200)]
Python 3.8.0b1

5 years agobpo-35805: Add parser for Message-ID email header. (GH-13397)
Abhilash Raj [Tue, 4 Jun 2019 17:41:34 +0000 (13:41 -0400)]
bpo-35805: Add parser for Message-ID email header. (GH-13397)

* bpo-35805: Add parser for Message-ID header.

This parser is based on the definition of Identification Fields from RFC 5322
Sec 3.6.4.

This should also prevent folding of Message-ID header using RFC 2047 encoded
words and hence fix bpo-35805.

* Prevent folding of non-ascii message-id headers.
* Add fold method to MsgID token to prevent folding.

5 years agobpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816)
Victor Stinner [Tue, 4 Jun 2019 17:03:13 +0000 (19:03 +0200)]
bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816)

test_venv.test_mutiprocessing() now explicitly calls pool.terminate()
to wait until the pool completes.

5 years agobpo-36742: Corrects fix to handle decomposition in usernames (#13812)
Steve Dower [Tue, 4 Jun 2019 15:55:30 +0000 (08:55 -0700)]
bpo-36742: Corrects fix to handle decomposition in usernames (#13812)

5 years agoFix extraneous whitespace in QueueListener.prepare (GH-13803)
Boris Feld [Tue, 4 Jun 2019 15:20:18 +0000 (17:20 +0200)]
Fix extraneous whitespace in QueueListener.prepare (GH-13803)

5 years agobpo-30699: Improve example on datetime tzinfo instances (GH-4290)
Mario Corchero [Tue, 4 Jun 2019 15:18:11 +0000 (16:18 +0100)]
bpo-30699: Improve example on datetime tzinfo instances (GH-4290)

* Improve example on tzinfo instances

Move from GMTX to TZX when naming the classes, as GMT1 might be rather
confusing as seen in the reported issue.
In addition, move to UTC over GMT and improve the tzname implementation.

* Simplify datetime with tzinfo example

Move the example in the documentation to just use timezone.utc and a
user defined Kabul timezone rather than having two user defined
timezones with DST.

Kabul timezone is still interesting as it changes its offset but not
based on DST. This is more accurate as the previous example was missing
information about the fold attribute. Additionally, implementing the fold
attribute was rather complex and probably not relevant enough for the
section "datetime with tzinfo".

5 years agobpo-36778: Remove outdated comment from CodePageTest (GH-13807)
Victor Stinner [Tue, 4 Jun 2019 15:09:10 +0000 (17:09 +0200)]
bpo-36778: Remove outdated comment from CodePageTest (GH-13807)

CP65001Test has been removed.

5 years agobpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13809)
Victor Stinner [Tue, 4 Jun 2019 15:08:24 +0000 (17:08 +0200)]
bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13809)

Fix this MSVC warning:

    objects\codeobject.c(264): warning C4244: '=':
    conversion from 'Py_ssize_t' to 'unsigned char', possible loss of data

5 years agobpo-37142: Make asyncio stream tests more robust again (GH-13804)
Andrew Svetlov [Tue, 4 Jun 2019 13:44:44 +0000 (16:44 +0300)]
bpo-37142: Make asyncio stream tests more robust again (GH-13804)

Make test_stream_server_close() implementation following test_stream_server_abort().
 Add explicit timeout for tests that can hang.

5 years agoMake StreamServer.close() tests more robust (GH-13790)
Andrew Svetlov [Tue, 4 Jun 2019 11:37:10 +0000 (14:37 +0300)]
Make StreamServer.close() tests more robust (GH-13790)

5 years agoRevert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)"...
Łukasz Langa [Tue, 4 Jun 2019 11:03:20 +0000 (13:03 +0200)]
Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)" (#13802)

This reverts commit 0f0a30f4da4b529e0f7df857b9f575b231b32758.

5 years agoFix grammar (GH-13801)
Raymond Hettinger [Tue, 4 Jun 2019 10:40:23 +0000 (03:40 -0700)]
Fix grammar (GH-13801)

5 years agoMore updates to the annotated assignments docs (GH-13794)
Ivan Levkivskyi [Tue, 4 Jun 2019 10:37:46 +0000 (11:37 +0100)]
More updates to the annotated assignments docs (GH-13794)

5 years agobpo-37148: Fix asyncio test that check for warning when running the test suite with...
Pablo Galindo [Tue, 4 Jun 2019 10:26:20 +0000 (11:26 +0100)]
bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks (GH-13800)

5 years agobpo-35431: Drop the k <= n requirement (GH-13798)
Raymond Hettinger [Tue, 4 Jun 2019 08:23:06 +0000 (01:23 -0700)]
bpo-35431: Drop the k <= n requirement (GH-13798)

5 years agoRevert "bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)" (GH-13795)
Victor Stinner [Tue, 4 Jun 2019 01:15:09 +0000 (03:15 +0200)]
Revert "bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)" (GH-13795)

This reverts commit 396e0a8d9dc65453cb9d53500d0a620602656cfe.

5 years agoRevert "bpo-35621: Support running subprocesses in asyncio when loop is executed...
Andrew Svetlov [Tue, 4 Jun 2019 00:09:19 +0000 (03:09 +0300)]
Revert "bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread (#13630)" (GH-13793)

https://bugs.python.org/issue35621

5 years agobpo-37146: disable opcache when Py_DEBUG is defined (GH-13787)
Inada Naoki [Mon, 3 Jun 2019 22:38:10 +0000 (07:38 +0900)]
bpo-37146: disable opcache when Py_DEBUG is defined (GH-13787)

--with-pydebug is commonly used to find memory leaks.
But opcache makes it harder.
So disable opcache when Py_DEBUG is defined.

5 years agobpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)
Victor Stinner [Mon, 3 Jun 2019 21:31:04 +0000 (23:31 +0200)]
bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)

Add BaseEventLoop.wait_executor_on_close attribute: true by default.

loop.close() now waits for the default executor to finish by default.
Set loop.wait_executor_on_close attribute to False to not wait for
the executor.

5 years agobpo-37120: Add SSLContext.num_tickets (GH-13719)
Christian Heimes [Mon, 3 Jun 2019 19:00:10 +0000 (21:00 +0200)]
bpo-37120: Add SSLContext.num_tickets (GH-13719)

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-36868: Fix what's new for SSLContext.hostname_checks_common_name (GH-13248)
Christian Heimes [Mon, 3 Jun 2019 18:51:27 +0000 (20:51 +0200)]
bpo-36868: Fix what's new for SSLContext.hostname_checks_common_name (GH-13248)

What's new now mentions SSLContext.hostname_checks_common_name instead of SSLContext.host_flags.

https://bugs.python.org/issue36868

5 years agobpo-34271: Fix compatibility with 1.0.2 (GH-13728)
Christian Heimes [Mon, 3 Jun 2019 18:40:15 +0000 (20:40 +0200)]
bpo-34271: Fix compatibility with 1.0.2 (GH-13728)

Fix various compatibility issues with LibreSSL and OpenSSL 1.0.2
introduced by bpo-34271.

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-37081: Test with OpenSSL 1.1.1c (GH-13631)
Christian Heimes [Mon, 3 Jun 2019 18:10:19 +0000 (20:10 +0200)]
bpo-37081: Test with OpenSSL 1.1.1c (GH-13631)

Signed-off-by: Christian Heimes <christian@python.org>
5 years agoRevert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh...
Victor Stinner [Mon, 3 Jun 2019 16:14:24 +0000 (18:14 +0200)]
Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-13714)" (GH-13780)

This reverts commit 6a150bcaeb190d1731b38ab9c7a5d1a352847ddc.

5 years agobpo-37137: Fix test_asyncio: use TestCase.set_event_loop() (GH-13779)
Victor Stinner [Mon, 3 Jun 2019 15:49:04 +0000 (17:49 +0200)]
bpo-37137: Fix test_asyncio: use TestCase.set_event_loop() (GH-13779)

Replace asyncio.set_event_loop() with TestCase.set_event_loop() of
test_asyncio.utils: this method calls TestCase.close_loop() which
waits until the executor completes, to avoid leaking dangling
threads.

Inherit from test_asyncio.utils.TestCase rather than
unittest.TestCase.

5 years agobpo-37087: Adding native ID support for OpenBSD (GH-13654)
David Carlier [Mon, 3 Jun 2019 15:43:33 +0000 (16:43 +0100)]
bpo-37087: Adding native ID support for OpenBSD (GH-13654)

5 years agoDoc fix: duplicate object description of email.message (GH-13742)
Julien Palard [Mon, 3 Jun 2019 15:17:03 +0000 (17:17 +0200)]
Doc fix: duplicate object description of email.message (GH-13742)

5 years agoAdd credits to What's New in Python 3.8 (GH-13776)
Victor Stinner [Mon, 3 Jun 2019 14:28:01 +0000 (16:28 +0200)]
Add credits to What's New in Python 3.8 (GH-13776)

* Credit myself and others.
* Complete asyncio changes.

5 years agobpo-26219: remove unused code (GH-13775)
Inada Naoki [Mon, 3 Jun 2019 13:34:15 +0000 (22:34 +0900)]
bpo-26219: remove unused code (GH-13775)

This code was for deoptimization, which is removed from
PR-12884.

5 years agobpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884)
Inada Naoki [Mon, 3 Jun 2019 12:30:58 +0000 (21:30 +0900)]
bpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884)

This patch implements per opcode cache mechanism, and use it in
only LOAD_GLOBAL opcode.

Based on Yury's opcache3.patch in bpo-26219.

5 years agoPin macOS installer Sphinx to v2.0.1 (GH-13774)
Ned Deily [Mon, 3 Jun 2019 12:00:25 +0000 (08:00 -0400)]
Pin macOS installer Sphinx to v2.0.1 (GH-13774)

5 years agobpo-36231: Support building on macOS without /usr/include (GH-13773)
Ned Deily [Mon, 3 Jun 2019 10:34:48 +0000 (06:34 -0400)]
bpo-36231:  Support building on macOS without /usr/include (GH-13773)

5 years agobpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760)
Pablo Galindo [Mon, 3 Jun 2019 07:34:20 +0000 (08:34 +0100)]
bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760)

5 years agoIDLE: Fix typos in docs and comments (GH-13749)
Xtreak [Mon, 3 Jun 2019 04:21:15 +0000 (09:51 +0530)]
IDLE: Fix typos in docs and comments (GH-13749)

5 years agobpo-36546: Add design notes to aid future discussions (GH-13769)
Raymond Hettinger [Mon, 3 Jun 2019 04:07:43 +0000 (21:07 -0700)]
bpo-36546: Add design notes to aid future discussions (GH-13769)

5 years agoFix variable name copy/paste error in build-installer.py (GH-13038)
cclauss [Mon, 3 Jun 2019 03:19:44 +0000 (05:19 +0200)]
Fix variable name copy/paste error in build-installer.py (GH-13038)

5 years agobpo-33569 Preserve type information with dataclasses.InitVar (GH-8927)
Augusto Hack [Mon, 3 Jun 2019 02:14:48 +0000 (23:14 -0300)]
bpo-33569 Preserve type information with dataclasses.InitVar (GH-8927)

5 years agobpo-37069: tests use catch_unraisable_exception() (GH-13762)
Victor Stinner [Mon, 3 Jun 2019 01:51:43 +0000 (03:51 +0200)]
bpo-37069: tests use catch_unraisable_exception() (GH-13762)

Modify test_coroutines, test_cprofile, test_generators, test_raise,
test_ssl and test_yield_from to use
support.catch_unraisable_exception() rather than
support.captured_stderr().

test_thread: remove test_save_exception_state_on_error() which is now
updated. test_unraisable_exception() checks that sys.unraisablehook()
is called to handle _thread.start_new_thread() exception.

test_cprofile now rely on unittest for test discovery: replace
support.run_unittest() with unittest.main().

5 years agobpo-36896: Clarify that some types constructors are unstable (GH-13271)
Matthias Bussonnier [Mon, 3 Jun 2019 00:43:22 +0000 (17:43 -0700)]
bpo-36896: Clarify that some types constructors are unstable (GH-13271)

5 years agobpo-36027: Really fix "incompatible pointer type" compiler warning (GH-13761)
Petr Viktorin [Mon, 3 Jun 2019 00:28:29 +0000 (02:28 +0200)]
bpo-36027: Really fix "incompatible pointer type" compiler warning (GH-13761)

Apologies for the earlier hasty attempt.

5 years agobpo-36974: add some assertions for PEP 590 (GH-13682)
Jeroen Demeyer [Sun, 2 Jun 2019 23:57:22 +0000 (01:57 +0200)]
bpo-36974: add some assertions for PEP 590 (GH-13682)

5 years agobpo-36974: document PEP 590 (GH-13450)
Jeroen Demeyer [Sun, 2 Jun 2019 23:43:13 +0000 (01:43 +0200)]
bpo-36974: document PEP 590 (GH-13450)

5 years agoUpdate the annotated assignment docs (GH-13757)
Ivan Levkivskyi [Sun, 2 Jun 2019 23:41:00 +0000 (00:41 +0100)]
Update the annotated assignment docs (GH-13757)

5 years agobpo-37100: Fix test_coroutines with -Werror (GH-13756)
Victor Stinner [Sun, 2 Jun 2019 23:35:37 +0000 (01:35 +0200)]
bpo-37100: Fix test_coroutines with -Werror (GH-13756)

test_coroutines: test_unawaited_warning_when_module_broken() now uses
support.check_warnings() to catch expected RuntimeWarning.

5 years agobpo-37012: Clean up special cases in PyType_FromSpecWithBases slot assignments (GH...
Petr Viktorin [Sun, 2 Jun 2019 23:31:12 +0000 (01:31 +0200)]
bpo-37012: Clean up special cases in PyType_FromSpecWithBases slot assignments (GH-13496)

The main slot assignment loop is now if-else if ladder, making the
control flow clearer.

Based on suggestion by Victor Stinner in:
https://github.com/python/cpython/pull/10304/#issuecomment-491123026

5 years agoFix typos in docs and docstrings (GH-13745)
Xtreak [Sun, 2 Jun 2019 23:12:33 +0000 (04:42 +0530)]
Fix typos in docs and docstrings (GH-13745)

5 years agobpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warnings (GH-13758)
Petr Viktorin [Sun, 2 Jun 2019 23:08:14 +0000 (01:08 +0200)]
bpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warnings (GH-13758)

5 years agobpo-35621: Fix tests when SafeChildWatcher is expected instead of ThreadedChildWatche...
Andrew Svetlov [Sun, 2 Jun 2019 22:45:54 +0000 (01:45 +0300)]
bpo-35621: Fix tests when SafeChildWatcher is expected instead of ThreadedChildWatcher (GH-13754)

https://bugs.python.org/issue35621

5 years agobpo-36974: Make tp_call=PyVectorcall_Call work for inherited types (GH-13699)
Petr Viktorin [Sun, 2 Jun 2019 21:52:20 +0000 (23:52 +0200)]
bpo-36974: Make tp_call=PyVectorcall_Call work for inherited types (GH-13699)

When inheriting a heap subclass from a vectorcall class that sets
`.tp_call=PyVectorcall_Call` (as recommended in PEP 590), the subclass does
not inherit `_Py_TPFLAGS_HAVE_VECTORCALL`, and thus `PyVectorcall_Call` does
not work for it.

This attempts to solve the issue by:
* always inheriting `tp_vectorcall_offset` unless `tp_call` is overridden
  in the subclass
* inheriting _Py_TPFLAGS_HAVE_VECTORCALL for static types, unless `tp_call`
  is overridden
* making `PyVectorcall_Call` ignore `_Py_TPFLAGS_HAVE_VECTORCALL`

This means it'll be ever more important to only call `PyVectorcall_Call`
on classes that support vectorcall. In `PyVectorcall_Call`'s intended role
as `tp_call` filler, that's not a problem.

5 years agobpo-19184: Update the documentation of dis module. (GH-13652)
Michele Angrisano [Sun, 2 Jun 2019 21:34:12 +0000 (23:34 +0200)]
bpo-19184: Update the documentation of dis module. (GH-13652)

* bpo-19184: Update the documentation of dis module

* Explain the behavior of the number of arguments of RAISE_VARGARGS
  opcode.

* bpo-19184: Update blurb.

* bpo-19184: Fix typo in the dis Documentation.

* bpo-19184: Address review comments and improve the doc

* bpo-19184: Remove news file.

5 years agotest_gdb.test_pycfunction: test more calling conventions (GH-13668)
Petr Viktorin [Sun, 2 Jun 2019 21:11:24 +0000 (23:11 +0200)]
test_gdb.test_pycfunction: test more calling conventions (GH-13668)

As the code paths for various METH_* conventions are diverging due
to optimizations, we should check they continue to be covered by
GDB integration.

5 years agobpo-36829: test_threading: Fix a ref cycle (GH-13752)
Victor Stinner [Sun, 2 Jun 2019 21:08:41 +0000 (23:08 +0200)]
bpo-36829: test_threading: Fix a ref cycle (GH-13752)

5 years agobpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545)
Michele Angrisano [Sun, 2 Jun 2019 21:01:49 +0000 (23:01 +0200)]
bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545)

* bpo-37014: Update docstring and Documentation of fileinput.FileInput()

* Explain the behavior of fileinput.FileInput() when reading stdin.

* Update blurb.

* bpo-37014: Fix typo in the docstring and documentation.