]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-38781: Clear buffer in MemoryHandler flush (GH-17132)
Daniel Andersson [Wed, 13 Nov 2019 09:03:45 +0000 (10:03 +0100)] 
bpo-38781: Clear buffer in MemoryHandler flush (GH-17132)

This makes it easier to use a custom buffer when subclassing
MemoryHandler (by avoiding the explicity empty list literal
assignment in the flush method). For example, collection.deque
can now be used without any modifications to MemoryHandler.flush.

The same applies to BufferingHandler.

5 years agobpo-4630: Add cursor no-blink option for IDLE (GH-16960)
Zackery Spytz [Wed, 13 Nov 2019 07:13:33 +0000 (00:13 -0700)] 
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)

This immediately toggles shell, editor, and output windows, but does not affect other input widgets.

5 years agoFix minor typos. (GH-17095)
Shu [Wed, 13 Nov 2019 03:12:11 +0000 (22:12 -0500)] 
Fix minor typos. (GH-17095)

5 years agoAdd Ilya Kulakov to Misc/ACKS. (GH-17130)
Ilya Kulakov [Wed, 13 Nov 2019 02:33:04 +0000 (18:33 -0800)] 
Add Ilya Kulakov to Misc/ACKS. (GH-17130)

Contributions on bpo-26467 and bpo-29302.

5 years agocloses bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17112)
Benjamin Peterson [Tue, 12 Nov 2019 22:51:34 +0000 (14:51 -0800)] 
closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17112)

This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode.

5 years agobpo-38723: Pdb._runscript should use io.open_code() instead of open() (GH-17127)
jsnklln [Tue, 12 Nov 2019 22:42:47 +0000 (17:42 -0500)] 
bpo-38723: Pdb._runscript should use io.open_code() instead of open() (GH-17127)

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
6 years agobpo-38738: Fix formatting of True and False. (GH-17083)
Serhiy Storchaka [Tue, 12 Nov 2019 14:57:03 +0000 (16:57 +0200)] 
bpo-38738: Fix formatting of True and False. (GH-17083)

* "Return true/false" is replaced with "Return ``True``/``False``"
  if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".

6 years agobpo-36974: expand call protocol documentation (GH-13844)
Jeroen Demeyer [Tue, 12 Nov 2019 13:08:00 +0000 (14:08 +0100)] 
bpo-36974: expand call protocol documentation (GH-13844)

CC @encukou

I'm also adding Petr Viktorin as contributor for vectorcall in the "what's new" section.

https://bugs.python.org/issue36974

Automerge-Triggered-By: @encukou
Automerge-Triggered-By: @encukou
6 years agobpo-38421: Update email.utils documentation (GH-16678)
David K [Tue, 12 Nov 2019 12:38:46 +0000 (12:38 +0000)] 
bpo-38421: Update email.utils documentation (GH-16678)

Updates documentation around email.utils.parsedate_tz().

Currently, the documentation specifies that when a string without a is timezone passed to parsedate_tz(), the last tuple is returned as ```None```.

This is no longer true since Python 3.3

https://bugs.python.org/issue38421

6 years agobpo-16576: Add checks for bitfields passed by value to functions. (GH-17097)
Vinay Sajip [Tue, 12 Nov 2019 12:29:34 +0000 (12:29 +0000)] 
bpo-16576: Add checks for bitfields passed by value to functions. (GH-17097)

6 years agobpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103)
Zackery Spytz [Tue, 12 Nov 2019 10:54:10 +0000 (03:54 -0700)] 
bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103)

6 years agobpo-38385: Fix iterator/iterable terminology in statistics docs (GH-17111)
Raymond Hettinger [Tue, 12 Nov 2019 07:35:06 +0000 (23:35 -0800)] 
bpo-38385: Fix iterator/iterable terminology in statistics docs (GH-17111)

6 years agobpo-38565: add new cache_parameters method for lru_cache (GH-16916)
Manjusaka [Tue, 12 Nov 2019 07:30:18 +0000 (15:30 +0800)] 
bpo-38565: add new cache_parameters method for lru_cache (GH-16916)

6 years agobpo-38771: Explict test for None in code example (GH-17108)
Jonathan Scholbach [Tue, 12 Nov 2019 00:49:41 +0000 (01:49 +0100)] 
bpo-38771:  Explict test for None in code example (GH-17108)

6 years agobpo-38438: Simplify argparse "star nargs" usage. (GH-17106)
Brandt Bucher [Mon, 11 Nov 2019 20:47:48 +0000 (12:47 -0800)] 
bpo-38438: Simplify argparse "star nargs" usage. (GH-17106)

6 years agobpo-38761: Register WeakSet as a MutableSet (GH-17104)
Raymond Hettinger [Mon, 11 Nov 2019 04:12:04 +0000 (20:12 -0800)] 
bpo-38761: Register WeakSet as a MutableSet (GH-17104)

6 years agoMinor readability improvement for argument handling in itertools.repeat() (GH-17101)
Raymond Hettinger [Sun, 10 Nov 2019 04:28:31 +0000 (20:28 -0800)] 
Minor readability improvement for argument handling in itertools.repeat()  (GH-17101)

6 years agobpo-38635: Simplify decoding the ZIP64 extra field and make it tolerant to extra...
Serhiy Storchaka [Sat, 9 Nov 2019 11:13:36 +0000 (13:13 +0200)] 
bpo-38635: Simplify decoding the ZIP64 extra field and make it tolerant to extra data. (GH-16988)

6 years agoClarify amount of dots between package and subpackage (GH-17092)
Shu [Fri, 8 Nov 2019 20:26:35 +0000 (15:26 -0500)] 
Clarify amount of dots between package and subpackage (GH-17092)

6 years agobpo-38644: Add _PyObject_VectorcallTstate() (GH-17052)
Victor Stinner [Fri, 8 Nov 2019 09:05:17 +0000 (10:05 +0100)] 
bpo-38644: Add _PyObject_VectorcallTstate() (GH-17052)

* Add _PyObject_VectorcallTstate() function: similar to
  _PyObject_Vectorcall(), but with tstate parameter
* Add tstate parameter to _PyObject_MakeTpCall()

6 years agobpo-22367: Add tests for fcntl.lockf(). (GH-17010)
Dong-hee Na [Thu, 7 Nov 2019 20:31:41 +0000 (05:31 +0900)] 
bpo-22367: Add tests for fcntl.lockf(). (GH-17010)

6 years agobpo-38613: Optimize set operations of dict keys. (GH-16961)
Inada Naoki [Thu, 7 Nov 2019 15:59:04 +0000 (00:59 +0900)] 
bpo-38613: Optimize set operations of dict keys. (GH-16961)

6 years agobpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080)
Victor Stinner [Thu, 7 Nov 2019 11:42:07 +0000 (12:42 +0100)] 
bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080)

bpo-3605, bpo-38733: Optimize _PyErr_Occurred(): remove "tstate ==
NULL" test.

Py_FatalError() no longer calls PyErr_Occurred() if called without
holding the GIL. So PyErr_Occurred() no longer has to support
tstate==NULL case.

_Py_CheckFunctionResult(): use directly _PyErr_Occurred() to avoid
explicit "!= NULL" test.

6 years agoupdate a deprecated assert in logging tests (GH-17079)
l0rb [Thu, 7 Nov 2019 10:13:36 +0000 (11:13 +0100)] 
update a deprecated assert in logging tests (GH-17079)

6 years agobpo-36876: Moved Parser/listnode.c statics to interpreter state. (GH-16328)
Vinay Sajip [Thu, 7 Nov 2019 10:08:58 +0000 (10:08 +0000)] 
bpo-36876: Moved Parser/listnode.c statics to interpreter state. (GH-16328)

6 years agobpo-38382: Document the early-out behavior for a zero (GH-17037)
Raymond Hettinger [Thu, 7 Nov 2019 05:50:44 +0000 (21:50 -0800)] 
bpo-38382: Document the early-out behavior for a zero (GH-17037)

6 years agobpo-38716: stop rotating handlers from setting inherited namer and rotator to None...
l0rb [Wed, 6 Nov 2019 21:21:40 +0000 (22:21 +0100)] 
bpo-38716: stop rotating handlers from setting inherited namer and rotator to None (GH-17072)

6 years agocloses bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)
Benjamin Peterson [Wed, 6 Nov 2019 05:58:31 +0000 (21:58 -0800)] 
closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)

https://bugs.python.org/issue38713

6 years agobpo-38692: Add os.pidfd_open. (GH-17063)
Benjamin Peterson [Wed, 6 Nov 2019 03:21:29 +0000 (19:21 -0800)] 
bpo-38692: Add os.pidfd_open. (GH-17063)

6 years agobpo-38696: Fix usage example of HTTPStatus (GH-17066)
Ammar Askar [Tue, 5 Nov 2019 23:29:33 +0000 (18:29 -0500)] 
bpo-38696: Fix usage example of HTTPStatus (GH-17066)

6 years agobpo-37645: add new function _PyObject_FunctionStr() (GH-14890)
Jeroen Demeyer [Tue, 5 Nov 2019 15:48:04 +0000 (16:48 +0100)] 
bpo-37645: add new function _PyObject_FunctionStr() (GH-14890)

Additional note: the `method_check_args` function in `Objects/descrobject.c` is written in such a way that it applies to all kinds of descriptors. In particular, a future re-implementation of `wrapper_descriptor` could use that code.

CC @vstinner @encukou

https://bugs.python.org/issue37645

Automerge-Triggered-By: @encukou
6 years agobpo-35381 Remove all static state from posixmodule (GH-15892)
Eddie Elizondo [Tue, 5 Nov 2019 15:16:14 +0000 (07:16 -0800)] 
bpo-35381 Remove all static state from posixmodule (GH-15892)

After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque.

The original PR that got messed up a rebase: https://github.com/python/cpython/pull/10854. All the issues in that commit have now been addressed since https://github.com/python/cpython/pull/11661 got committed.

This change also removes any state from the data segment and onto the module state itself.

https://bugs.python.org/issue35381

Automerge-Triggered-By: @encukou
6 years agoUpdate interpreter.rst (GH-17059)
Jules Lasne (jlasne) [Tue, 5 Nov 2019 13:20:38 +0000 (14:20 +0100)] 
Update interpreter.rst (GH-17059)

Fixed what seemed to be a weird phrasing.

6 years ago_json.c: use Py_UNUSED() macro (GH-17053)
Victor Stinner [Tue, 5 Nov 2019 10:44:28 +0000 (11:44 +0100)] 
_json.c: use Py_UNUSED() macro (GH-17053)

Remove UNUSED macro: use Py_UNUSED() macro instead.

6 years agocloses bpo-37633: Reëxport some function compatibility wrappers for macros in ``pytho...
Benjamin Peterson [Tue, 5 Nov 2019 05:34:14 +0000 (21:34 -0800)] 
closes bpo-37633: Reëxport some function compatibility wrappers for macros in ``pythonrun.h``. (GH-17056)

6 years agoFix a typo in wave module docstring (GH-17009)
Michael Haas [Tue, 5 Nov 2019 04:32:10 +0000 (22:32 -0600)] 
Fix a typo in wave module docstring (GH-17009)

s/pathing/patching/

6 years agobpo-38644: Pass tstate to _Py_CheckFunctionResult() (GH-17050)
Victor Stinner [Tue, 5 Nov 2019 00:22:12 +0000 (01:22 +0100)] 
bpo-38644: Pass tstate to _Py_CheckFunctionResult() (GH-17050)

* Add tstate parameter to _Py_CheckFunctionResult()
* Add _PyErr_FormatFromCauseTstate()
* Replace PyErr_XXX(...) with _PyErr_XXX(state, ...)

6 years agobpo-38644: Pass tstate to Py_EnterRecursiveCall() (GH-16997)
Victor Stinner [Mon, 4 Nov 2019 23:51:22 +0000 (00:51 +0100)] 
bpo-38644: Pass tstate to Py_EnterRecursiveCall() (GH-16997)

* Add _Py_EnterRecursiveCall() and _Py_LeaveRecursiveCall() which
  require a tstate argument.
* Pass tstate to _Py_MakeRecCheck() and  _Py_CheckRecursiveCall().
* Convert Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros
  to static inline functions.

_PyThreadState_GET() is the most efficient way to get the tstate, and
so using it with _Py_EnterRecursiveCall() and
_Py_LeaveRecursiveCall() should be a little bit more efficient than
using Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() which use
the "slower" PyThreadState_GET().

6 years agobpo-38644: Add Py_EnterRecursiveCall() to the limited API (GH-17046)
Victor Stinner [Mon, 4 Nov 2019 18:48:34 +0000 (19:48 +0100)] 
bpo-38644: Add Py_EnterRecursiveCall() to the limited API (GH-17046)

Provide Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() as
regular functions for the limited API. Previously, there were defined
as macros, but these macros didn't work with the limited API which
cannot access PyThreadState.recursion_depth field.

Remove _Py_CheckRecursionLimit from the stable ABI.

Add Include/cpython/ceval.h header file.

6 years agobpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (#17043)
Alexandru Ardelean [Mon, 4 Nov 2019 14:55:56 +0000 (16:55 +0200)] 
bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (#17043)

6 years agobpo-37759: Show output from var_access_benchmark (GH-17040)
Raymond Hettinger [Mon, 4 Nov 2019 05:47:01 +0000 (21:47 -0800)] 
bpo-37759:  Show output from var_access_benchmark (GH-17040)

6 years agobpo-38388: Document pickle protocol version 5 (GH-16639)
Dima Tisnek [Sun, 3 Nov 2019 11:55:33 +0000 (20:55 +0900)] 
bpo-38388: Document pickle protocol version 5 (GH-16639)

6 years agoConvert argument to snake_case (GH-16990)
Борис Верховский [Sat, 2 Nov 2019 19:09:14 +0000 (15:09 -0400)] 
Convert argument to snake_case (GH-16990)

6 years agoYears overdue, explain why unreachable objects are moved. (GH-17030)
Tim Peters [Sat, 2 Nov 2019 17:06:31 +0000 (12:06 -0500)] 
Years overdue, explain why unreachable objects are moved. (GH-17030)

6 years agobpo-38422: Clarify docstrings of pathlib suffix(es) (GH-16679)
Ram Rachum [Sat, 2 Nov 2019 16:46:24 +0000 (18:46 +0200)] 
bpo-38422: Clarify docstrings of pathlib suffix(es) (GH-16679)

Whenever I use `path.suffix` I have to check again whether it includes the dot or not. I decided to add it to the docstring so I won't have to keep checking.

https://bugs.python.org/issue38422

Automerge-Triggered-By: @pitrou
6 years agoSlightly improve plistlib test coverage. (GH-17025)
Jon Janzen [Fri, 1 Nov 2019 16:45:01 +0000 (11:45 -0500)] 
Slightly improve plistlib test coverage. (GH-17025)

* Add missing test class (mistake in GH-4455)

* Increase coverage with 4 more test cases

* Rename neg_uid to huge_uid in test_modified_uid_huge

* Replace test_main() with unittest.main()

* Update plistlib docs

6 years agobpo-38159: Clarify documentation of PyState_AddModule (GH-16101)
Petr Viktorin [Fri, 1 Nov 2019 15:47:05 +0000 (16:47 +0100)] 
bpo-38159: Clarify documentation of PyState_AddModule (GH-16101)

This was never intented to be called manually from PyInit_*.

Also, clarify PyState_RemoveModule return value.

6 years agoUpdate the URL for the requests package (GH-17006)
Simon Legner [Thu, 31 Oct 2019 12:01:44 +0000 (13:01 +0100)] 
Update the URL for the requests package (GH-17006)

Change the url from docs.python-requests.org to requests.readthedocs.io

6 years agoAdd docstring for shlex.split (GH-16740)
MaT1g3R [Thu, 31 Oct 2019 10:23:20 +0000 (06:23 -0400)] 
Add docstring for shlex.split (GH-16740)

6 years agobpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938)
Anthony Sottile [Thu, 31 Oct 2019 09:13:48 +0000 (02:13 -0700)] 
bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938)

6 years agobpo-38586: setting logging.Handler .name property in fileConfig (GH-16918)
Lucas Cimon [Thu, 31 Oct 2019 08:06:25 +0000 (09:06 +0100)] 
bpo-38586: setting logging.Handler .name property in fileConfig (GH-16918)

6 years agobpo-16575: Add checks for unions passed by value to functions. (GH-16799)
Vinay Sajip [Thu, 31 Oct 2019 08:03:54 +0000 (08:03 +0000)] 
bpo-16575: Add checks for unions passed by value to functions. (GH-16799)

6 years agocloses bpo-38648: Remove double tp_free slot in Python-ast.c. (GH-17002)
Max Bernstein [Thu, 31 Oct 2019 01:08:06 +0000 (18:08 -0700)] 
closes bpo-38648: Remove double tp_free slot in Python-ast.c. (GH-17002)

This looks like a typo due to copy-paste.

6 years agobpo-38600: NULL -> ``NULL``. (GH-17001)
Serhiy Storchaka [Wed, 30 Oct 2019 19:37:16 +0000 (21:37 +0200)] 
bpo-38600: NULL -> ``NULL``. (GH-17001)

Also fix some other formatting.

6 years agobpo-38631: Avoid Py_FatalError() in readline (GH-16998)
Victor Stinner [Wed, 30 Oct 2019 15:39:27 +0000 (16:39 +0100)] 
bpo-38631: Avoid Py_FatalError() in readline (GH-16998)

readline now calls PyErr_NoMemory() rather than Py_FatalError() on
memory allocation failure, when importing the module.

6 years agobpo-38614: Increase asyncio test_communicate() timeout (GH-16995)
Victor Stinner [Wed, 30 Oct 2019 15:00:44 +0000 (16:00 +0100)] 
bpo-38614: Increase asyncio test_communicate() timeout (GH-16995)

Fix test_communicate() of test_asyncio.test_subprocess: use
support.LONG_TIMEOUT (5 minutes), instead of 1 minute.

6 years agobpo-38640: Allow break and continue in always false while loops (GH-16992)
Pablo Galindo [Wed, 30 Oct 2019 11:53:26 +0000 (11:53 +0000)] 
bpo-38640: Allow break and continue in always false while loops (GH-16992)

6 years agobpo-38614: Add timeout constants to test.support (GH-16964)
Victor Stinner [Wed, 30 Oct 2019 11:41:43 +0000 (12:41 +0100)] 
bpo-38614: Add timeout constants to test.support (GH-16964)

Add timeout constants to test.support:

* LOOPBACK_TIMEOUT
* INTERNET_TIMEOUT
* SHORT_TIMEOUT
* LONG_TIMEOUT

6 years agobpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981)
Serhiy Storchaka [Wed, 30 Oct 2019 10:03:53 +0000 (12:03 +0200)] 
bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981)

6 years agobpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
Serhiy Storchaka [Wed, 30 Oct 2019 10:03:20 +0000 (12:03 +0200)] 
bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)

Replace all *NULL* with ``NULL``.

6 years agobpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656)
Daniel Hillier [Tue, 29 Oct 2019 07:24:18 +0000 (18:24 +1100)] 
bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656)

6 years agobpo-38336: Remove the __set__ method restriction on data descriptors for attribute...
Géry Ogam [Tue, 29 Oct 2019 07:04:01 +0000 (08:04 +0100)] 
bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)

6 years agoPermutations Python code equivalent in comment was invalid for Python 3 (GH-16927)
Sergey [Tue, 29 Oct 2019 05:10:24 +0000 (08:10 +0300)] 
Permutations Python code equivalent in comment was invalid for Python 3 (GH-16927)

6 years agobpo-38626: Add comment explaining why __lt__ is used. (GH-16978)
Raymond Hettinger [Tue, 29 Oct 2019 04:38:50 +0000 (21:38 -0700)] 
bpo-38626:  Add comment explaining why __lt__ is used. (GH-16978)

https://bugs.python.org/issue38626

6 years agoFix asyncio.wait() 3.8 whatsnew entry (GH-16975)
Kyle Stanley [Tue, 29 Oct 2019 01:53:22 +0000 (21:53 -0400)] 
Fix asyncio.wait() 3.8 whatsnew entry (GH-16975)

6 years agoRemove code commented for more than 10 years (GH-16965)
Victor Stinner [Mon, 28 Oct 2019 21:35:31 +0000 (22:35 +0100)] 
Remove code commented for more than 10 years (GH-16965)

test_urllib commented since 2007:

commit d9880d07fc032884e8bd5cf3ac636d3a3778d5f7
Author: Facundo Batista <facundobatista@gmail.com>
Date:   Fri May 25 04:20:22 2007 +0000

    Commenting out the tests until find out who can test them in
    one of the problematic enviroments.

pynche code commented since 1998 and 2001:

commit ef30092207e684bd3e74fe3d6172b97327a0a089
Author: Barry Warsaw <barry@python.org>
Date:   Tue Dec 15 01:04:38 1998 +0000

    Added most of the mechanism to change the strips from color variations
    to color constants (i.e. red constant, green constant, blue
    constant).  But I haven't hooked this up yet because the UI gets more
    crowded and the arrows don't reflect the correct values.

    Added "Go to Black" and "Go to White" buttons.

commit 741eae0b3129c123ed4319d8d9e5b877b09aefa8
Author: Barry Warsaw <barry@python.org>
Date:   Wed Apr 18 03:51:55 2001 +0000

    StripWidget.__init__(), update_yourself(): Removed some unused local
    variables reported by PyChecker.

    __togglegentype(): PyChecker accurately reported that the variable
    __gentypevar was unused -- actually this whole method is currently
    unused so comment it out.

6 years agobpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH...
Steve Dower [Mon, 28 Oct 2019 21:34:25 +0000 (14:34 -0700)] 
bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968)

6 years agobpo-38534: Replace wrong KB number references (GH-16955)
benedwards14 [Mon, 28 Oct 2019 17:53:51 +0000 (17:53 +0000)] 
bpo-38534: Replace wrong KB number references (GH-16955)

6 years agobpo-38519: Internal include files missing on Windows (GH-16921)
Zackery Spytz [Mon, 28 Oct 2019 17:03:27 +0000 (11:03 -0600)] 
bpo-38519: Internal include files missing on Windows (GH-16921)

6 years agobpo-37330: open() no longer accept 'U' in file mode (GH-16959)
Victor Stinner [Mon, 28 Oct 2019 14:40:08 +0000 (15:40 +0100)] 
bpo-37330: open() no longer accept 'U' in file mode (GH-16959)

open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.

6 years agobpo-38602: Add fcntl.F_OFD_XXXX for fcntlmodule (GH-16956)
Dong-hee Na [Mon, 28 Oct 2019 07:31:15 +0000 (16:31 +0900)] 
bpo-38602: Add fcntl.F_OFD_XXXX for fcntlmodule (GH-16956)

6 years agobpo-38592 Add pt-br switcher to Python Docs website (GH-16924)
Marco Rougeth [Sun, 27 Oct 2019 08:30:12 +0000 (05:30 -0300)] 
bpo-38592 Add pt-br switcher to Python Docs website (GH-16924)

* 📜🤖 Added by blurb_it.

6 years agobpo-38334: Fix seeking backward on an encrypted zipfile.ZipExtFile. (GH-16937)
Serhiy Storchaka [Sun, 27 Oct 2019 08:22:14 +0000 (10:22 +0200)] 
bpo-38334: Fix seeking backward on an encrypted zipfile.ZipExtFile. (GH-16937)

Test by Daniel Hillier.

6 years agobpo-37309: First idlelib/NEWS.txt for 3.9.0 (GH-16947)
Terry Jan Reedy [Sun, 27 Oct 2019 05:23:30 +0000 (01:23 -0400)] 
bpo-37309: First idlelib/NEWS.txt for 3.9.0 (GH-16947)

6 years agobpo-34162: Last idlelib/NEWS.txt items for 3.8.0. (GH-16943)
Terry Jan Reedy [Sun, 27 Oct 2019 02:19:57 +0000 (22:19 -0400)] 
bpo-34162: Last idlelib/NEWS.txt items for 3.8.0. (GH-16943)

6 years agobpo-38598: Do not try to compile IDLE shell or output windows (GH-16939)
Terry Jan Reedy [Sun, 27 Oct 2019 01:15:10 +0000 (21:15 -0400)] 
bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939)

6 years agobpo-38434: Fixes some audit event documentation (GH-16932)
Steve Dower [Sat, 26 Oct 2019 20:02:30 +0000 (13:02 -0700)] 
bpo-38434: Fixes some audit event documentation (GH-16932)

6 years agobpo-38557: Improve documentation for list and tuple C API. (GH-16925)
Serhiy Storchaka [Sat, 26 Oct 2019 19:59:18 +0000 (22:59 +0300)] 
bpo-38557: Improve documentation for list and tuple C API. (GH-16925)

6 years agobpo-38535: Fix positions for AST nodes for calls without arguments in decorators...
Serhiy Storchaka [Sat, 26 Oct 2019 13:46:05 +0000 (16:46 +0300)] 
bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861)

6 years agobpo-38558: Mention `:=` in conditions tutorial (GH-16919)
Ammar Askar [Fri, 25 Oct 2019 22:20:05 +0000 (18:20 -0400)] 
bpo-38558: Mention `:=` in conditions tutorial (GH-16919)

6 years agoFix typo in formatter_unicode (GH-16831)
Hansraj Das [Fri, 25 Oct 2019 16:44:02 +0000 (22:14 +0530)] 
Fix typo in formatter_unicode (GH-16831)

numbers's -> number's

6 years agobpo-33348: parse expressions after * and ** in lib2to3 (GH-6586)
Zsolt Dollenstein [Thu, 24 Oct 2019 06:19:07 +0000 (23:19 -0700)] 
bpo-33348: parse expressions after * and ** in lib2to3 (GH-6586)

These are valid even in python 2.7

https://bugs.python.org/issue33348

Automerge-Triggered-By: @gpshead
6 years agoAdd missing asyncio changes from 3.8 whatsnew (GH-16911)
Kyle Stanley [Thu, 24 Oct 2019 04:15:25 +0000 (00:15 -0400)] 
Add missing asyncio changes from 3.8 whatsnew (GH-16911)

6 years agobpo-30618: add readlink to pathlib.Path (GH-8285)
Girts [Wed, 23 Oct 2019 21:18:40 +0000 (14:18 -0700)] 
bpo-30618: add readlink to pathlib.Path (GH-8285)

This adds a "readlink" method to pathlib.Path objects that calls through
to os.readlink.

https://bugs.python.org/issue30618

Automerge-Triggered-By: @gpshead
6 years agoUpdate URL in macOS installer copy of license (GH-16905)
Ned Deily [Wed, 23 Oct 2019 20:04:59 +0000 (16:04 -0400)] 
Update URL in macOS installer copy of license (GH-16905)

6 years agobpo-34679: ProactorEventLoop only uses set_wakeup_fd() in main thread (GH-16901)
Victor Stinner [Wed, 23 Oct 2019 15:25:29 +0000 (17:25 +0200)] 
bpo-34679: ProactorEventLoop only uses set_wakeup_fd() in main thread (GH-16901)

bpo-34679, bpo-38563: asyncio.ProactorEventLoop.close() now only calls
signal.set_wakeup_fd() in the main thread.

6 years agobpo-38555: Fix an undefined behavior. (GH-16883)
Serhiy Storchaka [Wed, 23 Oct 2019 11:48:08 +0000 (14:48 +0300)] 
bpo-38555: Fix an undefined behavior. (GH-16883)

6 years agoSpell Bitbucket correctly. (GH-16862)
Peter Bittner [Wed, 23 Oct 2019 09:17:30 +0000 (11:17 +0200)] 
Spell Bitbucket correctly. (GH-16862)

6 years agoReplace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)
Sergey Fedoseev [Wed, 23 Oct 2019 08:09:01 +0000 (13:09 +0500)] 
Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)

6 years agobpo-38539: Finish rename of ss1.py to spreadsheet.py (GH-16896)
Raymond Hettinger [Wed, 23 Oct 2019 04:05:02 +0000 (21:05 -0700)] 
bpo-38539:  Finish rename of ss1.py to spreadsheet.py (GH-16896)

6 years agobpo-38539: Update demo files (GH-16890)
Julin S [Wed, 23 Oct 2019 03:23:48 +0000 (08:53 +0530)] 
bpo-38539: Update demo files (GH-16890)

6 years ago bpo-38419: fix "check-c-globals" path (GH-16680)
AMIR [Wed, 23 Oct 2019 00:05:54 +0000 (03:35 +0330)] 
 bpo-38419: fix "check-c-globals" path (GH-16680)

6 years agobpo-38466: Fix threading.excepthook doc (GH-16891)
Daniel Baskal [Tue, 22 Oct 2019 20:37:47 +0000 (23:37 +0300)] 
bpo-38466: Fix threading.excepthook doc (GH-16891)

6 years agobpo-37415: Fix stdatomic.h header check for ICC compiler (GH-16717)
Victor Stinner [Tue, 22 Oct 2019 19:53:50 +0000 (21:53 +0200)] 
bpo-37415: Fix stdatomic.h header check for ICC compiler (GH-16717)

Fix stdatomic.h header check for ICC compiler: the ICC implementation
lacks atomic_uintptr_t type which is needed by Python.

Test:

* atomic_int and atomic_uintptr_t types
* atomic_load_explicit() and atomic_store_explicit()
* memory_order_relaxed and memory_order_seq_cst constants

But don't test ATOMIC_VAR_INIT(): it's not used in Python.

6 years agoBump Sphinx to 2.2.0. (GH-16532)
Julien Palard [Tue, 22 Oct 2019 16:13:41 +0000 (18:13 +0200)] 
Bump Sphinx to 2.2.0. (GH-16532)

6 years agobpo-38303: Make audioop extension module PEP-384 compatible (GH-16497)
Tyler Kieft [Tue, 22 Oct 2019 13:07:03 +0000 (09:07 -0400)] 
bpo-38303: Make audioop extension module PEP-384 compatible (GH-16497)

https://bugs.python.org/issue38303

Automerge-Triggered-By: @encukou
6 years agoFix Zope URL (GH-16880)
Kyle Stanley [Tue, 22 Oct 2019 09:43:10 +0000 (05:43 -0400)] 
Fix Zope URL (GH-16880)

6 years agobpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)
Serhiy Storchaka [Mon, 21 Oct 2019 17:37:15 +0000 (20:37 +0300)] 
bpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)

6 years agovisit_reachable: replace release-mode test with an assert. (GH-16866)
Tim Peters [Mon, 21 Oct 2019 16:21:35 +0000 (11:21 -0500)] 
visit_reachable: replace release-mode test with an assert. (GH-16866)

It should be impossible for an untracked object to have the collecting
flag set.  Back when state was stored in gc_refs, it obviously was
impossible (gc_refs couldn't possibly have a positive & negative value
simultaneously).  While the _implementation_ of "state" has gotten much
more complicated, it's still _logically_ just as impossible.

6 years agobpo-38540: Fix possible leak in PyArg_Parse for "es#" and "et#". (GH-16869)
Serhiy Storchaka [Mon, 21 Oct 2019 08:35:07 +0000 (11:35 +0300)] 
bpo-38540: Fix possible leak in PyArg_Parse for "es#" and "et#". (GH-16869)