]> granicus.if.org Git - python/log
python
5 years agobpo-15088 : Remove PyGen_NeedsFinalizing() (GH-15702)
Joannah Nanjekye [Fri, 6 Sep 2019 15:41:38 +0000 (12:41 -0300)]
bpo-15088 : Remove PyGen_NeedsFinalizing() (GH-15702)

Remove PyGen_NeedsFinalizing(): it was not
documented, tested or used anywhere within CPython after
the implementation of PEP 442.

5 years agoMore refinements to the statistics docs (GH-15713)
Raymond Hettinger [Fri, 6 Sep 2019 06:02:27 +0000 (23:02 -0700)]
More refinements to the statistics docs (GH-15713)

5 years agoreplace inline function `is_small_int` with a macro version (GH-15710)
animalize [Fri, 6 Sep 2019 06:00:56 +0000 (14:00 +0800)]
replace inline function `is_small_int` with a macro version (GH-15710)

5 years agobpo-37064: Skip test_tools.test_pathfix if installed (GH-15705)
Victor Stinner [Thu, 5 Sep 2019 16:09:46 +0000 (18:09 +0200)]
bpo-37064: Skip test_tools.test_pathfix if installed (GH-15705)

If Python is installed, skip test_tools.test_pathfix test because
Tools/scripts/pathfix.py script is not installed.

5 years agobpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)
Joannah Nanjekye [Thu, 5 Sep 2019 16:06:49 +0000 (13:06 -0300)]
bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)

* Rename PyThreadState_DeleteCurrent()
  to _PyThreadState_DeleteCurrent()
* Move it to the internal C API

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
5 years agobpo-36797: Fix a dead link in Doc/distutils/apiref (GH-15700)
Miro Hrončok [Thu, 5 Sep 2019 15:06:45 +0000 (17:06 +0200)]
bpo-36797: Fix a dead link in  Doc/distutils/apiref (GH-15700)

https://bugs.python.org/issue36797

5 years agobpo-37064: Add option -k to Tools/scripts/pathfix.py (GH-15548)
PatrikKopkan [Thu, 5 Sep 2019 14:54:54 +0000 (16:54 +0200)]
bpo-37064: Add option -k to Tools/scripts/pathfix.py (GH-15548)

Add flag -k to pathscript.py script: preserve shebang flags.

5 years agoCorrect minor gramatical mistake in sys.settrace doc (GH-15637)
Andre Delfino [Thu, 5 Sep 2019 11:10:37 +0000 (08:10 -0300)]
Correct minor gramatical mistake in sys.settrace doc (GH-15637)

5 years agobpo-36409: Remove old plistlib API deprecated in 3.4 (GH-15615)
Jon Janzen [Thu, 5 Sep 2019 08:11:35 +0000 (03:11 -0500)]
bpo-36409: Remove old plistlib API deprecated in 3.4 (GH-15615)

* Remove implementation for old plistlib API deprecated in 3.4

5 years agobpo-36324: Apply review comment from Jake Vanderplas (GH-15695)
Raymond Hettinger [Thu, 5 Sep 2019 08:03:14 +0000 (01:03 -0700)]
bpo-36324:  Apply review comment from Jake Vanderplas (GH-15695)

5 years agobpo-36324: Apply review comments from Allen Downey (GH-15693)
Raymond Hettinger [Thu, 5 Sep 2019 07:18:47 +0000 (00:18 -0700)]
bpo-36324:  Apply review comments from Allen Downey (GH-15693)

5 years agobpo-38026: fix inspect.getattr_static (GH-15676)
Inada Naoki [Thu, 5 Sep 2019 04:07:08 +0000 (13:07 +0900)]
bpo-38026: fix inspect.getattr_static (GH-15676)

It should avoid dynamic lookup including `isinstance`.

This is a regression caused by GH-5351.

5 years agobpo-37902: IDLE: Add scrolling for IDLE browsers. (#15368)
GeeTransit [Thu, 5 Sep 2019 01:33:34 +0000 (21:33 -0400)]
bpo-37902: IDLE: Add scrolling for IDLE browsers. (#15368)

Modify the wheel event handler so it can also be used for module, path, and stack browsers.
Patch by George Zhang.

5 years agobpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522)
Dong-hee Na [Thu, 5 Sep 2019 00:34:35 +0000 (09:34 +0900)]
bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522)

https://bugs.python.org/issue22347

5 years agoFix idlelib.help comments (GH-15669)
Terry Jan Reedy [Thu, 5 Sep 2019 00:20:08 +0000 (20:20 -0400)]
Fix idlelib.help comments (GH-15669)

5 years agobpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)
Steve Dower [Wed, 4 Sep 2019 21:42:54 +0000 (14:42 -0700)]
bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)

5 years agobpo-36030: Fix a possible segfault in PyTuple_New() (GH-15670)
Zackery Spytz [Wed, 4 Sep 2019 13:58:05 +0000 (07:58 -0600)]
bpo-36030: Fix a possible segfault in PyTuple_New() (GH-15670)

5 years agoFix grammar in asyncio-dev.rst (GH-15672)
Roger Iyengar [Wed, 4 Sep 2019 06:04:09 +0000 (02:04 -0400)]
Fix grammar in asyncio-dev.rst (GH-15672)

Automerge-Triggered-By: @ned-deily
5 years agocloses bpo-37966: Fully implement the UAX #15 quick-check algorithm. (GH-15558)
Greg Price [Wed, 4 Sep 2019 02:45:44 +0000 (19:45 -0700)]
closes bpo-37966: Fully implement the UAX #15 quick-check algorithm. (GH-15558)

The purpose of the `unicodedata.is_normalized` function is to answer
the question `str == unicodedata.normalized(form, str)` more
efficiently than writing just that, by using the "quick check"
optimization described in the Unicode standard in UAX #15.

However, it turns out the code doesn't implement the full algorithm
from the standard, and as a result we often miss the optimization and
end up having to compute the whole normalized string after all.

Implement the standard's algorithm.  This greatly speeds up
`unicodedata.is_normalized` in many cases where our partial variant
of quick-check had been returning MAYBE and the standard algorithm
returns NO.

At a quick test on my desktop, the existing code takes about 4.4 ms/MB
(so 4.4 ns per byte) when the partial quick-check returns MAYBE and it
has to do the slow normalize-and-compare:

  $ build.base/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \
      -- 'unicodedata.is_normalized("NFD", s)'
  50 loops, best of 5: 4.39 msec per loop

With this patch, it gets the answer instantly (58 ns) on the same 1 MB
string:

  $ build.dev/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \
      -- 'unicodedata.is_normalized("NFD", s)'
  5000000 loops, best of 5: 58.2 nsec per loop

This restores a small optimization that the original version of this
code had for the `unicodedata.normalize` use case.

With this, that case is actually faster than in master!

$ build.base/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \
    -- 'unicodedata.normalize("NFD", s)'
500 loops, best of 5: 561 usec per loop

$ build.dev/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \
    -- 'unicodedata.normalize("NFD", s)'
500 loops, best of 5: 512 usec per loop

5 years agobpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)
Tal Einat [Tue, 3 Sep 2019 20:52:58 +0000 (23:52 +0300)]
bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)

The HTML5 output from Sphinx 2.x adds  '<p>' tags within list elements.  Using a new prevtag attribute, ignore these instead of emitting unwanted '\n\n'.

Also stop looking for 'first' classes on tags (no longer present) and fix the bug of double-spacing instead of single spacing after <pre> blocks.

5 years agobpo-38020: Fixes crash in os.readlink() on Windows (GH-15663)
Steve Dower [Tue, 3 Sep 2019 19:50:51 +0000 (12:50 -0700)]
bpo-38020: Fixes crash in os.readlink() on Windows (GH-15663)

5 years agobpo-37798: Fix _statistics module doc (GH-15546)
Dong-hee Na [Tue, 3 Sep 2019 09:21:45 +0000 (18:21 +0900)]
bpo-37798: Fix _statistics module doc (GH-15546)

5 years agobpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)
Tal Einat [Tue, 3 Sep 2019 05:17:00 +0000 (08:17 +0300)]
bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)

Extending the hover delay in test_tooltip should avoid spurious test_idle failures.
One longer delay instead of two shorter delays results in a net speedup.

5 years agoEnforce PEP 257 conventions in ftplib.py (GH-15604)
Alan Yee [Tue, 3 Sep 2019 04:21:33 +0000 (21:21 -0700)]
Enforce PEP 257 conventions in ftplib.py  (GH-15604)

-`"""` over `'''`
-no blank line either before or after the docstring.
-place the closing quotes on a line by themselves

5 years agobpo-36853: Fix suspicious.py to actually print the unused rules (#13579)
Anthony Sottile [Mon, 2 Sep 2019 16:01:23 +0000 (09:01 -0700)]
bpo-36853: Fix suspicious.py to actually print the unused rules (#13579)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls

5 years agobpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646)
Jason R. Coombs [Mon, 2 Sep 2019 15:08:03 +0000 (11:08 -0400)]
bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646)

Sync importlib.metadata with importlib_metadata 0.20.

5 years agobpo-15999: Clean up of handling boolean arguments. (GH-15610)
Serhiy Storchaka [Sun, 1 Sep 2019 09:16:51 +0000 (12:16 +0300)]
bpo-15999: Clean up of handling boolean arguments. (GH-15610)

* Use the 'p' format unit instead of manually called PyObject_IsTrue().
* Pass boolean value instead 0/1 integers to functions that needs boolean.
* Convert some arguments to boolean only once.

5 years agobpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621)
Serhiy Storchaka [Sun, 1 Sep 2019 09:12:52 +0000 (12:12 +0300)]
bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621)

5 years agobpo-15999: Always pass bool instead of int to the expat parser. (GH-15622)
Serhiy Storchaka [Sun, 1 Sep 2019 09:11:43 +0000 (12:11 +0300)]
bpo-15999: Always pass bool instead of int to the expat parser. (GH-15622)

5 years agobpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)
Serhiy Storchaka [Sun, 1 Sep 2019 09:03:39 +0000 (12:03 +0300)]
bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)

Only AttributeError should be silenced.

5 years agobpo-36543: Remove old-deprecated ElementTree features. (GH-12707)
Serhiy Storchaka [Sun, 1 Sep 2019 08:18:35 +0000 (11:18 +0300)]
bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)

Remove methods Element.getchildren(), Element.getiterator() and
ElementTree.getiterator() and the xml.etree.cElementTree module.

5 years agobpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239)
Ashwin Ramaswami [Sat, 31 Aug 2019 15:25:35 +0000 (10:25 -0500)]
bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239)

Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
- a case without trailing whitespace
- an invalid encoded word

https://bugs.python.org/issue37764

This fix should also be backported to 3.7 and 3.8

https://bugs.python.org/issue37764

5 years agobpo-37977: Warn more strongly and clearly about pickle security (GH-15595)
Daniel Pope [Sat, 31 Aug 2019 05:51:33 +0000 (06:51 +0100)]
bpo-37977: Warn more strongly and clearly about pickle security (GH-15595)

5 years agobpo-37990: fix gc stats (GH-15626)
Inada Naoki [Sat, 31 Aug 2019 00:13:42 +0000 (09:13 +0900)]
bpo-37990: fix gc stats (GH-15626)

5 years agobpo-37781: use "z" for PY_FORMAT_SIZE_T (GH-15156)
Inada Naoki [Fri, 30 Aug 2019 23:48:12 +0000 (08:48 +0900)]
bpo-37781: use "z" for PY_FORMAT_SIZE_T (GH-15156)

MSVC 2015 supports %zd / %zu.  "z" is portable enough nowadays.

5 years agoFix typos mostly in comments, docs and test names (GH-15209)
Min ho Kim [Fri, 30 Aug 2019 20:21:19 +0000 (06:21 +1000)]
Fix typos mostly in comments, docs and test names (GH-15209)

5 years agoIDLE: Fix 2 typos found by Min ho Kim. (GH-15617)
Terry Jan Reedy [Fri, 30 Aug 2019 20:16:37 +0000 (16:16 -0400)]
IDLE: Fix 2 typos found by Min ho Kim. (GH-15617)

5 years agobpo-37140: Fix StructUnionType_paramfunc() (GH-15612)
Victor Stinner [Fri, 30 Aug 2019 12:30:33 +0000 (14:30 +0200)]
bpo-37140: Fix StructUnionType_paramfunc() (GH-15612)

Fix a ctypes regression of Python 3.8. When a ctypes.Structure is
passed by copy to a function, ctypes internals created a temporary
object which had the side effect of calling the structure finalizer
(__del__) twice. The Python semantics requires a finalizer to be
called exactly once. Fix ctypes internals to no longer call the
finalizer twice.

Create a new internal StructParam_Type which is only used by
_ctypes_callproc() to call PyMem_Free(ptr) on Py_DECREF(argument).
StructUnionType_paramfunc() creates such object.

5 years agobpo-37976: Prevent shadowing of TypeError in zip() (GH-15592)
Sergey Fedoseev [Fri, 30 Aug 2019 04:25:48 +0000 (09:25 +0500)]
bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592)

5 years agoSteven Bethard designated a new maintainer for argparse (GH-15605)
Raymond Hettinger [Fri, 30 Aug 2019 04:04:37 +0000 (21:04 -0700)]
Steven Bethard designated a new maintainer for argparse (GH-15605)

5 years agobpo-37834: Prevent shutil.rmtree exception (GH-15602)
Ned Deily [Thu, 29 Aug 2019 21:20:03 +0000 (17:20 -0400)]
bpo-37834: Prevent shutil.rmtree exception (GH-15602)

when built on non-Windows system without fd system call support,
like older versions of macOS.

5 years agobpo-37933: Fix faulthandler.cancel_dump_traceback_later() (GH-15440)
Thomas A Caswell [Thu, 29 Aug 2019 16:30:04 +0000 (12:30 -0400)]
bpo-37933: Fix faulthandler.cancel_dump_traceback_later() (GH-15440)

Fix faulthandler.cancel_dump_traceback_later() call
if cancel_dump_traceback_later() was not called previously.

5 years agobpo-8425: Fast path for set inplace difference when the second set is large (GH-15590)
Raymond Hettinger [Thu, 29 Aug 2019 16:02:58 +0000 (09:02 -0700)]
bpo-8425: Fast path for set inplace difference when the second set is large (GH-15590)

5 years agobpo-37034: Display argument name on errors with keyword arguments with Argument Clini...
Rémi Lapeyre [Thu, 29 Aug 2019 14:49:08 +0000 (16:49 +0200)]
bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593)

5 years agobpo-37979: Add alternative to fromisoformat in documentation (GH-15596)
Paul Ganssle [Thu, 29 Aug 2019 14:47:48 +0000 (10:47 -0400)]
bpo-37979: Add alternative to fromisoformat in documentation (GH-15596)

Adds a link to `dateutil.parser.isoparse` in the documentation.

It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR.

CC: @pitrou
[bpo-37979](https://bugs.python.org/issue37979)

https://bugs.python.org/issue37979

Automerge-Triggered-By: @pitrou
5 years agobpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)
Nick Coghlan [Thu, 29 Aug 2019 13:26:53 +0000 (23:26 +1000)]
bpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)

With `symtable_visit_expr` now correctly adjusting the recursion depth for named
expressions, `symtable_handle_namedexpr` should be leaving it alone.

Also adds a new check to `PySymtable_BuildObject` that raises `SystemError`
if a successful first symbol analysis pass fails to keep the stack depth
accounting clean.

5 years agobpo-36833: Add tests for Datetime C API Macros (GH-14842)
Joannah Nanjekye [Thu, 29 Aug 2019 12:54:46 +0000 (09:54 -0300)]
bpo-36833: Add tests for Datetime C API Macros (GH-14842)

Added tests for PyDateTime_xxx_GET_xxx() macros of the C API of
the datetime module.

5 years agobpo-10978: Semaphores can release multiple threads at a time (GH-15588)
Raymond Hettinger [Thu, 29 Aug 2019 08:45:19 +0000 (01:45 -0700)]
bpo-10978: Semaphores can release multiple threads at a time (GH-15588)

5 years agobpo-36743: __get__ is sometimes called without the owner argument (#12992)
Raymond Hettinger [Thu, 29 Aug 2019 08:27:42 +0000 (01:27 -0700)]
bpo-36743: __get__ is sometimes called without the owner argument (#12992)

5 years agobpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566)
Raymond Hettinger [Thu, 29 Aug 2019 07:58:08 +0000 (00:58 -0700)]
bpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566)

5 years agobpo-23674: Clarify ambiguities in super() docs (#15564)
Raymond Hettinger [Thu, 29 Aug 2019 07:44:02 +0000 (00:44 -0700)]
bpo-23674:  Clarify ambiguities in super() docs (#15564)

5 years agobpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds...
Justin Blanchard [Thu, 29 Aug 2019 07:36:15 +0000 (03:36 -0400)]
bpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds>=24. (GH-14307)

5 years agobpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH-15510)
Serhiy Storchaka [Thu, 29 Aug 2019 06:30:23 +0000 (09:30 +0300)]
bpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH-15510)

5 years agobpo-37960: Silence only necessary errors in repr() of buffered and text streams....
Serhiy Storchaka [Thu, 29 Aug 2019 06:25:22 +0000 (09:25 +0300)]
bpo-37960: Silence only necessary errors in repr() of buffered and text streams. (GH-15543)

5 years agobpo-35946: Improve assert_called_with documentation (GH-11796)
Rémi Lapeyre [Thu, 29 Aug 2019 06:15:53 +0000 (08:15 +0200)]
bpo-35946: Improve assert_called_with documentation (GH-11796)

5 years agobpo-36871: Ensure method signature is used when asserting mock calls to a method...
Xtreak [Thu, 29 Aug 2019 06:09:01 +0000 (11:39 +0530)]
bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH13261)

* Fix call_matcher for mock when using methods

* Add NEWS entry

* Use None check and convert doctest to unittest

* Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.

* Use reset_mock instead of reinitialization. Change inner class constructor signature for check

* Reword comment regarding call object lookup logic

5 years agobpo-25777: Wording describes a lookup, not a call (GH-15573)
Raymond Hettinger [Thu, 29 Aug 2019 05:59:43 +0000 (22:59 -0700)]
bpo-25777: Wording describes a lookup, not a call (GH-15573)

5 years agobpo-36167: fix an incorrect capitalization (GH-14482)
avinassh [Thu, 29 Aug 2019 05:40:50 +0000 (11:10 +0530)]
bpo-36167: fix an incorrect capitalization (GH-14482)

5 years agobpo-37964: Make sure test works if TESTFN is in a non-ASCII directory. (GH-15568)
Benjamin Peterson [Thu, 29 Aug 2019 05:06:49 +0000 (22:06 -0700)]
bpo-37964: Make sure test works if TESTFN is in a non-ASCII directory. (GH-15568)

5 years agobpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736)
Ronald Oussoren [Thu, 29 Aug 2019 04:33:52 +0000 (06:33 +0200)]
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736)

5 years agoRaise a RuntimeError when tee iterator is consumed from different threads (GH-15567)
HongWeipeng [Thu, 29 Aug 2019 03:39:25 +0000 (11:39 +0800)]
Raise a RuntimeError when tee iterator is consumed from different threads (GH-15567)

5 years agocloses bpo-37964: add F_GETPATH command to fcntl (GH-15550)
Vinay Sharma [Thu, 29 Aug 2019 01:56:17 +0000 (07:26 +0530)]
closes bpo-37964: add F_GETPATH command to fcntl (GH-15550)

https://bugs.python.org/issue37964

Automerge-Triggered-By: @benjaminp
5 years agobpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() (GH-15424)
Zackery Spytz [Wed, 28 Aug 2019 21:54:02 +0000 (15:54 -0600)]
bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() (GH-15424)

5 years agocloses bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH...
Anonymous Maarten [Wed, 28 Aug 2019 17:11:03 +0000 (19:11 +0200)]
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560)

https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
5 years agobpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138)
Daniel Fortunov [Wed, 28 Aug 2019 04:38:09 +0000 (06:38 +0200)]
bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138)

5 years agobpo-37951: Lift subprocess's fork() restriction (GH-15544)
Christian Heimes [Tue, 27 Aug 2019 21:36:56 +0000 (23:36 +0200)]
bpo-37951: Lift subprocess's fork() restriction (GH-15544)

5 years agoAdd Florian Ernst to ACKS (GH-15524)
Ethan Furman [Tue, 27 Aug 2019 21:18:05 +0000 (14:18 -0700)]
Add Florian Ernst to ACKS (GH-15524)

5 years agobpo-37936: Remove some .gitignore rules that were intended locally. (GH-15542)
Greg Price [Tue, 27 Aug 2019 18:16:31 +0000 (11:16 -0700)]
bpo-37936: Remove some .gitignore rules that were intended locally. (GH-15542)

These appeared in commit c5ae169e1.  The comment on them, as well as
the presence among them of a rule for the .gitignore file itself,
indicate that the author intended these lines to remain only in their
own local working tree -- not to get committed even to their own repo,
let alone merged upstream.

They did nevertheless get committed, because it turns out that Git
takes no notice of what .gitignore says about files that it's already
tracking... for example, this .gitignore file itself.

Give effect to these lines' original intention, by deleting them. :-)

Git tip, for reference: the `.git/info/exclude` file is a handy way
to do exactly what these lines were originally intended to do.  A
related handy file is `~/.config/git/ignore`.  See gitignore(5),
aka `git help ignore`, for details.

https://bugs.python.org/issue37936

Automerge-Triggered-By: @zware
5 years agoFix unused variable and signed/unsigned warnings (GH-15537)
Raymond Hettinger [Tue, 27 Aug 2019 16:55:13 +0000 (09:55 -0700)]
Fix unused variable and signed/unsigned warnings (GH-15537)

5 years agobpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
vrajivk [Tue, 27 Aug 2019 04:13:12 +0000 (21:13 -0700)]
bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)

5 years agobpo-37328: remove deprecated HTMLParser.unescape (GH-14186)
Inada Naoki [Tue, 27 Aug 2019 02:48:06 +0000 (11:48 +0900)]
bpo-37328: remove deprecated HTMLParser.unescape (GH-14186)

It is deprecated since Python 3.4.

5 years agobpo-36763: Make Py_BytesMain() public (GH-15532)
Victor Stinner [Mon, 26 Aug 2019 22:45:45 +0000 (00:45 +0200)]
bpo-36763: Make Py_BytesMain() public (GH-15532)

Declare Py_BytesMain() in Include/pylifecycle.h, rather in
Include/internal/pycore_pylifecycle.h.

5 years agoFix an invalid assertEqual() call in test_descr.py (GH-15318)
Zackery Spytz [Mon, 26 Aug 2019 22:41:11 +0000 (16:41 -0600)]
Fix an invalid assertEqual() call in test_descr.py (GH-15318)

5 years agoMake PyXXX_Fini() functions private (GH-15531)
Victor Stinner [Mon, 26 Aug 2019 22:12:32 +0000 (00:12 +0200)]
Make PyXXX_Fini() functions private (GH-15531)

For example, rename PyTuple_Fini() to _PyTuple_Fini().

These functions are only declared in the internal C API.

5 years agobpo-37925: Mention --embed in python-config usage (GH-15458)
Batuhan Taşkaya [Mon, 26 Aug 2019 21:45:37 +0000 (00:45 +0300)]
bpo-37925: Mention --embed in python-config usage (GH-15458)

5 years agobpo-37798: Minor code formatting and comment clean-ups. (GH-15526)
Raymond Hettinger [Mon, 26 Aug 2019 18:25:58 +0000 (11:25 -0700)]
bpo-37798: Minor code formatting and comment clean-ups. (GH-15526)

5 years agobpo-37664: Update ensurepip bundled wheels, again (GH-15483)
Pradyun Gedam [Mon, 26 Aug 2019 18:19:30 +0000 (23:49 +0530)]
bpo-37664: Update ensurepip bundled wheels, again (GH-15483)

/cc @ambv since this needs to be included in 3.8 -- see https://github.com/pypa/pip/issues/6885.

Sorry about the last minute PR!

https://bugs.python.org/issue37664

Automerge-Triggered-By: @zooba
5 years agobpo-37055: fix warnings in _blake2 module (GH-14646)
Inada Naoki [Mon, 26 Aug 2019 17:52:36 +0000 (02:52 +0900)]
bpo-37055: fix warnings in _blake2 module (GH-14646)

https://bugs.python.org/issue37055

Automerge-Triggered-By: @tiran
5 years agocorrect roman numeral VII description (GH-15523)
Ethan Furman [Mon, 26 Aug 2019 16:12:50 +0000 (09:12 -0700)]
correct roman numeral VII description (GH-15523)

5 years agoFix typo: Pyssize_t => Py_ssize_t (GH-15411)
Sergey Fedoseev [Mon, 26 Aug 2019 15:20:42 +0000 (20:20 +0500)]
Fix typo: Pyssize_t => Py_ssize_t (GH-15411)

5 years agobpo-37954: Fix reference leak in the symtable (GH-15514)
Pablo Galindo [Mon, 26 Aug 2019 15:14:07 +0000 (16:14 +0100)]
bpo-37954: Fix reference leak in the symtable (GH-15514)

5 years agoRemove leftovers from the times when long long wasn't required (GH-15501)
Sergey Fedoseev [Mon, 26 Aug 2019 15:12:47 +0000 (20:12 +0500)]
Remove leftovers from the times when long long wasn't required (GH-15501)

In a38e9d139929a227e3899fbb638bc46c6cc6d8ba pyconfig.h.in was
manually edited and that edit was overwritten when running autoreconf.

5 years agobpo-37947: Adjust correctly the recursion level in symtable for named expressions...
Pablo Galindo [Mon, 26 Aug 2019 14:52:25 +0000 (15:52 +0100)]
bpo-37947: Adjust correctly the recursion level in symtable for named expressions (GH-15499)

5 years agobpo-34679: Restore instantiation Windows IOCP event loop from non-main thread (#15492)
Andrew Svetlov [Mon, 26 Aug 2019 09:51:08 +0000 (12:51 +0300)]
bpo-34679: Restore instantiation Windows IOCP event loop from non-main thread (#15492)

* Restore running proactor event loop from non-main thread

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-27575: port set intersection logic into dictview intersection (GH-7696)
Forest Gregg [Mon, 26 Aug 2019 07:17:43 +0000 (02:17 -0500)]
bpo-27575: port set intersection logic into dictview intersection (GH-7696)

5 years agobpo-36917: Add default implementation of ast.NodeVisitor.visit_Constant(). (GH-15490)
Serhiy Storchaka [Mon, 26 Aug 2019 07:13:19 +0000 (10:13 +0300)]
bpo-36917: Add default implementation of ast.NodeVisitor.visit_Constant(). (GH-15490)

It emits a deprecation warning and calls corresponding method
visit_Num(), visit_Str(), etc.

5 years agobpo-37805: Add tests for json.dump(..., skipkeys=True) (GH-15489)
Dong-hee Na [Mon, 26 Aug 2019 07:04:35 +0000 (16:04 +0900)]
bpo-37805: Add tests for json.dump(..., skipkeys=True) (GH-15489)

https://bugs.python.org/issue37805

Automerge-Triggered-By: @methane
5 years agobpo-15542: Documentation incorrectly suggests __init__ called after direct __new__...
Joannah Nanjekye [Mon, 26 Aug 2019 06:53:11 +0000 (03:53 -0300)]
bpo-15542: Documentation incorrectly suggests __init__ called after direct  __new__ call (GH-15478)

5 years agobpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)
Terry Jan Reedy [Mon, 26 Aug 2019 06:27:56 +0000 (02:27 -0400)]
bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)

Cease turning SyntaxWarnings into SyntaxErrors.

5 years agoDoc: Keep the venv/* exclude pattern. (GH-15229)
Julien Palard [Mon, 26 Aug 2019 06:11:43 +0000 (08:11 +0200)]
Doc: Keep the venv/* exclude pattern. (GH-15229)

In case it has been previously created.

5 years agobpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976)
Flavian Hautbois [Sun, 25 Aug 2019 19:06:45 +0000 (21:06 +0200)]
bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976)

Co-authored-by: Andrew Nester <andrew.nester.dev@gmail.com>
5 years agobpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15131)
Nick Coghlan [Sun, 25 Aug 2019 13:45:40 +0000 (23:45 +1000)]
bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15131)

- drop TargetScopeError in favour of raising SyntaxError directly
  as per the updated PEP 572
- comprehension iteration variables are explicitly local, but
  named expression targets in comprehensions are nonlocal or
  global. Raise SyntaxError as specified in PEP 572
- named expression targets in the outermost iterable of a
  comprehension have an ambiguous target scope. Avoid resolving
  that question now by raising SyntaxError. PEP 572
  originally required this only for cases where the bound name
  conflicts with the iteration variable in the comprehension,
  but CPython can't easily restrict the exception to that case
  (as it doesn't know the target variable names when visiting
  the outermost iterator expression)

5 years agobpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)
Zackery Spytz [Sun, 25 Aug 2019 09:44:09 +0000 (03:44 -0600)]
bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)

Fix assert statement misbehavior if AssertionError is shadowed.

5 years agobpo-37905: Improve docs for NormalDist (GH-15486)
Raymond Hettinger [Sun, 25 Aug 2019 07:57:26 +0000 (00:57 -0700)]
bpo-37905: Improve docs for NormalDist (GH-15486)

5 years agobpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)
Tal Einat [Sun, 25 Aug 2019 05:52:58 +0000 (08:52 +0300)]
bpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)

These were caused by keeping around a reference to the Squeezer
instance and calling it's load_font() upon config changes, which
sometimes happened even if the shell window no longer existed.

This change completely removes that mechanism, instead having the
editor window properly update its width attribute, which can then
be used by Squeezer.

5 years agobpo-37942: Improve argument clinic float converter (GH-15470)
Raymond Hettinger [Sun, 25 Aug 2019 02:10:39 +0000 (19:10 -0700)]
bpo-37942: Improve argument clinic float converter (GH-15470)

5 years agobpo-19072: Make @classmethod support chained decorators (GH-8405)
Berker Peksag [Sat, 24 Aug 2019 22:37:25 +0000 (01:37 +0300)]
bpo-19072: Make @classmethod support chained decorators (GH-8405)

5 years agoFix typo and rearrange words in IDLE news item (GH-15471)
Terry Jan Reedy [Sat, 24 Aug 2019 21:32:33 +0000 (17:32 -0400)]
Fix typo and rearrange words in IDLE news item (GH-15471)

Redo of #15402 by GeeTransit and Kyle Stanley.

5 years agoClarify argument types in datetime docs. (GH-15459)
Jürgen Gmach [Sat, 24 Aug 2019 19:48:55 +0000 (21:48 +0200)]
Clarify argument types in datetime docs. (GH-15459)

"Arguments may be integers... " could be misunderstand as they also
could be strings.

New wording makes it clear that arguments have to be integers.

modified:   Doc/library/datetime.rst

Automerge-Triggered-By: @pganssle
5 years agobpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465)
Raymond Hettinger [Sat, 24 Aug 2019 18:15:44 +0000 (11:15 -0700)]
bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465)