]> granicus.if.org Git - python/log
python
5 years agoFix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)
Abhilash Raj [Wed, 17 Jul 2019 16:48:52 +0000 (09:48 -0700)]
Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)

This exception was caused because the input ended unexpectedly with only one
single quote instead of a pair with some value inside it.

5 years agobpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)
Abhilash Raj [Wed, 17 Jul 2019 16:44:27 +0000 (09:44 -0700)]
bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.

Some crafted email header would cause the get_parameter method to run in an
infinite loop causing a DoS attack surface when parsing those headers. This
patch fixes that by making sure the DQUOTE character is handled to prevent
going into an infinite loop.

5 years agobpo-36390: IDLE: Combine region formatting methods. (GH-12481)
Cheryl Sabella [Wed, 17 Jul 2019 13:44:44 +0000 (09:44 -0400)]
bpo-36390: IDLE: Combine region formatting methods. (GH-12481)

Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.

5 years agobpo-37543: optimize pymalloc (#14674)
Inada Naoki [Wed, 17 Jul 2019 12:23:57 +0000 (21:23 +0900)]
bpo-37543: optimize pymalloc (#14674)

PyObject_Malloc() and PyObject_Free() inlines pymalloc_alloc and
pymalloc_free partially.
But when PGO is not used, compiler don't know where is the hot part
in pymalloc_alloc and pymalloc_free.

5 years agobpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
Tal Einat [Wed, 17 Jul 2019 08:15:53 +0000 (11:15 +0300)]
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)

* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget

5 years agoDocs: Correct formatting of a multiline code block (GH-13806)
Joseph Fox-Rabinovitz [Wed, 17 Jul 2019 08:13:01 +0000 (03:13 -0500)]
Docs: Correct formatting of a multiline code block (GH-13806)

5 years agobpo-27452: IDLE: Cleanup config.py code (GH-14577)
Cheryl Sabella [Tue, 16 Jul 2019 20:58:25 +0000 (16:58 -0400)]
bpo-27452: IDLE: Cleanup config.py code (GH-14577)

5 years agoFix infinite loop in email folding logic (GH-12732)
Paul Ganssle [Tue, 16 Jul 2019 17:50:01 +0000 (19:50 +0200)]
Fix infinite loop in email folding logic (GH-12732)

As far as I can tell, this infinite loop would be triggered if:

1. The value being folded contains a single word (no spaces) longer than
   max_line_length
2. The max_line_length is shorter than the encoding's name + 9
   characters.

bpo-36564: https://bugs.python.org/issue36564

5 years agobpo-37599: Remove a vague statement in documentation of Integer Objects (#14786)
sgal [Tue, 16 Jul 2019 15:15:17 +0000 (08:15 -0700)]
bpo-37599: Remove a vague statement in documentation of Integer Objects (#14786)

* Remove a vague statement in documentation

* Remove another vague sentence

A sentence starting with "So it should be possible..." shouldn't be in the docs either.

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* Include the removal of the previous line

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* Remove an extra space

5 years agobpo-37352: Minor word-smithing for design.rst (GH #14730)
Ilya Kamenshchikov [Tue, 16 Jul 2019 15:13:38 +0000 (17:13 +0200)]
bpo-37352: Minor word-smithing for design.rst (GH #14730)

5 years agoReplace backquote with command substitution in subprocess doc example (GH-13941)
David Jones [Tue, 16 Jul 2019 14:55:19 +0000 (15:55 +0100)]
Replace backquote with command substitution in subprocess doc example (GH-13941)

Replace backquotes with POSIXy command substitution in example.

5 years agobpo-37468: make install no longer install wininst-*.exe files (GH-14511)
Victor Stinner [Mon, 15 Jul 2019 15:18:42 +0000 (17:18 +0200)]
bpo-37468: make install no longer install wininst-*.exe files (GH-14511)

make install no longer installs "wininst-*.exe" files used by
distutils bdist_wininst: bdist_wininst only works on Windows.

5 years agobpo-37284: Add note to sys.implementation doc (GH-14328)
Giovanni Cappellotto [Mon, 15 Jul 2019 14:37:09 +0000 (10:37 -0400)]
bpo-37284: Add note to sys.implementation doc (GH-14328)

Add a brief note to indicate that any new required attributes must go through the PEP process.

https://bugs.python.org/issue37284

5 years agobpo-37500: Make sure dead code does not generate bytecode but also detect syntax...
Pablo Galindo [Mon, 15 Jul 2019 09:15:01 +0000 (10:15 +0100)]
bpo-37500: Make sure dead code does not generate bytecode but also detect syntax errors (GH-14612)

https://bugs.python.org/issue37500

Add a new field to the compiler structure that allows to be configured
so no bytecode is emitted. In this way is possible to detect errors by
walking the nodes while preserving optimizations.

https://bugs.python.org/issue37500

5 years agobpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.param...
Pablo Galindo [Sun, 14 Jul 2019 23:32:18 +0000 (01:32 +0200)]
bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778)

https://bugs.python.org/issue37593

5 years agobpo-37473: Don't import importlib ASAP in tests (GH-14661)
Victor Stinner [Sun, 14 Jul 2019 17:31:12 +0000 (19:31 +0200)]
bpo-37473: Don't import importlib ASAP in tests (GH-14661)

bpo-15386, bpo-37473: test_import, regrtest and libregrtest no longer
import importlib as soon as possible, as the first import, "to test
bpo-15386".

It is tested by test_import.test_there_can_be_only_one().

Sort test_import imports.

5 years agobpo-34749: Improved performance of binascii.a2b_base64(). (GH-9444)
Sergey Fedoseev [Sun, 14 Jul 2019 12:15:32 +0000 (17:15 +0500)]
bpo-34749: Improved performance of binascii.a2b_base64(). (GH-9444)

https://bugs.python.org/issue34749

5 years agoClarify that plistlib's load and dump functions take a binary file object (GH-9825)
Collin Styles [Sun, 14 Jul 2019 09:01:48 +0000 (02:01 -0700)]
Clarify that plistlib's load and dump functions take a binary file object (GH-9825)

The documentation says that the fp parameter to plistlib.load "should be a
readable and binary file object" but the docstring only mentions that it
should be readable. Similarly, plistlib.dump's docstring only mentions
"writable". This commit clarifies that fp should also be binary.

https://docs.python.org/3/library/plistlib.html#plistlib.load
https://docs.python.org/3/library/plistlib.html#plistlib.dump

5 years agobpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 (GH-14716)
Paul Monson [Sun, 14 Jul 2019 08:30:28 +0000 (01:30 -0700)]
bpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 (GH-14716)

5 years agoRemove redundant docs of PyEval_EvalFrameEx (GH-14765)
Hai Shi [Sun, 14 Jul 2019 08:20:57 +0000 (03:20 -0500)]
Remove redundant docs of PyEval_EvalFrameEx (GH-14765)

5 years agobpo-37571: Remove extra space in ctypes docs (GH14764)
Steve Dower [Sun, 14 Jul 2019 08:09:45 +0000 (10:09 +0200)]
bpo-37571: Remove extra space in ctypes docs (GH14764)

5 years agobpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)
Michele Angrisano [Sun, 14 Jul 2019 07:55:11 +0000 (09:55 +0200)]
bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-36261: Improve example of the preamble field in email docs (GH-14751)
Carl Bordum Hansen [Sun, 14 Jul 2019 07:46:19 +0000 (09:46 +0200)]
bpo-36261: Improve example of the preamble field in email docs (GH-14751)

5 years agobpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)
Zac Hatfield-Dodds [Sun, 14 Jul 2019 05:35:58 +0000 (00:35 -0500)]
bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)

The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytest#5469, so a backport to at least 3.8 would be great :smile:
And this is my first PR to CPython, so please let me know if I've missed anything!

https://bugs.python.org/issue26967

5 years agoFix inconsequential typo in math.remainder algorithm comments. (#14746)
Mark Dickinson [Sat, 13 Jul 2019 15:50:03 +0000 (16:50 +0100)]
Fix inconsequential typo in math.remainder algorithm comments. (#14746)

5 years agobpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir...
Sviatoslav Sydorenko [Sat, 13 Jul 2019 14:47:15 +0000 (16:47 +0200)]
bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163)

Hi,

I've faced an issue w/ `mailbox.Maildir()`. The case is following:
1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty
2. I pass that folder path as an argument when instantiating `mailbox.Maildir()`
3. Then I receive an exception happening because "there's no such file or directory" (namely `cur`, `tmp` or `new`) during interaction with Maildir

**Expected result:** subdirs are created during `Maildir()` instance creation.

**Actual result:** subdirs are assumed as existing which leads to exceptions during use.

**Workaround:** remove the actual dir before passing the path to `Maildir()`. It will be created automatically with all subdirs needed.

**Fix:** This PR. Basically it adds creation of subdirs regardless of whether the base dir existed before.

https://bugs.python.org/issue30088

5 years agobpo-37358: Use vectorcall for functools.partial (GH-14284)
Jeroen Demeyer [Sat, 13 Jul 2019 14:39:18 +0000 (16:39 +0200)]
bpo-37358: Use vectorcall for functools.partial (GH-14284)

https://bugs.python.org/issue37358

5 years agobpo-37548: Document range of atan, acos and asin (GH-14717)
Giovanni Cappellotto [Sat, 13 Jul 2019 13:59:55 +0000 (09:59 -0400)]
bpo-37548: Document range of atan, acos and asin (GH-14717)

5 years agobpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)
Xtreak [Sat, 13 Jul 2019 13:22:21 +0000 (18:52 +0530)]
bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)

Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation.

This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation.

bpo-37579

5 years agobpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)
Minmin Gong [Sat, 13 Jul 2019 13:11:43 +0000 (06:11 -0700)]
bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)

5 years agobpo-37580: Fix typo in http.cookiejar documentation (GH-14731)
Milan Oberkirch [Sat, 13 Jul 2019 10:17:17 +0000 (12:17 +0200)]
bpo-37580: Fix typo in http.cookiejar documentation (GH-14731)

[bpo-37580](https://bugs.python.org/issue37580): Markup typo in http.cookiejar doc

https://bugs.python.org/issue37580

5 years agoEnable publish of Windows releases through Azure Pipelines (GH-14720)
Steve Dower [Sat, 13 Jul 2019 09:46:16 +0000 (11:46 +0200)]
Enable publish of Windows releases through Azure Pipelines (GH-14720)

5 years agoFix typo in re.escape documentation (GH-14722)
Robert DiPietro [Sat, 13 Jul 2019 08:35:04 +0000 (04:35 -0400)]
Fix typo in re.escape documentation (GH-14722)

5 years agocloses bpo-37347: Fix refcount problem in sqlite3. (GH-14268)
gescheit [Sat, 13 Jul 2019 03:15:49 +0000 (06:15 +0300)]
closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268)

5 years agobpo-37521: No longer treat insertion into sys.modules as optional in importlib exampl...
Brett Cannon [Fri, 12 Jul 2019 22:35:34 +0000 (15:35 -0700)]
bpo-37521: No longer treat insertion into sys.modules as optional in importlib examples (GH-14723)

Fix importlib examples to insert any newly created modules via importlib.util.module_from_spec() immediately into sys.modules instead of after calling loader.exec_module().

Thanks to Benjamin Mintz for finding the bug.

https://bugs.python.org/issue37521

5 years agobpo-19696: Move threaded_import_hangers (GH-14655)
Kyle Stanley [Fri, 12 Jul 2019 21:22:05 +0000 (17:22 -0400)]
bpo-19696: Move threaded_import_hangers (GH-14655)

Move `threaded_import_hangers`, a dependency of `test_threaded_import`, to the directory `test_importlib/`. Also update the import references for `threaded_import_hangers` in `test_threaded_import`.

https://bugs.python.org/issue19696

5 years agocloses bpo-37566: Remove _realsocket from socket.py. (GH-14711)
Hai Shi [Fri, 12 Jul 2019 02:17:53 +0000 (21:17 -0500)]
closes bpo-37566: Remove _realsocket from socket.py. (GH-14711)

5 years agoRemove redundant check from arraymodule b_getitem (GH-14676)
Disconnect3d [Thu, 11 Jul 2019 21:57:42 +0000 (23:57 +0200)]
Remove redundant check from arraymodule b_getitem (GH-14676)

The `arraymodule`'s `b_getitem` function returns a `PyLong` converted
from `arrayobject`'s array, by dereferencing a pointer to `char`.

When the `char` type is `signed char`, the `if (x >= 128) x -= 256;` comparison/code is redundant because a `signed char` will have a value of `[-128, 127]` and so `x` will never be greater or equal than 128.

This check was indeed needed for situations where a given compiler would assume `char` being `unsigned char` which would make `x` in `[0, 256]` range.

However, the check can be removed if we cast the `ob_item` into a signed char pointer (`signed char*`) instead of `char*`.

This PR/commit introduces this change.

5 years agobpo-37558: Shared memory tests are failing due to double slashes (GH-14703)
Jakub Kulík [Thu, 11 Jul 2019 18:04:09 +0000 (20:04 +0200)]
bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)

With the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. The reason seems to be incorrect name handling which results in two slashes being prepended.

https://bugs.python.org/issue37558

5 years agocloses bpo-37554: Remove `q:q` in os.rst documentation (GH-14692)
Mariatta [Thu, 11 Jul 2019 17:31:19 +0000 (10:31 -0700)]
closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692)

https://bugs.python.org/issue37554

5 years agobpo-29548: no longer use PyEval_Call* functions (GH-14683)
Jeroen Demeyer [Thu, 11 Jul 2019 15:57:32 +0000 (17:57 +0200)]
bpo-29548: no longer use PyEval_Call* functions (GH-14683)

5 years agobpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)
Tal Einat [Thu, 11 Jul 2019 14:20:14 +0000 (17:20 +0300)]
bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)

5 years agobpo-34369: make kqueue.control() docs better reflect that timeout is positional-only...
Tal Einat [Thu, 11 Jul 2019 14:00:34 +0000 (17:00 +0300)]
bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499)

5 years agobpo-37547: add _PyObject_CallMethodOneArg (GH-14685)
Jeroen Demeyer [Thu, 11 Jul 2019 08:59:05 +0000 (10:59 +0200)]
bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)

5 years agoDocument default parameter of .seek() in the signature. (GH-14691)
Benjamin Peterson [Thu, 11 Jul 2019 02:43:04 +0000 (19:43 -0700)]
Document default parameter of .seek() in the signature. (GH-14691)

5 years agoFix compiler warning in new code. (#14690)
Tim Peters [Wed, 10 Jul 2019 21:24:01 +0000 (16:24 -0500)]
Fix compiler warning in new code. (#14690)

uintptr_t is an integer type, and can't be compared to NULL directly.

5 years agobpo-37537: Compute allocated blocks in _Py_GetAllocatedBlocks() (#14680)
Neil Schemenauer [Wed, 10 Jul 2019 19:04:16 +0000 (12:04 -0700)]
bpo-37537: Compute allocated blocks in _Py_GetAllocatedBlocks() (#14680)

Keeping an account of allocated blocks slows down _PyObject_Malloc()
and _PyObject_Free() by a measureable amount.  Have
_Py_GetAllocatedBlocks() iterate over the arenas to sum up the
allocated blocks for pymalloc.

5 years agoRename memory.c to mpalloc.c for consistency with the header file. (#14687)
Stefan Krah [Wed, 10 Jul 2019 16:27:38 +0000 (18:27 +0200)]
Rename memory.c to mpalloc.c for consistency with the header file. (#14687)

5 years agoReally remove vcstdint.h. (#14686)
Stefan Krah [Wed, 10 Jul 2019 15:55:48 +0000 (17:55 +0200)]
Really remove vcstdint.h. (#14686)

5 years agobpo-26806: IDLE should run without docstrings (#14657)
Terry Jan Reedy [Tue, 9 Jul 2019 18:37:25 +0000 (14:37 -0400)]
bpo-26806: IDLE should run without docstrings (#14657)

After fcf1d00, IDLE startup failed with python compiled without docstrings.

5 years agobpo-27679: Remove set_bitfields() from _ctypes_test (GH-14648)
Hai Shi [Tue, 9 Jul 2019 18:00:27 +0000 (13:00 -0500)]
bpo-27679: Remove set_bitfields() from _ctypes_test (GH-14648)

5 years agobpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)
Victor Stinner [Tue, 9 Jul 2019 12:33:49 +0000 (14:33 +0200)]
bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)

test_ssl.test_pha_required_nocert() now uses
support.catch_threading_exception() to ignore the expected SSLError
in ConnectionHandler of ThreadedEchoServer (it is only raised
sometimes on Windows).

5 years agobpo-18374: fix tests to check the correct thing about line numbers (GH-14659)
Carl Friedrich Bolz-Tereick [Tue, 9 Jul 2019 12:20:01 +0000 (14:20 +0200)]
bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)

5 years agoRevert "bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662...
Victor Stinner [Tue, 9 Jul 2019 11:35:47 +0000 (13:35 +0200)]
Revert "bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)" (GH-14669)

This reverts commit cf9c41c422de3774862db964fe3153086bad3f61.

5 years agobpo-37120: Fix _ssl get_num_tickets() (GH-14668)
Victor Stinner [Tue, 9 Jul 2019 11:30:52 +0000 (13:30 +0200)]
bpo-37120: Fix _ssl get_num_tickets() (GH-14668)

Replace PyLong_FromLong() with PyLong_FromSize_t():
SSL_CTX_get_num_tickets() return type is size_t.

https://bugs.python.org/issue37120

5 years agobpo-37526: Add support.catch_threading_exception() (GH-14664)
Victor Stinner [Tue, 9 Jul 2019 11:00:23 +0000 (13:00 +0200)]
bpo-37526: Add support.catch_threading_exception() (GH-14664)

Context manager catching threading.Thread exception using
threading.excepthook.

5 years agobpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)
Victor Stinner [Tue, 9 Jul 2019 10:36:55 +0000 (12:36 +0200)]
bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)

Close the TLS connection in test_pha_required_nocert() of test_ssl to
fix a ResourceWarning.

5 years agobpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
Carl Friedrich Bolz-Tereick [Mon, 8 Jul 2019 21:17:56 +0000 (23:17 +0200)]
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)

Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the
second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the
correct st node to copy the line and col_offset from in ast.c.

5 years agoDoc: Fix example title. (GH-14639)
Julien Palard [Mon, 8 Jul 2019 21:08:07 +0000 (23:08 +0200)]
Doc: Fix example title. (GH-14639)

5 years agoDoc: Fix: Proper UpperCamelCase and lowercase. (GH-14644)
Julien Palard [Mon, 8 Jul 2019 21:06:32 +0000 (23:06 +0200)]
Doc: Fix: Proper UpperCamelCase and lowercase. (GH-14644)

Initial report by Michael Blankenship on docs@

5 years agobpo-37421: test_concurrent_futures stops ForkServer (GH-14643)
Victor Stinner [Mon, 8 Jul 2019 08:49:11 +0000 (10:49 +0200)]
bpo-37421: test_concurrent_futures stops ForkServer (GH-14643)

test_concurrent_futures now explicitly stops the ForkServer instance
if it's running.

5 years agobpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
Jeroen Demeyer [Mon, 8 Jul 2019 08:19:25 +0000 (10:19 +0200)]
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)

5 years agobpo-37520: Correct behavior for zipfile.Path.parent (GH-14638)
Jason R. Coombs [Sun, 7 Jul 2019 21:37:50 +0000 (17:37 -0400)]
bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638)

* bpo-37520: Correct behavior for zipfile.Path.parent

* 📜🤖 Added by blurb_it.

5 years agobpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615)
Hai Shi [Sun, 7 Jul 2019 15:40:07 +0000 (10:40 -0500)]
bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615)

5 years agobpo-37478: Add missing 'and'. (GH-14631)
Terry Jan Reedy [Sun, 7 Jul 2019 02:44:01 +0000 (22:44 -0400)]
bpo-37478: Add missing 'and'. (GH-14631)

5 years agobpo-37478: Specify possible exceptions for os.chdir() (GH-14611)
Kyle Stanley [Sun, 7 Jul 2019 01:20:15 +0000 (21:20 -0400)]
bpo-37478: Specify possible exceptions for os.chdir() (GH-14611)

5 years agobpo-37456: Slash ('/') is now part of syntax. (GH-14627)
Terry Jan Reedy [Sat, 6 Jul 2019 22:13:02 +0000 (18:13 -0400)]
bpo-37456: Slash ('/') is now part of syntax. (GH-14627)

5 years agobpo-37487: Fix PyList_GetItem index description. (GH-14623)
Terry Jan Reedy [Sat, 6 Jul 2019 21:40:27 +0000 (17:40 -0400)]
bpo-37487: Fix PyList_GetItem index description. (GH-14623)

0 is a legal index.

5 years agobpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
Tal Einat [Sat, 6 Jul 2019 12:35:24 +0000 (15:35 +0300)]
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)

This is done to compensate for the extra stack frames added by
IDLE itself, which cause problems when setting the recursion limit
to low values.

This wraps sys.setrecursionlimit() and sys.getrecursionlimit()
as invisibly as possible.

5 years agobpo-37149: Replace dead link for online Tkinter reference (GH-14616)
Terry Jan Reedy [Sat, 6 Jul 2019 06:31:54 +0000 (02:31 -0400)]
bpo-37149: Replace dead link for online Tkinter reference  (GH-14616)

Also fix a name misspelling.

5 years agocloses bpo-37508: Fix name of type in memory.rst. (GH-14604)
Hai Shi [Sat, 6 Jul 2019 04:03:13 +0000 (23:03 -0500)]
closes bpo-37508: Fix name of type in memory.rst. (GH-14604)

5 years agoFix some typos (GH-14435)
Min ho Kim [Fri, 5 Jul 2019 21:39:32 +0000 (07:39 +1000)]
Fix some typos (GH-14435)

5 years agoTypo fix in file Include/object.h (GH-14556)
Hansraj Das [Fri, 5 Jul 2019 21:37:15 +0000 (03:07 +0530)]
Typo fix in file Include/object.h (GH-14556)

* accross -> across
* Extra space removed in comment

5 years agoMove test_threaded_import.py to test_importlib/ (GH-14582)
Kyle Stanley [Fri, 5 Jul 2019 21:22:42 +0000 (17:22 -0400)]
Move test_threaded_import.py to test_importlib/ (GH-14582)

5 years agobpo-37151: remove _PyMethodDef_RawFastCall* functions (GH-14603)
Jeroen Demeyer [Fri, 5 Jul 2019 15:43:23 +0000 (17:43 +0200)]
bpo-37151: remove _PyMethodDef_RawFastCall* functions (GH-14603)

5 years agobpo-37421: multiprocessing tests now stop ForkServer (GH-14601)
Victor Stinner [Fri, 5 Jul 2019 14:15:39 +0000 (16:15 +0200)]
bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)

multiprocessing tests now stop the ForkServer instance if it's
running: close the "alive" file descriptor to ask the server to stop
and then remove its UNIX address.

5 years agobpo-36974: separate vectorcall functions for each calling convention (GH-13781)
Jeroen Demeyer [Fri, 5 Jul 2019 12:48:24 +0000 (14:48 +0200)]
bpo-36974: separate vectorcall functions for each calling convention (GH-13781)

5 years agobpo-37483: fix reference leak in _PyCodec_Lookup (GH-14600)
Jeroen Demeyer [Fri, 5 Jul 2019 10:57:32 +0000 (12:57 +0200)]
bpo-37483: fix reference leak in _PyCodec_Lookup (GH-14600)

5 years agobpo-37481: Deprecate distutils bdist_wininst command (GH-14553)
Victor Stinner [Fri, 5 Jul 2019 08:44:12 +0000 (10:44 +0200)]
bpo-37481: Deprecate distutils bdist_wininst command (GH-14553)

The distutils bdist_wininst command is now deprecated, use
bdist_wheel (wheel packages) instead.

5 years agoUse OSError subclasses in os documentation (GH-14262)
Tim Hoffmann [Fri, 5 Jul 2019 08:41:35 +0000 (10:41 +0200)]
Use OSError subclasses in os documentation (GH-14262)

5 years agobpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__ (GH...
thatneat [Thu, 4 Jul 2019 18:28:37 +0000 (11:28 -0700)]
bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__ (GH-14545)

* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__

5 years agobpo-37266: Add bpo number to the What's New entry (GH614584)
Victor Stinner [Thu, 4 Jul 2019 16:30:19 +0000 (18:30 +0200)]
bpo-37266: Add bpo number to the What's New entry (GH614584)

To get more info about this change.

5 years agobpo-37493: use _PyObject_CallNoArg in more places (GH-14575)
Jeroen Demeyer [Thu, 4 Jul 2019 10:35:31 +0000 (12:35 +0200)]
bpo-37493: use _PyObject_CallNoArg in more places (GH-14575)

5 years agobpo-37483: add _PyObject_CallOneArg() function (#14558)
Jeroen Demeyer [Thu, 4 Jul 2019 10:31:34 +0000 (12:31 +0200)]
bpo-37483: add _PyObject_CallOneArg() function (#14558)

5 years agobpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572)
Victor Stinner [Thu, 4 Jul 2019 10:28:55 +0000 (12:28 +0200)]
bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572)

Fix multiprocessing.util.get_temp_dir() finalizer: clear also the
'tempdir' configuration of the current process, so next call to
get_temp_dir() will create a new temporary directory, rather than
reusing the removed temporary directory.

5 years agobpo-37459: importlib docs improperly reference get_resource_loader() (#14568)
aldwinaldwin [Thu, 4 Jul 2019 00:58:45 +0000 (08:58 +0800)]
bpo-37459: importlib docs improperly reference get_resource_loader() (#14568)

* bpo-37459: importlib docs improperly reference get_resource_loader()

5 years agobpo-19696: Replace deprecated method in "test_import_pkg.py" (GH-14466)
Kyle Stanley [Wed, 3 Jul 2019 18:22:40 +0000 (14:22 -0400)]
bpo-19696: Replace deprecated method in "test_import_pkg.py" (GH-14466)

Replacing the deprecated method "random.choose" to "random.choice" was technically not part of the original issue. However, it was discussed in the talk page and involved one of the files being moved. I assumed this was too minor to justify the creation of a separate issue.

Also, I added my name to the contributors list in Misc/ACKS. This will be my third PR to cpython, forgot to do it in the previous ones.

https://bugs.python.org/issue19696

5 years agobpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550)
Jeroen Demeyer [Wed, 3 Jul 2019 10:54:00 +0000 (12:54 +0200)]
bpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550)

5 years agobpo-37484: use _PyObject_Vectorcall for __exit__ (GH-14557)
Jeroen Demeyer [Wed, 3 Jul 2019 10:52:21 +0000 (12:52 +0200)]
bpo-37484: use _PyObject_Vectorcall for __exit__ (GH-14557)

5 years agobpo-37421: Fix test_distutils.test_build_ext() (GH-14564)
Victor Stinner [Wed, 3 Jul 2019 09:12:27 +0000 (11:12 +0200)]
bpo-37421: Fix test_distutils.test_build_ext() (GH-14564)

test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.

5 years agobpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563)
Victor Stinner [Wed, 3 Jul 2019 09:10:30 +0000 (11:10 +0200)]
bpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563)

test_concurrent_futures now cleans up multiprocessing to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().

The test now uses setUpModule() and tearDownModule().

5 years agobpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562)
Victor Stinner [Wed, 3 Jul 2019 09:09:56 +0000 (11:09 +0200)]
bpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562)

test_winconsoleio doesn't leak a temporary file anymore: use
tempfile.TemporaryFile() to remove it when the test completes.

5 years agoFix typo in 3.9's Whats new. Pyton -> Python (GH-14567)
ILJI CHOI [Wed, 3 Jul 2019 02:36:01 +0000 (11:36 +0900)]
Fix typo in 3.9's Whats new. Pyton -> Python (GH-14567)

5 years agobpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)
Hai Shi [Wed, 3 Jul 2019 01:56:07 +0000 (20:56 -0500)]
bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)

5 years agobpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
Christian Heimes [Tue, 2 Jul 2019 18:39:42 +0000 (20:39 +0200)]
bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)

ssl.match_hostname() no longer accepts IPv4 addresses with additional text
after the address and only quad-dotted notation without trailing
whitespaces. Some inet_aton() implementations ignore whitespace and all data
after whitespace, e.g. '127.0.0.1 whatever'.

Short notations like '127.1' for '127.0.0.1' were already filtered out.

The bug was initially found by Dominik Czarnota and reported by Paul Kehrer.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37463

5 years agobpo-37421: urllib.request tests call urlcleanup() (GH-14529)
Victor Stinner [Tue, 2 Jul 2019 12:50:19 +0000 (14:50 +0200)]
bpo-37421: urllib.request tests call urlcleanup() (GH-14529)

urllib.request tests now call urlcleanup() to remove temporary files
created by urlretrieve() tests and to clear the _opener global
variable set by urlopen() and functions calling indirectly urlopen().

regrtest now checks if urllib.request._url_tempfiles and
urllib.request._opener are changed by tests.

5 years agobpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)
Victor Stinner [Tue, 2 Jul 2019 11:32:32 +0000 (13:32 +0200)]
bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)

multiprocessing tests now call explicitly _run_finalizers() to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().

5 years agobpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447)
Jakub Kulík [Tue, 2 Jul 2019 10:48:28 +0000 (12:48 +0200)]
bpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447)

Python initialization now ensures that sys stream encoding
names are always normalized by codecs.lookup(encoding).name.
Simplify test_c_locale_coercion: it doesn't have to normalize
encoding names anymore.

5 years agobpo-36904: Optimize _PyStack_UnpackDict (GH-14517)
Jeroen Demeyer [Tue, 2 Jul 2019 09:49:40 +0000 (11:49 +0200)]
bpo-36904: Optimize _PyStack_UnpackDict (GH-14517)

5 years agobpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
Ned Deily [Tue, 2 Jul 2019 07:12:18 +0000 (03:12 -0400)]
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)

Under some conditions the earlier fix for bpo-18075, "Infinite recursion
tests triggering a segfault on Mac OS X", now causes failures on macOS
when attempting to change stack limit with resource.setrlimit
resource.RLIMIT_STACK, like regrtest does when running the test suite.
The reverted change had specified a non-default stack size when linking
the python executable on macOS.  As of macOS 10.14.4, the previous
code causes a hard failure when running tests, although similar
failures had been seen under some conditions under some earlier
systems.  Reverting the change to the interpreter stack size at link
time helped for release builds but caused some tests to fail when
built --with-pydebug.  Try the opposite approach: continue to build
the interpreter with an increased stack size on macOS and remove
the failing setrlimit call in regrtest initialization.  This will
definitely avoid the resource.RLIMIT_STACK error and should have
no, or fewer, side effects.