]> granicus.if.org Git - python/log
python
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.

5 years agoPut pyexpatns.h include back. bpo-37437 (GH-14539)
Benjamin Peterson [Tue, 2 Jul 2019 05:07:44 +0000 (22:07 -0700)]
Put pyexpatns.h include back. bpo-37437 (GH-14539)

5 years agobpo-37363: Add audit events on startup for the run commands (GH-14524)
Steve Dower [Mon, 1 Jul 2019 23:03:53 +0000 (16:03 -0700)]
bpo-37363: Add audit events on startup for the run commands (GH-14524)

5 years agobpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH...
Vinay Sajip [Mon, 1 Jul 2019 19:45:01 +0000 (20:45 +0100)]
bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532)

5 years agobpo-36763: Use PyConfig_Clear() (GH-14445)
Victor Stinner [Mon, 1 Jul 2019 17:52:45 +0000 (19:52 +0200)]
bpo-36763: Use PyConfig_Clear() (GH-14445)

Stop using "static PyConfig", PyConfig must now always use
dynamically allocated strings: use PyConfig_SetString(),
PyConfig_SetArgv() and PyConfig_Clear().

5 years agobpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener...
Vinay Sajip [Mon, 1 Jul 2019 17:45:07 +0000 (18:45 +0100)]
bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521)

5 years agobpo-36763: Add PyConfig_SetWideStringList() (GH-14444)
Victor Stinner [Mon, 1 Jul 2019 17:13:50 +0000 (19:13 +0200)]
bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)

5 years agobpo-37472: Remove Lib/test/outstanding_bugs.py (GH-14516)
Victor Stinner [Mon, 1 Jul 2019 16:35:07 +0000 (18:35 +0200)]
bpo-37472: Remove Lib/test/outstanding_bugs.py (GH-14516)

5 years agoRemove unused imports in tests (GH-14518)
Victor Stinner [Mon, 1 Jul 2019 16:28:25 +0000 (18:28 +0200)]
Remove unused imports in tests (GH-14518)

5 years agobpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)
Victor Stinner [Mon, 1 Jul 2019 14:51:18 +0000 (16:51 +0200)]
bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)

Fix sys.excepthook() and PyErr_Display() if a filename is a bytes
string. For example, for a SyntaxError exception where the filename
attribute is a bytes string.

Cleanup also test_sys:

* Sort imports.
* Rename numruns global var to INTERN_NUMRUNS.
* Add DisplayHookTest and ExceptHookTest test case classes.
* Don't save/restore sys.stdout and sys.displayhook using
  setUp()/tearDown(): do it in each test method.
* Test error case (call hook with no argument) after the success case.

5 years agobpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503)
Pierre Glaser [Mon, 1 Jul 2019 13:51:57 +0000 (15:51 +0200)]
bpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503)

5 years agobpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506)
Miro Hrončok [Mon, 1 Jul 2019 12:12:40 +0000 (14:12 +0200)]
bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506)

bdist_wininst depends on MBCS codec, unavailable on non-Windows,
and bdist_wininst have not worked since at least Python 3.2, possibly
never on Python 3.

Here we document that bdist_wininst is only supported on Windows,
and we mark it unsupported otherwise to skip tests.

Distributors of Python 3 can now safely drop the bdist_wininst .exe files
without the need to skip bdist_wininst related tests.

5 years agobpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler...
Vinay Sajip [Mon, 1 Jul 2019 11:41:21 +0000 (12:41 +0100)]
bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498)

5 years agobpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New...
Pablo Galindo [Mon, 1 Jul 2019 10:35:05 +0000 (11:35 +0100)]
bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New as a compatibility wrapper (GH-13959)

Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper

5 years agoMinor updates to the macOS installer screens for 3.8.0b2 (GH-14501)
Ned Deily [Mon, 1 Jul 2019 09:53:42 +0000 (05:53 -0400)]
Minor updates to the macOS installer screens for 3.8.0b2 (GH-14501)

5 years agobpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448)
Christian Heimes [Mon, 1 Jul 2019 06:32:24 +0000 (08:32 +0200)]
bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448)

Post-handshake authentication is required for conditional client cert authentication with TLS 1.3.

https://bugs.python.org/issue37440

5 years agobpo-37428: Don't set PHA verify flag on client side (GH-14421)
Christian Heimes [Mon, 1 Jul 2019 06:29:17 +0000 (08:29 +0200)]
bpo-37428: Don't set PHA verify flag on client side (GH-14421)

SSLContext.post_handshake_auth = True no longer sets
SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the
option is documented as ignored for clients, OpenSSL implicitly enables cert
chain validation when the flag is set.

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

5 years agobpo-36168: Lowercase the word "subsequent" in get_value doc (GH-14485)
Krishna Oza [Mon, 1 Jul 2019 06:04:20 +0000 (11:34 +0530)]
bpo-36168: Lowercase the word "subsequent" in get_value doc (GH-14485)

Subsequent -> subsequent

https://bugs.python.org/issue36168

5 years agobpo-37199: Fix test failures when IPv6 is unavailable or disabled (#14480)
Zackery Spytz [Sun, 30 Jun 2019 15:24:43 +0000 (09:24 -0600)]
bpo-37199: Fix test failures when IPv6 is unavailable or disabled (#14480)

5 years agobpo-35621: Support running subprocesses in asyncio when loop is executed in non-main...
Andrew Svetlov [Sun, 30 Jun 2019 09:54:59 +0000 (12:54 +0300)]
bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread  (GH-14344)

5 years agobpo-29505: Add more fuzzing for re.compile, re.load and csv.reader (GH-14255)
Ammar Askar [Sun, 30 Jun 2019 05:54:43 +0000 (01:54 -0400)]
bpo-29505: Add more fuzzing for re.compile, re.load and csv.reader (GH-14255)

Add more fuzz testing for re.compile, re.load and csv.reader

5 years agobpo-30754: Document textwrap.dedent blank line behavior. (GH-14469)
tmblweed [Sun, 30 Jun 2019 04:20:03 +0000 (21:20 -0700)]
bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469)

* Added documentation for textwrap.dedent behavior.
* Remove an obsolete note about pre-2.5 behavior from the docstring.

5 years agobpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14470)
Benjamin Peterson [Sat, 29 Jun 2019 23:00:22 +0000 (16:00 -0700)]
bpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14470)

5 years agoMake StreamHandler.terminator more discoverable (GH-14359)
Andre Delfino [Sat, 29 Jun 2019 21:59:49 +0000 (18:59 -0300)]
Make StreamHandler.terminator more discoverable (GH-14359)

5 years agoFix indentation in logging.handlers.setStream (GH-14358)
Andre Delfino [Sat, 29 Jun 2019 21:57:39 +0000 (18:57 -0300)]
Fix indentation in logging.handlers.setStream (GH-14358)

5 years agobpo-37369: Fixes crash when reporting fatal error (GH-14468)
Steve Dower [Sat, 29 Jun 2019 21:28:43 +0000 (14:28 -0700)]
bpo-37369: Fixes crash when reporting fatal error (GH-14468)

5 years agobpo-37369: Fix initialization of sys members when launched via an app container ...
Steve Dower [Sat, 29 Jun 2019 17:34:11 +0000 (10:34 -0700)]
bpo-37369: Fix initialization of sys members when launched via an app container (GH-14428)

sys._base_executable is now always defined on all platforms, and can be overridden through configuration.
Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable

5 years agobpo-19696: Moved "test_pkgimport.py" to dir "test_importlib" (GH-14303)
Kyle Stanley [Fri, 28 Jun 2019 19:37:11 +0000 (15:37 -0400)]
bpo-19696: Moved "test_pkgimport.py" to dir "test_importlib" (GH-14303)

Also renamed the file to "test_pkg_import.py" to better follow the naming convention. Component of issue 19696.

https://bugs.python.org/issue19696

5 years agobpo-37403: Touch up venv docs (GH-14458)
Brett Cannon [Fri, 28 Jun 2019 19:14:31 +0000 (12:14 -0700)]
bpo-37403: Touch up venv docs (GH-14458)

Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.

5 years agobpo-31783: Fix a race condition creating workers during shutdown (#13171)
Brian Quinlan [Fri, 28 Jun 2019 18:54:52 +0000 (11:54 -0700)]
bpo-31783: Fix a race condition creating workers during shutdown (#13171)

* bpo-31783: Fix a race condition while creating workers during interpreter shutdown

* 📜🤖 Added by blurb_it.

5 years agobpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)
Victor Stinner [Fri, 28 Jun 2019 17:39:48 +0000 (19:39 +0200)]
bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)

5 years agobpo-37380: subprocess: don't use _active on win (GH-14360)
Ruslan Kuprieiev [Fri, 28 Jun 2019 16:12:16 +0000 (19:12 +0300)]
bpo-37380: subprocess: don't use _active on win (GH-14360)

As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380#msg346333
[2] https://bugs.python.org/issue36067#msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
5 years agobpo-37412: pythoninfo: add Windows long paths (GH-14434)
Victor Stinner [Fri, 28 Jun 2019 16:05:05 +0000 (18:05 +0200)]
bpo-37412: pythoninfo: add Windows long paths (GH-14434)

On Windows, test.pythoninfo now checks if support for long paths is
enabled using ntdll.RtlAreLongPathsEnabled() function.

Co-Authored-By: Eryk Sun <eryksun@gmail.com>
5 years agobpo-37412: Fix os.getcwd() for long path on Windows (GH-14424)
Victor Stinner [Fri, 28 Jun 2019 16:01:59 +0000 (18:01 +0200)]
bpo-37412: Fix os.getcwd() for long path on Windows (GH-14424)

* Fix test for integer overflow.
* Add an unit test.