]> granicus.if.org Git - python/log
python
5 years agobpo-34596: Fallback to a default reason when @unittest.skip is uncalled (#9082)
Naitree Zhu [Mon, 9 Sep 2019 14:06:48 +0000 (22:06 +0800)]
bpo-34596: Fallback to a default reason when @unittest.skip is uncalled (#9082)

* bpo-34596: Fallback to a default reason when @unittest.skip is uncalled

* Change default reason to empty string

* Fix rst formatting of NEWS entry

5 years agobpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768)
Vinay Sajip [Mon, 9 Sep 2019 13:50:38 +0000 (14:50 +0100)]
bpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768)

5 years agobpo-38037: Fix reference counters in signal module (GH-15753)
animalize [Mon, 9 Sep 2019 13:46:26 +0000 (21:46 +0800)]
bpo-38037: Fix reference counters in signal module (GH-15753)

5 years agobpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
Steve Dower [Mon, 9 Sep 2019 13:24:15 +0000 (06:24 -0700)]
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)

5 years agobpo-26185: Fix repr() on empty ZipInfo object (#13441)
Mickaël Schoentgen [Mon, 9 Sep 2019 13:08:54 +0000 (15:08 +0200)]
bpo-26185: Fix repr() on empty ZipInfo object (#13441)

* bpo-26185: Fix repr() on empty ZipInfo object

It was failing on AttributeError due to inexistant
but required attributes file_size and compress_size.
They are now initialized to 0 in ZipInfo.__init__().

* Remove useless hasattr() in ZipInfo._open_to_write()

* Completely remove file_size setting in _open_to_write().

5 years agoFix typo in math.prod example (GH-15614)
Ashwin Vishnu [Mon, 9 Sep 2019 12:42:27 +0000 (14:42 +0200)]
Fix typo in math.prod example (GH-15614)

5 years agobpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)
neonene [Mon, 9 Sep 2019 12:33:43 +0000 (21:33 +0900)]
bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)

ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2.
But CertCloseStore() is called only once and the refcnt leaves 1.

5 years agobpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757)
T. Wouters [Mon, 9 Sep 2019 12:17:18 +0000 (05:17 -0700)]
bpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757)

The missing dependencies prevented incremental builds from working when you touched any
of these files. Based on GH-14758 by @vemakereporter.

5 years agobpo-37283: Ensure command-line and unattend.xml setting override previously detected...
Steve Dower [Mon, 9 Sep 2019 12:15:07 +0000 (05:15 -0700)]
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)

5 years agobpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758)
Benjamin Peterson [Mon, 9 Sep 2019 12:13:00 +0000 (05:13 -0700)]
bpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758)

5 years agologging.Formatter docs: Add missing `validate` parameter, clarify `style` parameter...
David Röthlisberger [Mon, 9 Sep 2019 11:29:54 +0000 (12:29 +0100)]
logging.Formatter docs: Add missing `validate` parameter, clarify `style` parameter (GH-15222)

5 years agobpo-37212: Preserve keyword argument order in unittest.mock.call and error messages...
Xtreak [Mon, 9 Sep 2019 10:55:22 +0000 (16:25 +0530)]
bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310)

5 years agoDoc: Fix PDF build (NoUri). (GH-15739)
Julien Palard [Mon, 9 Sep 2019 10:54:56 +0000 (12:54 +0200)]
Doc: Fix PDF build (NoUri). (GH-15739)

5 years agoFuture-proof .travis.yml for Python 3.10 (GH-14831)
Anthony Sottile [Mon, 9 Sep 2019 10:49:33 +0000 (03:49 -0700)]
Future-proof .travis.yml for Python 3.10 (GH-14831)

5 years agobpo-36250: ignore ValueError from signal in non-main thread (GH-12251)
Daniel Hahler [Mon, 9 Sep 2019 10:45:58 +0000 (12:45 +0200)]
bpo-36250: ignore ValueError from signal in non-main thread (GH-12251)

Authored-By: blueyed <github@thequod.de>
5 years agobpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)
Zackery Spytz [Mon, 9 Sep 2019 09:35:08 +0000 (03:35 -0600)]
bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)

winerror_to_errno() is no longer automatically generated.
Do not rely on the old _dosmapperr() function.
Add ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ.

5 years agobpo-37936: Avoid ignoring files that we actually do track. (GH-15451)
Greg Price [Mon, 9 Sep 2019 09:34:50 +0000 (02:34 -0700)]
bpo-37936: Avoid ignoring files that we actually do track. (GH-15451)

There were about 14 files that are actually in the repo but that are
covered by the rules in .gitignore.

Git itself takes no notice of what .gitignore says about files that
it's already tracking... but the discrepancy can be confusing to a
human that adds a new file unexpectedly covered by these rules, as
well as to non-Git software that looks at .gitignore but doesn't
implement this wrinkle in its semantics.  (E.g., `rg`.)

Several of these are from rules that apply more broadly than
intended: for example, `Makefile` applies to `Doc/Makefile` and
`Tools/freeze/test/Makefile`, whereas `/Makefile` means only the
`Makefile` at the repo's root.

And the `Modules/Setup` rule simply wasn't updated after 961d54c5c.

https://bugs.python.org/issue37936

5 years agobpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (#13239)
Zackery Spytz [Mon, 9 Sep 2019 09:26:15 +0000 (03:26 -0600)]
bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (#13239)

* bpo-32587: Make winreg.REG_MULTI_SZ support PendingFileRenameOperations

* Address review comments.

5 years agobpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)
Zackery Spytz [Mon, 9 Sep 2019 09:20:39 +0000 (03:20 -0600)]
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.

5 years agobpo-38043: Use `bool` for boolean flags on is_normalized_quickcheck. (GH-15711)
Greg Price [Mon, 9 Sep 2019 09:16:31 +0000 (02:16 -0700)]
bpo-38043: Use `bool` for boolean flags on is_normalized_quickcheck. (GH-15711)

5 years agobpo-11953: Extend table of Windows WSA* error codes (GH-15004)
Ngalim Siregar [Mon, 9 Sep 2019 09:15:14 +0000 (16:15 +0700)]
bpo-11953: Extend table of Windows WSA* error codes (GH-15004)

5 years agobpo-15817: gdbinit: Document commands after defining them (GH-15021)
Florian Bruhin [Mon, 9 Sep 2019 09:06:37 +0000 (11:06 +0200)]
bpo-15817: gdbinit: Document commands after defining them (GH-15021)

The gdb manual[1] says the following for "document":

  The command commandname must already be defined.

[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Define.html

And indeed when trying to use the gdbinit file with gdb 8.3, I get:

  .../cpython/Misc/gdbinit:17: Error in sourced command file:
  Undefined command: "pyo".  Try "help".

Fix this by moving all documentation blocks after the define blocks.

This was introduced in GH-6384.

5 years agoFix assertions regarding magic methods function body that was not executed (GH-14154)
Xtreak [Mon, 9 Sep 2019 09:04:57 +0000 (14:34 +0530)]
Fix assertions regarding magic methods function body that was not executed (GH-14154)

5 years agobpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)
Serhiy Storchaka [Mon, 9 Sep 2019 08:47:14 +0000 (11:47 +0300)]
bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)

RuntimeError is now raised in this case.

5 years agoRevert "Raise a RuntimeError when tee iterator is consumed from different threads...
Serhiy Storchaka [Mon, 9 Sep 2019 08:18:16 +0000 (11:18 +0300)]
Revert "Raise a RuntimeError when tee iterator is consumed from different threads (GH-15567)" (GH-15736)

This reverts commit fa220ec7633e9674baccc28dde987f29d7f65141.

5 years agobpo-36018: Address more reviewer feedback (GH-15733)
Raymond Hettinger [Sun, 8 Sep 2019 23:57:58 +0000 (16:57 -0700)]
bpo-36018: Address more reviewer feedback (GH-15733)

5 years agobpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639)
HongWeipeng [Sun, 8 Sep 2019 10:15:56 +0000 (18:15 +0800)]
bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639)

This is a complement to PR 13375.

5 years agoCorrect Roman-numeral example in Unicode HOWTO. (GH-15541)
Greg Price [Sun, 8 Sep 2019 09:42:13 +0000 (02:42 -0700)]
Correct Roman-numeral example in Unicode HOWTO. (GH-15541)

5 years agobpo-38038: Remove urllib.parse._splittype from xmlrpc.client. (GH-15703)
Dong-hee Na [Sun, 8 Sep 2019 08:54:02 +0000 (17:54 +0900)]
bpo-38038: Remove urllib.parse._splittype from xmlrpc.client. (GH-15703)

5 years agoRemove some unused defines in multiprocessing.h. (GH-15661)
Sergey Fedoseev [Sat, 7 Sep 2019 07:44:36 +0000 (12:44 +0500)]
Remove some unused defines in multiprocessing.h. (GH-15661)

It looks like they are unused since
87cf220972c9cb400ddcd577962883dcc5dca51a.

5 years agobpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)
Joannah Nanjekye [Sat, 7 Sep 2019 07:05:29 +0000 (04:05 -0300)]
bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)

5 years ago bpo-38041: Refine IDLE Shell restart lines. (GH-15709)
Terry Jan Reedy [Fri, 6 Sep 2019 17:54:45 +0000 (13:54 -0400)]
 bpo-38041: Refine IDLE Shell restart lines.  (GH-15709)

 Restart lines now always start with '=' and never end with ' ' and fill the width of the window unless that would require ending with ' ', which could be wrapped by itself and possible confusing the user.

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