Commit Graph

22259 Commits

Author SHA1 Message Date
Miss Islington (bot) 0bda8941fc Fix bpo number in News file. (GH-14260) (GH-14261)
(cherry picked from commit 0c48618cc0)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2019-06-20 06:50:59 -04:00
Serhiy Storchaka f5b89afde1
bpo-37163: Deprecate passing argument obj of dataclasses.replace() by keyword. (GH-13877) 2019-06-19 10:33:27 +03:00
Miss Islington (bot) b626b113ae
bpo-37325: Fix focus traversal for 2 IDLE dialogs (GH-14209)
Tab now moves focus across and down for Help Source and Custom Run.
(cherry picked from commit 54cf2e0780)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-06-18 14:36:09 -07:00
Miss Islington (bot) 35aa0b0ced
bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)
For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.

This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.

bpo-34903
(cherry picked from commit 6b9c204ee7)

Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
2019-06-18 12:21:27 -07:00
Miss Islington (bot) a7072ff56e
bpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14180)
(cherry picked from commit d8f336fdc1)

Co-authored-by: animalize <animalize@users.noreply.github.com>
2019-06-18 03:15:55 -07:00
Miss Islington (bot) bd75abfefe
bpo-34631: Updated OpenSSL to 1.1.1c in macOS installer (GH-14187)
(cherry picked from commit f3fb8393e3)

Co-authored-by: Ned Deily <nad@python.org>
2019-06-18 01:39:53 -07:00
Miss Islington (bot) ae526ee320
bpo-5680: IDLE: Customize running a module (GH-13763)
The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
(cherry picked from commit 201bc2d18b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-06-17 19:47:55 -07:00
Miss Islington (bot) 8cb8d5de4b
bpo-37189: Export old PyRun_XXX() functions (GH-14142)
Many PyRun_XXX() functions like PyRun_String() were no longer
exported in libpython38.dll by mistake. Export them again to fix the
ABI compatibiliy.
(cherry picked from commit 343ed0ffe0)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-17 15:42:30 -07:00
Miss Islington (bot) 02f7f741e8
bpo-37321: Edit IDLE subprocess connection error messages. (GH-14170)
Mainly, add a doc reference to message in pyshell.
(cherry picked from commit 8fac122109)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-06-17 14:51:08 -07:00
Miss Islington (bot) 4b68a8eb0d bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) (GH-14168)
Measure required height by quickly maximizing once per screen.
A search for a better method failed.
(cherry picked from commit 5bff3c86ab)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-06-17 16:15:53 -04:00
Miss Islington (bot) c28c135824 bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer (GH-14163)
(cherry picked from commit a268edd6a4)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-06-17 12:54:18 -07:00
Miss Islington (bot) 988fff5d0e
bpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865)
(cherry picked from commit 2e9954d347)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
2019-06-17 05:12:42 -07:00
Miss Islington (bot) 693945d45d bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) (GH-14140)
On Windows, os.dup() no longer creates an inheritable fd when handling a
character file.
(cherry picked from commit 28fca0c422)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-06-17 10:45:26 +02:00
Miss Islington (bot) e784f9f1c3
bpo-28805: document METH_FASTCALL (GH-14079)
(cherry picked from commit 5600b5e1b2)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
2019-06-16 16:25:37 -07:00
Miss Islington (bot) 58a1a76bae
bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791)
Co-Authored-By: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit 8047e0e1c6)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-06-16 00:07:54 -07:00
Miss Islington (bot) f0e5c01182
bpo-28009: Fix uuid SkipUnless logic to be based on platform programs capable of introspection (GH-12777)
uuid could try fallback methods that had no chance of working on a particular
platform, and this could cause spurious test failures, as well as degraded
performance as fallback options were tried and failed.

This fixes both the uuid module and its test's SkipUnless logic to use a
prefiltered list of techniques that may at least potentially work on that platform.

Patch by Michael Felt (aixtools).
(cherry picked from commit 3a1d50e7e5)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2019-06-15 09:10:34 -07:00
Andrew Svetlov b6ff2cd8c5
[3.8] Use threadpool for reading from file in sendfile fallback mode (GH-14076) (GH-14102)
(cherry picked from commit 0237265e82)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-06-15 14:55:52 +03:00
Miss Islington (bot) bb07321c6a
bpo-37279: Fix asyncio sendfile support when extra data are sent in fallback mode. (GH-14075)
(cherry picked from commit ef2152354f)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-06-15 04:24:16 -07:00
Miss Islington (bot) b0f6fa8d7d
bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081)
(cherry picked from commit 9765efcb39)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-06-14 09:43:22 -07:00
Miss Islington (bot) 0c2eb6d210
bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() (GH-14080)
(cherry picked from commit f0749da9a5)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-06-14 09:12:48 -07:00
Miss Islington (bot) 8b66dbb212
bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)
Join the thread to prevent leaking a running thread and leaking a
reference.

Cleanup also the test:

* asyncioWindowsProactorEventLoopPolicy became the default policy,
  there is no need to set it manually.
* Only start the thread once the loop is running.
* Use a shorter sleep in the thread (100 ms rather than 1 sec).
* Use close_loop(loop) rather than loop.close().
* Use longer variable names.
(cherry picked from commit 07559450b2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-14 04:53:13 -07:00
Miss Islington (bot) 7cd581a6bf
bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)
Fix a regression introduced by af8646c805 that was causing code of the form:

if True and False:
   do_something()

to be optimized incorrectly, eliminating the block.
(cherry picked from commit 05f8318655)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-06-13 23:13:24 -07:00
Miss Islington (bot) 886d83e5aa
bpo-37077: Add native thread ID (TID) for AIX (GH-13624)
This is the followup  for issue36084

https://bugs.python.org/issue37077
(cherry picked from commit d0eeb936d8)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2019-06-13 15:54:04 -07:00
Miss Islington (bot) 5282b3b1d2
bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)
The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.
(cherry picked from commit 3498c642f4)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-06-13 11:35:40 -07:00
Miss Islington (bot) b4f5b21253
bpo-37261: Fix support.catch_unraisable_exception() (GH-14052)
The __exit__() method of test.support.catch_unraisable_exception
context manager now ignores unraisable exception raised when clearing
self.unraisable attribute.
(cherry picked from commit 6d22cc8e90)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-13 06:25:59 -07:00
Miss Islington (bot) 0a9baec16c bpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073) (GH-14032)
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].

This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.

In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7

@zooba

https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
2019-06-13 15:22:51 +02:00
Miss Islington (bot) cbda40db7b
bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016)
Allow pure Python implementation of pickle to work
even when the C _pickle module is unavailable.

Fix test_pickle when _pickle is missing: declare PyPicklerHookTests
outside "if has_c_implementation:" block.
(cherry picked from commit 63ab4ba07b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-06-13 05:28:11 -07:00
Victor Stinner e40a97a721
[3.8] bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050)
* bpo-36402: Fix threading._shutdown() race condition (GH-13948)

Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.

* Add threading._shutdown_locks: set of Thread._tstate_lock locks
  of non-daemon threads used by _shutdown() to wait until all Python
  thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
  threading._shutdown_locks.
* Add test_finalization_shutdown() test.

(cherry picked from commit 468e5fec8a)

* bpo-36402: Fix threading.Thread._stop() (GH-14047)

Remove the _tstate_lock from _shutdown_locks, don't remove None.

(cherry picked from commit 6f75c87375)
2019-06-13 13:44:23 +02:00
Miss Islington (bot) c80183e6ca
bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071)
(cherry picked from commit 8725c83ed5)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
2019-06-13 00:27:23 -07:00
Victor Stinner c15a682603
bpo-37223: test_io: silence destructor errors (GH-14031)
* bpo-18748: Fix _pyio.IOBase destructor (closed case) (GH-13952)

_pyio.IOBase destructor now does nothing if getting the closed
attribute fails to better mimick _io.IOBase finalizer.

(cherry picked from commit 4f6f7c5a61)

* bpo-37223: test_io: silence destructor errors (GH-13954)

Implement also MockNonBlockWriterIO.seek() method.

(cherry picked from commit b589cef9c4)

* bpo-37223, test_io: silence last 'Exception ignored in:' (GH-14029)

Use catch_unraisable_exception() to ignore 'Exception ignored in:'
error when the internal BufferedWriter of the BufferedRWPair is
destroyed. The C implementation doesn't give access to the
internal BufferedWriter, so just ignore the warning instead.

(cherry picked from commit 913fa1c824)
2019-06-13 00:23:49 +02:00
Miss Islington (bot) c9ca96dd96
bpo-37160: Thread native ID NetBSD support (GH-13835)
(cherry picked from commit 5287022eee)

Co-authored-by: David Carlier <dcarlier@afilias.info>
2019-06-12 09:03:04 -07:00
Miss Islington (bot) 3ba21070c6 bpo-35766: Change format for feature_version to (major, minor) (GH-13992) (GH-13993)
(A single int is still allowed, but undocumented.)

https://bugs.python.org/issue35766
(cherry picked from commit 10b55c1643)

Co-authored-by: Guido van Rossum <guido@python.org>
2019-06-12 02:55:28 +02:00
Abhilash Raj 36eea7af48 [3.8] bpo-36520: Email header folded incorrectly (GH-13608) (GH-13909)
* [bpo-36520](https://bugs.python.org/issue36520): reset the encoded word offset when starting a new
line during an email header folding operation

* 📜🤖 Added by blurb_it.

* [bpo-36520](https://bugs.python.org/issue36520): add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests

* [bpo-36520](https://bugs.python.org/issue36520): fix whitespace issue

* [bpo-36520](https://bugs.python.org/issue36520): changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue GH-" in comments
(cherry picked from commit f6713e84af)

Co-authored-by: websurfer5 <49998481+websurfer5@users.noreply.github.com>


https://bugs.python.org/issue36520
2019-06-11 16:28:10 -07:00
Miss Islington (bot) 83abd9658b
bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971)
If internal tasks weak set is changed by another thread during iteration.

https://bugs.python.org/issue36607
(cherry picked from commit 65aa64fae8)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-06-11 13:32:12 -07:00
Miss Islington (bot) 583ff84351 bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13967)
(cherry picked from commit 1f11cf9521)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-06-11 01:41:23 -07:00
Miss Islington (bot) bac6e63fd6
bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940)
Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue37215
(cherry picked from commit 8a8b59c979)

Co-authored-by: Christian Heimes <christian@python.org>
2019-06-10 08:38:23 -07:00
Miss Islington (bot) 3f7629d93c
bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)
(cherry picked from commit 45a14942c9)

Co-authored-by: Marcin Niemira <marcin.niemira@gmail.com>
2019-06-08 14:25:21 -07:00
Miss Islington (bot) feaceaafe8 bpo-37178: Allow a one argument form of math.perm() (GH-13905) (GH-13919)
(cherry picked from commit e119b3d136)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-06-08 09:17:33 -07:00
Miss Islington (bot) 6324ac1293
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.
(cherry picked from commit 8cc605acdd)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-06-08 08:15:02 -07:00
Miss Islington (bot) c5daae4ef6
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
(cherry picked from commit d407d2a726)

Co-authored-by: Philipp A <flying-sheep@web.de>
2019-06-08 05:24:59 -07:00
Miss Islington (bot) 606ac581e2
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
(cherry picked from commit 03d5831a2d)

Co-authored-by: zygocephalus <grrrr@protonmail.com>
2019-06-07 14:11:59 -07:00
Petr Viktorin 9689f80e61 bpo-37191: Avoid declaration-after-statement in header included from Python.h (GH-13887) 2019-06-07 18:31:56 +02:00
Victor Stinner 3576266760
bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895)
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.

(cherry picked from commit 3bf0f3ad20)
2019-06-07 17:41:39 +02:00
Zackery Spytz dd492d9c35 [3.8] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13891)
(cherry picked from commit dc2476500d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-06-07 16:22:58 +02:00
Miss Islington (bot) 295fe32e39
bpo-37177: make IDLE's search dialogs transient (GH-13869)
This avoids the search dialogs being hidden behind the editor window.
(cherry picked from commit 554450fb4e)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-06-06 23:17:13 -07:00
Miss Islington (bot) 21ce2454de
bpo-37165: Convert _count_elements to the argument clinic (GH-13848)
(cherry picked from commit e985804207)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-06-05 16:20:58 -07:00
Miss Islington (bot) 9ddb77741e bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832) (GH-13843)
(cherry picked from commit 6c01ebcc0d)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-06-05 08:18:13 -07:00
Miss Islington (bot) 87a865ec15
bpo-34767: Do not always create a collections.deque() in asyncio.Lock() (GH-13834)
https://bugs.python.org/issue34767
(cherry picked from commit 9aa78566fb)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-06-05 03:17:42 -07:00
Miss Islington (bot) 39346ff60a
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.
(cherry picked from commit 949fe976d5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-06-04 19:11:42 -07:00
Łukasz Langa 23d7ce7471 Python 3.8.0b1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAlz2r2cACgkQsmmV4xAl
 BWhasQ/9EDLL+KtFUdi3iMr7+C1UN/2u2v3OnOsZQA0WE7TfEebbf5GS4baN/pHk
 PslVY6kRqRfQIxjemXFpq52mn9+3SUE4m3avkgnUZMu8XEaUczM4IdcizGMO3qNr
 c1iz6BraJo8gZ1g+dNcRbEc89V9e1SzrBZOR9MXGjxxo0HHEPdjW9ptg1BtHq9To
 n4iivdQSnnxzP7D7SpItWPL/gFv90GBbXaTRerGUlmj/uwnBhzHB1fi4r+WDn8yR
 4AiFVSlUFpTXYOiH5A3MYQtLq8kH9AAmo6Bmj/73NvChxv7GV5v968+tlEWEK+/h
 UtTUEw8L/oSH74m8wd0q0tQdTe8VJgtwKyR6h5GLL8TLa73nN/jK4Koqirpc8mpK
 DcHVLpxHQ/yhPtAcQXp81qqJSbhnPOvbRjNQP5bHcNIl8p+OsF7N9z/tu6gmMorO
 k+f2OCOC0ZsG/EL7DPz6kG6+Cy5NhA+/IJ9I3Ayk6AsSjbzqtgai3bKKVF3s27r8
 OIZprMAVKsmsPpEfuSG8rshKxmLH5/n7YuwSuMmWXv06QspfG43zxp1VYq94zBoI
 wpBy8QxBwef7oDpMI+WgE/g8Prj1NmQuIy7co/pZDsOHeQWr96z90BcpSX8XKHKT
 9W829jFKoQEnGnuFgoUxacR8a4bQKVla5mVFvjUtGjb9GS9kJkk=
 =V2hy
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAlz2zD8QHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaIw/EACXkzdCOq5D/itTvFElnNWjlon8ot4toVEf
 zw4isSYiYS4B3dBI6+VyCZWNxR5F6fwfyhPLHf7CzPn+7Yp5+dX9//x0HqhNLQCY
 PmwuYG/4nWcww8UhUweGVI1u8Fjrw+LzLJPVyhLQia/TXUBfCFcggS2xo9S6mSsA
 isJr9RaCDaoit6ZjFIuo+sOn2YTx2eYBe6LlhlSx9zz0ayyy+ADqPeUq/hoEFDPD
 EXUOwsLJPo/vu7sFqKOhHBWtMCcnvkkbiBLrAmHS2vhKjl22zVez0lUiVxLUlhZT
 WcmfRkCtoBKu2rYbm85pt08fgF/CnHq9oO57yDBZ4j/Lv0HqQkp+/yZRzWqSSThw
 vw4z4Ur3l06ZMxsTH+Dd/xjqc41AlpedJNhuAgOf0URrbl4H48y5U6AG1vZWrpAk
 wUsTF1QGXL1SAam2pjI2cTpjRaCh3RK2wf0KPewxUpcvcRcGtGAbq+EFHHOFg2Lm
 AcxAuAEUXKcyJQnLtFiIOWJFttaRzAB6zq8sEL0kS1BfAEspqTk+ZdnDY1ajppqu
 7sb3/TGrxa+38Th5iVvUehHGQqrQYLORVn0w8PKUXunbUbv6AYoDJHKxiOUO4JsX
 L5jZEPjTeG0BjntTnvVYdgqPXAVbJr76LmlCPkPcmSruvXrfZP1OOi+ybepwbTpD
 8pw88nSTuA==
 =zOCJ
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.0b1'

Python 3.8.0b1
2019-06-04 21:53:26 +02:00