Commit Graph

105621 Commits

Author SHA1 Message Date
Miss Islington (bot) a46728a570
bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)
Some portions of the pickle documentation hadn't been updated for the pickle protocol changes in Python 3.8 (new protocol 5, default protocol 4). This PR fixes those docs.

https://bugs.python.org/issue39426
(cherry picked from commit e9652e8d58)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2020-01-24 02:20:35 -08:00
Alex Rebert 5654f83b97 [3.8] bpo-35182: fix communicate() crash after child closes its pipes (GH-18117) (GH-18148)
When communicate() is called in a loop, it crashes when the child process
has already closed any piped standard stream, but still continues to be running

Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>.
(cherry picked from commit d3ae95e1e9)

Co-authored-by: Alex Rebert <alex@forallsecure.com>





https://bugs.python.org/issue35182
2020-01-23 15:31:29 -08:00
Miss Islington (bot) 5a2356be1a
bpo-39431: Also mention nonlocal in assignment quirk (GH-17375)
(cherry picked from commit 7142df5ea2)

Co-authored-by: Shanavas M <shanavas.m2@gmail.com>
2020-01-23 10:22:36 -08:00
Miss Islington (bot) 993811ffe7
bpo-39421: Fix posible crash in heapq with custom comparison operators (GH-18118)
* bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
(cherry picked from commit 79f89e6e5a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-01-23 07:22:25 -08:00
Miss Islington (bot) 545fc51d95
bpo-32989: IDLE - remove unneeded parameter (GH-18138)
IDLE does not pass a non-default _synchre in any of its calls to
pyparse.find_good_parse_start.
(cherry picked from commit f9e07e116c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-01-22 21:13:41 -08:00
Miss Islington (bot) 3b7618809d
bpo-39050: The Help button in IDLE's config menu works again (GH-17611)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2e43b64c94)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-01-22 20:13:29 -08:00
Miss Islington (bot) fdb21609d9 bpo-39425: Fix list.count performance regression (GH-18119) (GH-18120)
https://bugs.python.org/issue39425

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 14d80d0b60)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-01-22 18:11:22 +00:00
Victor Stinner f84f65be56
bpo-39413: os.unsetenv() is not available on Windows (GH-18108)
Update os.unsetenv() documentation: it is not available on Windows.
2020-01-22 13:50:40 +01:00
Miss Islington (bot) a755410e05
closes bpo-39415: Remove unused codes from longobject.c complexobject.c floatobject.c. (GH-18105)
(cherry picked from commit 0d5eac8c32)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-01-21 19:26:34 -08:00
Miss Islington (bot) 41b3e87930 PyLong_AsLongLong() docs should say 'long long' (GH-18082) (GH-18110)
(cherry picked from commit 47be7d0108)

Co-authored-by: Keith Erskine <toastie604@gmail.com>

Co-authored-by: Keith Erskine <toastie604@gmail.com>
2020-01-21 19:22:21 +00:00
Victor Stinner f4e3e1c4d4
Move test_math tests (GH-18098) (GH-18102)
testPerm() and testComb() belong to MathTests, not to IsCloseTests().

(cherry picked from commit 59e2d26b25)
2020-01-21 15:04:33 +01:00
Miss Islington (bot) ab0d8e356e
bpo-39389: gzip: fix compression level metadata (GH-18077)
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
(cherry picked from commit eab3b3f1c6)

Co-authored-by: William Chargin <wchargin@gmail.com>
2020-01-21 03:42:49 -08:00
Miss Islington (bot) 060ad2fc15
bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)
Fix comments and add tests for editor newline_and_indent_event method.
Remove unused None default for function parameter of pyparse find_good_parse_start method
and code triggered by that default.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ec64640a2c)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2020-01-21 02:29:39 -08:00
Miss Islington (bot) 070e68a59d
improve the documentation of the LOAD_METHOD and CALL_METHOD (GH-18079)
(cherry picked from commit 8698b34b68)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2020-01-20 17:12:07 -08:00
Miss Islington (bot) c1964e0942
bpo-39383: Mention Darwin as a potential value for platform.system() (GH-18054)
(cherry picked from commit 8d57a4182f)

Co-authored-by: Peter Bittner <django@bittner.it>
2020-01-20 15:28:43 -08:00
Miss Islington (bot) 5cadd3fe3a
bpo-39386: Prevent double awaiting of async iterator (GH-18081)
(cherry picked from commit a96e06db77)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2020-01-20 15:06:40 -08:00
Miss Islington (bot) 6aeed01901
Fix asyncio.get_event_loop() documentation (GH-18051)
Mention that the function implicitly creates new event loop only if called from the main thread.
(cherry picked from commit 2c49becc69)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2020-01-20 14:52:35 -08:00
Miss Islington (bot) 4cdb75890a
bpo-38400 Don't check for NULL linked list pointers in _PyObject_IsFreed (GH-16630)
Some objects like Py_None are not initialized with conventional means
that prepare the circular linked list pointers, leaving them unlinked
from the rest of the objects. For those objects, NULL pointers does
not mean that they are freed, so we need to skip the check in those
cases.
(cherry picked from commit 36e33c360e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-01-19 15:43:37 -08:00
Miss Islington (bot) 23793edf0d
bpo-35561: Supress valgrind false alarm on epoll_ctl(event) (GH-18060)
Update Misc/valgrind-python.supp to suppress the false alarm.
(cherry picked from commit d8ef64422a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-01-19 14:44:35 -08:00
Miss Islington (bot) c7b16f8588
Fix typo from base to based (GH-18055)
(cherry picked from commit 558f078911)

Co-authored-by: Michael Haas <micha2718l@gmail.com>
2020-01-19 02:48:04 -08:00
Miss Islington (bot) 34ece35a0d Fix Lock.locked() to remove extra bold highlighting (GH-18042) (#18043)
(cherry picked from commit ef8844f1bc)

Co-authored-by: Grant Jenks <grant.jenks@gmail.com>

Co-authored-by: Grant Jenks <grant.jenks@gmail.com>
2020-01-17 15:02:06 -08:00
Miss Islington (bot) 19bd3a1862
bpo-39348: Fix code highlight for the SOCK_NONBLOCK example (GH-18018)
The previous double colon was wrongly place directly after Therefore.
Which produced a block without syntax highlighting. This fixes it
by separating the double colon from the text. As a result, sphinx now
properly highlights the python code.

https://bugs.python.org/issue39348
(cherry picked from commit fad8b5674c)

Co-authored-by: Oz N Tiram <oz.tiram@noris.de>
2020-01-15 16:01:21 -08:00
Miss Islington (bot) 54abd28b2c
[3.8] Fix typo in multiprocessing.pool.AsyncResult.successful doc. (GH-17932) (GH-18015)
Since 3.7 `successful` raises a `ValueError` as explained in the next text block from the documentation:

_Changed in version 3.7: If the result is not ready, ValueError is raised instead of AssertionError._

No issue associated with this PR.
Should be backported in 3.7 and 3.8.
(cherry picked from commit dc0284ee8f)


Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>

Automerge-Triggered-By: @pitrou
2020-01-15 12:19:21 -08:00
Miss Islington (bot) 92135775ce
Fix compiler warning on Windows (GH-18012)
Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be811fa
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d39303f)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2020-01-15 09:07:09 -08:00
Miss Islington (bot) 9f220e4968
Fix documentation in code.py (GH-17988)
(cherry picked from commit b4cdb3f60e)

Co-authored-by: Kyle Pollina <kylepollina@protonmail.com>
2020-01-14 12:13:59 -08:00
Karthikeyan Singaravelan 9955f33cdb [3.8] bpo-39033: Fix NameError in zipimport during hash validation (GH-17588) (GH-17642)
Fix `NameError` in `zipimport` during hash validation and add a regression test.

(cherry picked from commit 79f02fee1a)



https://bugs.python.org/issue39033
2020-01-14 03:39:19 -08:00
Victor Stinner 9362f8526e
bpo-39310: Update sys.float_info documentation (GH-17982)
Specify that sys.float_info.min is only the minimum normalized float.
2020-01-13 20:24:12 +01:00
Miss Islington (bot) 9671b6b3b3
bpo-39307: Fix memory leak on error path in parsetok (GH-17953)
(cherry picked from commit 7ba6f18de2)

Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
2020-01-13 02:54:24 -08:00
toonarmycaptain f1f0c58d38 [3.8] Fix typos in Misc/NEWS.d (GH-17930) 2020-01-13 00:56:26 +02:00
Miss Islington (bot) ef0af30e50
bpo-3530: Add advice on when to correctly use fix_missing_locations in the AST docs (GH-17172)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 6680f4a9f5)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2020-01-12 12:44:33 -08:00
Miss Islington (bot) 3043ec7d6a
bpo-38293: Allow shallow and deep copying of property objects (GH-16438)
Copying property objects results in a TypeError. Steps to reproduce:

```
>>> import copy
>>> obj = property()
>>> copy.copy(obj)
````

This affects both shallow and deep copying.
My idea for a fix is to add property objects to the list of "atomic" objects in the copy module.
These already include types like functions and type objects.

I also added property objects to the unit tests test_copy_atomic and test_deepcopy_atomic. This is my first PR, and it's highly likely I've made some mistake, so please be kind :)

https://bugs.python.org/issue38293
(cherry picked from commit 9f3fc6c5b4)

Co-authored-by: Guðni Natan Gunnarsson <1493259+GudniNatan@users.noreply.github.com>
2020-01-12 10:04:18 -08:00
Miss Islington (bot) eb9ba2f66d bpo-16575: Disabled checks for union types being passed by value. (GH-17960) (GH-17964)
Although the underlying libffi issue remains open, adding these
checks have caused problems in third-party projects which are in
widespread use. See the issue for examples.

The corresponding tests have also been skipped.

(cherry picked from commit c12440c371)
2020-01-12 11:41:07 +00:00
Miss Islington (bot) 33dd75a28f
bpo-38356: Fix ThreadedChildWatcher thread leak in test_asyncio (GH-16552)
Motivation for this PR (comment from @vstinner in bpo issue):
```
Warning seen o AMD64 Ubuntu Shared 3.x buildbot:
https://buildbot.python.org/all/GH-/builders/141/builds/2593

test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ...
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
```
The following implementation details for the new method are TBD:

1) Public vs private

2) Inclusion in `close()`

3) Name

4) Coroutine vs subroutine method

5) *timeout* parameter

If it's a private method, 3, 4, and 5 are significantly less important.

I started with the most minimal implementation that fixes the dangling threads without modifying the regression tests, which I think is particularly important. I typically try to avoid directly modifying existing tests as much as possible unless it's necessary to do so. However, I am open to changing any part of this.

https://bugs.python.org/issue38356
(cherry picked from commit 0ca7cc7fc0)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-01-12 03:21:00 -08:00
Miss Islington (bot) a240f05456
bpo-39233: Update positional-only section in the glossary (GH-17874)
https://bugs.python.org/issue39233
(cherry picked from commit 9a669d58e8)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-01-12 03:03:15 -08:00
Miss Islington (bot) 98b1c0c7ac bpo-39297: Update for importlib_metadata 1.4. (GH-17947) (GH-17952)
* bpo-39297: Update for importlib_metadata 1.4. Includes performance updates.

* 📜🤖 Added by blurb_it.

* Update blurb

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 136735c1a2)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2020-01-11 10:56:57 -05:00
Miss Islington (bot) 0f40482fde
Fix host in address of socket.create_server example. (GH-17706)
Host as None in address raises TypeError since it should be string, bytes or bytearray.
(cherry picked from commit 43682f1e39)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
2020-01-10 21:39:01 -08:00
Miss Islington (bot) df2fb60cf7
[3.8] Add test cases for dataclasses. (GH-17909) (GH-17919)
* Add test cases for dataclasses.

* Add test for repr output of field.
* Add test for ValueError to be raised when both default and default_factory are passed.
(cherry picked from commit eef1b027ab)


Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>

Automerge-Triggered-By: @ericvsmith
2020-01-10 04:12:08 -08:00
Miss Islington (bot) 33e033da3c
bpo-39235: Fix end location for genexp in call args (GH-17925)
The fix changes copy_location() to require an extra node from which to extract the end location, and fixing all 5 call sites.

https://bugs.python.org/issue39235
(cherry picked from commit a796d8ef9d)

Co-authored-by: Guido van Rossum <guido@python.org>
2020-01-09 11:39:00 -08:00
Miss Islington (bot) e47a7e3a7a Fix typo in test's docstring (GH-17856) (GH-17923)
* Fix typo in test's docstring. contination -> continuation.
(cherry picked from commit 2f65aa4658)

Co-authored-by: Daniel Hahler <git@thequod.de>

Co-authored-by: Daniel Hahler <github@thequod.de>
2020-01-09 23:03:05 +05:30
Miss Islington (bot) 8c08518c25
bpo-25172: Reduce scope of crypt import tests (GH-17881)
(cherry picked from commit ed367815ee)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-01-09 09:19:59 -08:00
Miss Islington (bot) 20c990229e
bpo-39161: Document multi-phase init modules under Py_NewInterpreter() (GH-17896)
\+ this also adds a stronger warning against sharing objects between (sub-)interpreters.

https://bugs.python.org/issue39161
(cherry picked from commit 6c5d661342)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2020-01-09 04:27:35 -08:00
Miss Islington (bot) 45e5750a01
closes bpo-39262: Use specific out-of-memory message in _sharedexception_bind. (GH-17908)
(cherry picked from commit 5cae042f68)

Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
2020-01-08 19:07:38 -08:00
Miss Islington (bot) b24e4fac03
bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903)
(cherry picked from commit 2e6a8efa83)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-01-08 07:48:33 -08:00
Miss Islington (bot) 39a5c889d3
bpo-38871: Fix lib2to3 for filter-based statements that contain lambda (GH-17780)
Correctly parenthesize filter-based statements that contain lambda
expressions in lib2to3.
(cherry picked from commit b821173b54)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-01-07 09:52:06 -08:00
Miss Islington (bot) bff48c6734 bpo-39198: Ensure logging global lock is released on exception in isEnabledFor (GH-17689) (GH-17897)
(cherry picked from commit 950c6795aa)
2020-01-07 17:03:23 +00:00
Andrew Svetlov 4112a3da2e
[3.8] bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863) (#17894)
https://bugs.python.org/issue39191.
(cherry picked from commit 10ac0cded2)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2020-01-07 16:55:19 +02:00
Miss Islington (bot) a6b37589a0
bpo-38623: Doc: Add section for site module CLI. (GH-17858)
(cherry picked from commit ca94677a62)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-01-07 00:04:43 -08:00
Miss Islington (bot) 6a8284d8f1
Doc: Change Python 2 status to EOL. (GH-17885)
(cherry picked from commit f4800b8ed3)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-01-06 22:59:28 -08:00
Miss Islington (bot) fb59f5ffe8
bpo-39041: Fix coverage upload command for GitHub Actions (GH-17873)
https://bugs.python.org/issue39041

Automerge-Triggered-By: @zooba
(cherry picked from commit b1ce22d086)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-01-06 13:41:33 -08:00
Miss Islington (bot) a9a43c221b
bpo-29778: Fix incorrect NULL check in _PyPathConfig_InitDLLPath() (GH-17818)
(cherry picked from commit 7b79dc9200)

Co-authored-by: Anthony Wee <awee@box.com>
2020-01-06 09:17:36 -08:00