]> granicus.if.org Git - python/log
python
5 years agobpo-36760: Clarify subprocess capture_output docs. (GH-13322)
Gregory P. Smith [Tue, 14 May 2019 19:33:17 +0000 (12:33 -0700)]
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)

Clarify how to capture stdout and stderr combined into one stream.

5 years agobpo-36618: Don't add -fmax-type-align=8 flag for clang (GH-13320)
Victor Stinner [Tue, 14 May 2019 17:29:53 +0000 (19:29 +0200)]
bpo-36618: Don't add -fmax-type-align=8 flag for clang (GH-13320)

Python 3.8 now respects the x86-64 ABI: memory allocations are
aligned on 16 bytes. The clang flag was only used as a temporary
workaround.

5 years agobpo-33529, email: Fix infinite loop in email header encoding (GH-12020)
Krzysztof Wojcik [Tue, 14 May 2019 16:55:23 +0000 (18:55 +0200)]
bpo-33529, email: Fix infinite loop in email header encoding (GH-12020)

5 years agojson.tool: use stdin and stdout in default cmdlne arguments (GH-11992)
Hervé Beraud [Tue, 14 May 2019 16:52:42 +0000 (18:52 +0200)]
json.tool: use stdin and stdout in default cmdlne arguments (GH-11992)

Argparse can handle default value as stdin and stdout for parameters
as file type (infile, outfile).

5 years agobpo-36916: asyncio: Swallow unhandled write() exception (GH-13313)
Andrew Svetlov [Tue, 14 May 2019 16:09:44 +0000 (19:09 +0300)]
bpo-36916: asyncio: Swallow unhandled write() exception (GH-13313)

5 years agobpo-36900: Replace global conf vars with config (GH-13299)
Victor Stinner [Tue, 14 May 2019 15:34:56 +0000 (17:34 +0200)]
bpo-36900: Replace global conf vars with config (GH-13299)

Replace global configuration variables with core_config read from the
current interpreter.

Cleanup dynload_hpux.c.

5 years agobpo-36915: regrtest always remove tempdir of worker processes (GH-13312)
Victor Stinner [Tue, 14 May 2019 13:49:16 +0000 (15:49 +0200)]
bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)

When using multiprocessing (-jN option), worker processes now create
their temporary directory inside the temporary directory of the
main process. So the main process is able to remove temporary
directories of worker processes even if they crash or when they are
killed by regrtest on KeyboardInterrupt (CTRL+c).

Rework also how multiprocessing arguments are parsed in main.py.

5 years agoChange WriterObj.writeline to WriterObj.write (GH-12344)
Rémi Lapeyre [Tue, 14 May 2019 13:45:14 +0000 (15:45 +0200)]
Change WriterObj.writeline to WriterObj.write (GH-12344)

This cleans the csv module a bit, I don't think it requires a bpo issue or a news entry.

5 years agobpo-32995 - Added context variable in glossary (GH-9741)
Vinodhini Balusamy [Tue, 14 May 2019 12:11:41 +0000 (22:11 +1000)]
bpo-32995 - Added context variable in glossary (GH-9741)

5 years agobpo-36797: Prune more legacy distutils documentation (GH-13092)
Nick Coghlan [Tue, 14 May 2019 12:04:30 +0000 (22:04 +1000)]
bpo-36797: Prune more legacy distutils documentation (GH-13092)

Removes more legacy distutils documentation, and more clearly
marks what is left as potentially outdated, with references to
setuptools as a replacement.

5 years agoDoc: Update pip and setuptools when creating the virtual environment (GH-13307)
Stéphane Wirtel [Tue, 14 May 2019 11:49:49 +0000 (13:49 +0200)]
Doc: Update pip and setuptools when creating the virtual environment (GH-13307)

Add a new pip install before `sphinx` etc.. because we should use the last version of `pip` and `setuptools`

5 years agobpo-36845: validate integer network prefix when constructing IP networks (GH-13298)
Nicolai Moore [Tue, 14 May 2019 10:32:59 +0000 (20:32 +1000)]
bpo-36845: validate integer network prefix when constructing IP networks (GH-13298)

5 years agobpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850)
Inada Naoki [Tue, 14 May 2019 09:51:15 +0000 (18:51 +0900)]
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850)

5 years agobpo-36719: Fix regrtest MultiprocessThread (GH-13301)
Victor Stinner [Tue, 14 May 2019 01:47:32 +0000 (03:47 +0200)]
bpo-36719: Fix regrtest MultiprocessThread (GH-13301)

MultiprocessThread.kill() now closes stdout and stderr to prevent
popen.communicate() to hang.

5 years agoSimplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296)
wim glenn [Tue, 14 May 2019 01:10:14 +0000 (20:10 -0500)]
Simplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296)

5 years agobpo-34424: Handle different policy.linesep lengths correctly. (#8803)
Jens Troeger [Tue, 14 May 2019 01:07:39 +0000 (11:07 +1000)]
bpo-34424: Handle different policy.linesep lengths correctly. (#8803)

5 years agobpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
Anders Hovmöller [Mon, 13 May 2019 19:27:17 +0000 (21:27 +0200)]
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)

* Update timeit.rst

5 years agobpo-36895: Undocument removed time.clock (GH-13286)
Matthias Bussonnier [Mon, 13 May 2019 19:23:07 +0000 (12:23 -0700)]
bpo-36895: Undocument removed time.clock (GH-13286)

5 years agobpo-36867: Create the resource_tracker before launching SharedMemoryManagers (GH...
Pierre Glaser [Mon, 13 May 2019 19:15:32 +0000 (21:15 +0200)]
bpo-36867: Create the resource_tracker before launching SharedMemoryManagers (GH-13276)

5 years agoDocs: Add bz2 usage examples (GH-13258)
Brad [Mon, 13 May 2019 18:09:49 +0000 (14:09 -0400)]
Docs: Add bz2 usage examples (GH-13258)

* Docs: Add bz2 usage examples

- Adds an "Examples of usage" section inspired by the one
  found in the gzip docs
- Corrects the descriptions for ``compresslevel`` and ``data``:
    - ``compresslevel`` must be an `int`, not any number.  For
      instance, passing a float will raise ``TypeError``
    - Notes that `data` must be bytes-like

5 years agobpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on Windows...
Antoine Pitrou [Mon, 13 May 2019 18:02:46 +0000 (20:02 +0200)]
bpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on Windows) (GH-13290)

5 years agobpo-36867: DOC update multiprocessing.rst (GH-13289)
Pierre Glaser [Mon, 13 May 2019 17:20:48 +0000 (19:20 +0200)]
bpo-36867: DOC update multiprocessing.rst (GH-13289)

Followup to bpo-36867.

5 years agobpo-36719: regrtest -jN no longer stops on crash (GH-13231)
Victor Stinner [Mon, 13 May 2019 17:17:54 +0000 (19:17 +0200)]
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)

"python3 -m test -jN ..." now continues the execution of next tests
when a worker process crash (CHILD_ERROR state). Previously, the test
suite stopped immediately. Use --failfast to stop at the first error.

Moreover, --forever now also implies --failfast.

5 years agoFix typo in NEWS item about IDLE (os.flush() should be os.fsync()) (#13284)
Guido van Rossum [Mon, 13 May 2019 16:00:53 +0000 (09:00 -0700)]
Fix typo in NEWS item about IDLE (os.flush() should be os.fsync()) (#13284)

5 years agobpo-36900: import.c uses PyInterpreterState.core_config (GH-13278)
Victor Stinner [Mon, 13 May 2019 15:12:45 +0000 (17:12 +0200)]
bpo-36900: import.c uses PyInterpreterState.core_config (GH-13278)

Move _PyImportZip_Init() to the internal C API and add an 'interp'
parameter.

5 years agobpo-36903: Fix ResourceWarning in test_logging (GH-13283)
Xtreak [Mon, 13 May 2019 14:48:52 +0000 (20:18 +0530)]
bpo-36903: Fix ResourceWarning in test_logging (GH-13283)

5 years agobpo-36728: Remove PyEval_ReInitThreads documentation (GH-13282)
Victor Stinner [Mon, 13 May 2019 14:22:51 +0000 (16:22 +0200)]
bpo-36728: Remove PyEval_ReInitThreads documentation (GH-13282)

5 years agobpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3)...
divyag9 [Mon, 13 May 2019 13:05:20 +0000 (08:05 -0500)]
bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3) (GH-13120)

https://bugs.python.org/issue34682

5 years agobpo-36807: When saving a file in IDLE, call flush and fsync (#13102)
Guido van Rossum [Mon, 13 May 2019 12:31:30 +0000 (05:31 -0700)]
bpo-36807: When saving a file in IDLE, call flush and fsync (#13102)

5 years agobpo-36008: Doc update for 3.8 migration (GH-12887)
Utkarsh Gupta [Mon, 13 May 2019 12:29:39 +0000 (12:29 +0000)]
bpo-36008: Doc update for 3.8 migration (GH-12887)

5 years agoChanges to the documentation of normcase (GH-4725)
Kexuan Sun [Mon, 13 May 2019 11:38:20 +0000 (04:38 -0700)]
Changes to the documentation of normcase (GH-4725)

5 years agobpo-36728: Remove PyEval_ReInitThreads() from C API (GH-13241)
Victor Stinner [Mon, 13 May 2019 10:35:37 +0000 (12:35 +0200)]
bpo-36728: Remove PyEval_ReInitThreads() from C API (GH-13241)

Remove the PyEval_ReInitThreads() function from the Python C API.
It should not be called explicitly: use PyOS_AfterFork_Child()
instead.

Rename PyEval_ReInitThreads() to _PyEval_ReInitThreads() and add a
'runtime' parameter.

5 years agobpo-36778: Update cp65001 codec documentation (GH-13240)
Victor Stinner [Mon, 13 May 2019 08:42:31 +0000 (10:42 +0200)]
bpo-36778: Update cp65001 codec documentation (GH-13240)

Remove cp65001 from the codecs table, list it as an alias of utf_8
and add a versionchanged markup.

5 years agobpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022)
Zackery Spytz [Mon, 13 May 2019 07:50:52 +0000 (01:50 -0600)]
bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022)

Co-Authored-By: Filip Gruszczyński <gruszczy@gmail.com>
Co-Authored-By: Michele Orrù <maker@tumbolandia.net>
5 years agobpo-36783: Add new references for C API Documentation changes (GH-13204)
Edison A [Mon, 13 May 2019 07:23:38 +0000 (00:23 -0700)]
bpo-36783: Add new references for C API Documentation changes (GH-13204)

5 years agoName individual Travis CI jobs (GH-13268)
Gordon P. Hemsley [Mon, 13 May 2019 04:18:20 +0000 (00:18 -0400)]
Name individual Travis CI jobs (GH-13268)

5 years agoCorrect misspelling (GH-11470)
Johnny Gérard [Mon, 13 May 2019 03:39:32 +0000 (05:39 +0200)]
Correct misspelling (GH-11470)

5 years agobpo-36895: remove time.clock() as per removal notice. (GH-13270)
Matthias Bussonnier [Mon, 13 May 2019 01:34:44 +0000 (18:34 -0700)]
bpo-36895: remove time.clock() as per removal notice. (GH-13270)

`time.clock()` was deprecated in 3.3, and marked for removal removal in
3.8; this thus remove it from the time module.

5 years agobpo-36886: Document changes in code object in What's new section (GH-13255)
Pablo Galindo [Sun, 12 May 2019 21:45:52 +0000 (22:45 +0100)]
bpo-36886: Document changes in code object in What's new section (GH-13255)

5 years agobpo-36084: Add native thread ID to threading.Thread objects (GH-11993)
Jake Tesler [Sun, 12 May 2019 17:08:24 +0000 (10:08 -0700)]
bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)

5 years agobpo-36684: Split out gcc and test coverage builds (GH-13146)
Gordon P. Hemsley [Sun, 12 May 2019 03:33:35 +0000 (23:33 -0400)]
bpo-36684: Split out gcc and test coverage builds (GH-13146)

The combined Python and C coverage test runs now exceed Travis's
50-minute time limit. Splitting them into separate runs gives more
leeway.

Also, adding branch coverage to Python testing and ensure that
coverage is reported even if tests fail. (The primary builds are
for tracking test failures.)

5 years agobpo-36817: Do not decrement reference for expr_text on fstring = parsing failure...
Pablo Galindo [Sun, 12 May 2019 00:43:04 +0000 (01:43 +0100)]
bpo-36817: Do not decrement reference for expr_text on fstring = parsing failure (GH-13256)

5 years agobpo-36817: Fix reference leak for expr_text in f-string = parsing (GH-13249)
Pablo Galindo [Sat, 11 May 2019 19:54:37 +0000 (20:54 +0100)]
bpo-36817: Fix reference leak for expr_text in f-string = parsing (GH-13249)

5 years agobpo-36822: Fix minor grammatical error in glossary.rst (GH-13145)
Sanyam Khurana [Sat, 11 May 2019 19:04:10 +0000 (15:04 -0400)]
bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145)

5 years agobpo-36878: Allow extra text after `# type: ignore` comments (GH-13238)
Michael J. Sullivan [Sat, 11 May 2019 18:17:24 +0000 (11:17 -0700)]
bpo-36878: Allow extra text after `# type: ignore` comments (GH-13238)

In the parser, when using the type_comments=True option, recognize
a TYPE_IGNORE as anything containing `# type: ignore` followed by
a non-alphanumeric character. This is to allow ignores such as
`# type: ignore[E1000]`.

5 years agobpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205)
Xi Ruoyao [Sat, 11 May 2019 17:13:23 +0000 (01:13 +0800)]
bpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205)

5 years agobpo-36884: Fix DeprecationWarning in test_asyncio StreamReader instantiation (GH...
Xtreak [Sat, 11 May 2019 08:45:17 +0000 (14:15 +0530)]
bpo-36884: Fix DeprecationWarning in test_asyncio StreamReader instantiation (GH-13243)

https://bugs.python.org/issue36884

5 years agoHide module name from local (anchor) links in shutil docs (GH-6695)
Aurelio Jargas [Sat, 11 May 2019 02:51:45 +0000 (04:51 +0200)]
Hide module name from local (anchor) links in shutil docs (GH-6695)

5 years agobpo-21536: Update What's New in Python 3.8 entry (GH-13242)
Victor Stinner [Sat, 11 May 2019 02:10:03 +0000 (04:10 +0200)]
bpo-21536: Update What's New in Python 3.8 entry (GH-13242)

Android still links to libpython.

5 years agoFix sphinx deprecation warning about env.note_versionchange() (GH-13236)
Pablo Galindo [Fri, 10 May 2019 21:58:17 +0000 (22:58 +0100)]
Fix sphinx deprecation warning about env.note_versionchange() (GH-13236)

5 years agobpo-36710: Add 'ceval' local variable to ceval.c (GH-12934)
Victor Stinner [Fri, 10 May 2019 21:39:09 +0000 (23:39 +0200)]
bpo-36710: Add 'ceval' local variable to ceval.c (GH-12934)

Add "struct _ceval_runtime_state *ceval = &_PyRuntime.ceval;" local
variables to function to better highlight the dependency on the
global variable _PyRuntime and to point directly to _PyRuntime.ceval
field rather than on the larger _PyRuntime.

Changes:

* Add _PyRuntimeState_GetThreadState(runtime) macro.
* Add _PyEval_AddPendingCall(ceval, ...) and
  _PyThreadState_Swap(gilstate, ...) functions.
* _PyThreadState_GET() macro now calls
  _PyRuntimeState_GetThreadState() using &_PyRuntime.
* Add 'ceval' parameter to COMPUTE_EVAL_BREAKER(),
  SIGNAL_PENDING_SIGNALS(), _PyEval_SignalAsyncExc(),
  _PyEval_SignalReceived() and _PyEval_FiniThreads() macros and
  functions.
* Add 'tstate' parameter to call_function(), do_call_core() and
  do_raise().
* Add 'runtime' parameter to _Py_CURRENTLY_FINALIZING(),
  _Py_FinishPendingCalls() and _PyThreadState_DeleteExcept()
  macros and functions.
* Declare 'runtime', 'tstate', 'ceval' and 'eval_breaker' variables
  as constant.

5 years agobpo-36867: Make semaphore_tracker track other system resources (GH-13222)
Pierre Glaser [Fri, 10 May 2019 20:59:08 +0000 (22:59 +0200)]
bpo-36867: Make semaphore_tracker track other system resources (GH-13222)

The multiprocessing.resource_tracker replaces the multiprocessing.semaphore_tracker module. Other than semaphores, resource_tracker also tracks shared_memory segments. Patch by Pierre Glaser.

5 years agobpo-36368: Ignore SIGINT in SharedMemoryManager servers. (GH-12483)
Pierre Glaser [Fri, 10 May 2019 18:42:35 +0000 (20:42 +0200)]
bpo-36368: Ignore SIGINT in SharedMemoryManager servers. (GH-12483)

Fix a bug crashing SharedMemoryManager instances in interactive sessions after
a Ctrl-C (KeyboardInterrupt) was sent.

5 years agobpo-36737: Use the module state C-API for warnings. (gh-13159)
Eric Snow [Fri, 10 May 2019 17:29:55 +0000 (13:29 -0400)]
bpo-36737: Use the module state C-API for warnings. (gh-13159)

5 years agobpo-35983: skip trashcan for subclasses (GH-11841)
Jeroen Demeyer [Fri, 10 May 2019 17:21:11 +0000 (19:21 +0200)]
bpo-35983: skip trashcan for subclasses (GH-11841)

Add new trashcan macros to deal with a double deallocation that could occur when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base class and that base class uses the trashcan mechanism.

Patch by Jeroen Demeyer.

5 years agobpo-36869: fix warning of unused variables (GH-13182)
Emmanuel Arias [Fri, 10 May 2019 10:08:08 +0000 (07:08 -0300)]
bpo-36869: fix warning of unused variables (GH-13182)

5 years agobpo-33071: remove outdated PyPI docs (GH-13087)
Kojo Idrissa [Fri, 10 May 2019 08:45:09 +0000 (03:45 -0500)]
bpo-33071: remove outdated PyPI docs (GH-13087)

Patch by Kojo Idrissa.

5 years agobpo-36676: Update what's new document. (#13226)
Stefan Behnel [Fri, 10 May 2019 08:25:13 +0000 (10:25 +0200)]
bpo-36676: Update what's new document. (#13226)

5 years agobpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files....
Olexa Bilaniuk [Fri, 10 May 2019 03:22:06 +0000 (22:22 -0500)]
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212)

Extended attributes can only be set on user-writeable files, but shutil previously
first chmod()ed the destination file to the source's permissions and then tried to
copy xattrs. This will cause failures if attempting to copy read-only files with
xattrs, as occurs with Git clones on Lustre FS.

5 years agobpo-36814: ensure os.posix_spawn() handles None (GH-13144)
Anthony Shaw [Fri, 10 May 2019 02:00:06 +0000 (12:00 +1000)]
bpo-36814: ensure os.posix_spawn() handles None (GH-13144)

Fix an issue where os.posix_spawn() would incorrectly raise a TypeError
when file_actions is None.

5 years agobpo-27497: Add return value to csv.DictWriter.writeheader (GH-12306)
Rémi Lapeyre [Fri, 10 May 2019 01:50:11 +0000 (03:50 +0200)]
bpo-27497: Add return value to csv.DictWriter.writeheader (GH-12306)

csv.DictWriter.writeheader() now returns the return value of the
underlying csv.Writer.writerow() method.

Patch contributed by Ashish Nitin Patil.

5 years agobpo-36601: clarify signal handler comment and remove unnecessary pid check. (GH-12784)
Jeroen Demeyer [Fri, 10 May 2019 01:28:57 +0000 (03:28 +0200)]
bpo-36601: clarify signal handler comment and remove unnecessary pid check. (GH-12784)

https://bugs.python.org/issue36601

5 years agobpo-36778: cp65001 encoding becomes an alias to utf_8 (GH-13230)
Victor Stinner [Fri, 10 May 2019 01:19:54 +0000 (03:19 +0200)]
bpo-36778: cp65001 encoding becomes an alias to utf_8 (GH-13230)

5 years agobpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154)
Julien Palard [Thu, 9 May 2019 19:52:32 +0000 (21:52 +0200)]
bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154)

Having multiple paragraphs in a few news entry lead to inconsistent
spacing while rendered in HTML by mixing "visually compact lists"
(when no entry of the whole list contains multiple paragraphs) and
"sparse lists" (when at least one do).

5 years agobpo-36802: Drop awrite()/aclose(), support await write() and await close() instead...
Andrew Svetlov [Thu, 9 May 2019 19:14:58 +0000 (15:14 -0400)]
bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (#13099)

5 years agodoc: fix broken link on howto/unicode page (#13160)
redshiftzero [Thu, 9 May 2019 19:13:40 +0000 (15:13 -0400)]
doc: fix broken link on howto/unicode page (#13160)

Thank you @redshiftzero on the first PR :clap:

5 years agoFix a possible crash due to PyType_FromSpecWithBases() (GH-10304)
Zackery Spytz [Thu, 9 May 2019 18:33:32 +0000 (12:33 -0600)]
Fix a possible crash due to PyType_FromSpecWithBases() (GH-10304)

If the PyObject_MALLOC() call failed in PyType_FromSpecWithBases(),
PyObject_Free() would be called on a static string in type_dealloc().

5 years agobpo-30262: Don't expose private objects in sqlite3 (GH-1440)
Aviv Palivoda [Thu, 9 May 2019 18:05:45 +0000 (21:05 +0300)]
bpo-30262: Don't expose private objects in sqlite3 (GH-1440)

The Cache and Statement objects are undocumented and implementation
details of the sqlite3 module.

They aren't usable from pure Python code.

5 years agobpo-36851: Clean the frame stack if the execution ends with a return and the stack...
Pablo Galindo [Thu, 9 May 2019 15:52:02 +0000 (16:52 +0100)]
bpo-36851: Clean the frame stack if the execution ends with a return and the stack is not empty (GH-13191)

5 years agoAdd support for .parent and .joinpath in zipfile.Path (#13213)
Jason R. Coombs [Thu, 9 May 2019 15:34:36 +0000 (11:34 -0400)]
Add support for .parent and .joinpath in zipfile.Path (#13213)

5 years agobpo-36239: Skip comments in gettext infos (GH-12255)
Julien Palard [Thu, 9 May 2019 14:22:15 +0000 (16:22 +0200)]
bpo-36239: Skip comments in gettext infos (GH-12255)

5 years agobpo-36831: Do not apply default namespace to unprefixed attributes in ElementPath...
Stefan Behnel [Thu, 9 May 2019 05:22:47 +0000 (07:22 +0200)]
bpo-36831: Do not apply default namespace to unprefixed attributes in ElementPath. (#13201)

Also provide better grouping of the tokenizer tests.

5 years agocloses bpo-36861: Update Unicode database to 12.1.0. (GH-13214)
Benjamin Peterson [Thu, 9 May 2019 03:59:35 +0000 (20:59 -0700)]
closes bpo-36861: Update Unicode database to 12.1.0. (GH-13214)

Adds ㋿.

5 years agobpo-35900: Enable custom reduction callback registration in _pickle (GH-12499)
Pierre Glaser [Wed, 8 May 2019 21:08:25 +0000 (23:08 +0200)]
bpo-35900: Enable custom reduction callback registration in _pickle (GH-12499)

Enable custom reduction callback registration for functions and classes in
_pickle.c, using the new Pickler's attribute ``reducer_override``.

5 years agobpo-36817: Add f-string debugging using '='. (GH-13123)
Eric V. Smith [Wed, 8 May 2019 20:28:48 +0000 (16:28 -0400)]
bpo-36817: Add f-string debugging using '='. (GH-13123)

If a "=" is specified a the end of an f-string expression, the f-string will evaluate to the text of the expression, followed by '=', followed by the repr of the value of the expression.

5 years agobpo-35900: Add a state_setter arg to save_reduce (GH-12588)
Pierre Glaser [Wed, 8 May 2019 19:40:25 +0000 (21:40 +0200)]
bpo-35900: Add a state_setter arg to save_reduce (GH-12588)

Allow reduction methods to return a 6-item tuple where the 6th item specifies a
custom state-setting method that's called instead of the regular
``__setstate__`` method.

5 years agobpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows (GH-13132)
Brian Quinlan [Wed, 8 May 2019 18:04:53 +0000 (14:04 -0400)]
bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows (GH-13132)

Co-Authored-By: brianquinlan <brian@sweetapp.com>
5 years agobpo-24758: Improve the error msg for unittest.mock.Mock()'s unsafe mode (#12991)
Zackery Spytz [Wed, 8 May 2019 17:32:24 +0000 (11:32 -0600)]
bpo-24758: Improve the error msg for unittest.mock.Mock()'s unsafe mode (#12991)

* bpo-24758: Improve the error msg for unittest.mock.Mock()'s unsafe mode

* Make the requested changes.

5 years agobpo-36816: Update the self-signed.pythontest.net cert (GH-13192)
Gregory P. Smith [Wed, 8 May 2019 16:35:10 +0000 (11:35 -0500)]
bpo-36816: Update the self-signed.pythontest.net cert (GH-13192)

We updated the server, our testsuite must match.

https://bugs.python.org/issue36816

✈️ CLE -> DEN ✈️ #pycon2019

5 years agobpo-24048: Save the live exception during import.c's remove_module() (GH-13005)
Zackery Spytz [Wed, 8 May 2019 16:31:23 +0000 (10:31 -0600)]
bpo-24048: Save the live exception during import.c's remove_module() (GH-13005)

Save the live exception during the course of remove_module().

5 years agobpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)
toonarmycaptain [Wed, 8 May 2019 16:02:34 +0000 (11:02 -0500)]
bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)

Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized.
Changed multiple instances.

5 years agoDoc: Be explicit that Pathlib resolve was strict before 3.6. (GH-11316)
Julien Palard [Wed, 8 May 2019 15:01:11 +0000 (17:01 +0200)]
Doc: Be explicit that Pathlib resolve was strict before 3.6. (GH-11316)

5 years agobpo-36832: add zipfile.Path (#13153)
Jason R. Coombs [Wed, 8 May 2019 13:45:06 +0000 (09:45 -0400)]
bpo-36832: add zipfile.Path (#13153)

* bpo-36832: add zipfile.Path

* bpo-36832: add documentation for zipfile.Path

* 📜🤖 Added by blurb_it.

* Remove module reference from blurb.

* Sort the imports

* Update docstrings and docs per recommendations.

* Rely on test.support.temp_dir

* Signal that 'root' is the parameter.

* Correct spelling of 'mod'

* Convert docstring to comment for brevity.

* Fix more errors in the docs

5 years agoDoc: Fix missing bracket (GH-13163)
Zhaorong Ma [Wed, 8 May 2019 13:44:01 +0000 (09:44 -0400)]
Doc: Fix missing bracket (GH-13163)

5 years agobpo-27639: Correct return type for UserList slicing operation (#13169)
Michael Blahay [Tue, 7 May 2019 21:41:06 +0000 (17:41 -0400)]
bpo-27639: Correct return type for UserList slicing operation (#13169)

* BPO-27639: Correct return type for UserList slicing operation

Added logic to __getitem__ magic method for UserList to ensure that the return
type matches that of self.

5 years agobpo-36015: Handle StreamHandler representaton of stream with an integer name (GH...
Riccardo Magliocchetti [Tue, 7 May 2019 21:36:39 +0000 (23:36 +0200)]
bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908)

5 years agobpo-36838: Suggest 'make venv' when missing Doc/ tools. (GH-13173)
Gregory P. Smith [Tue, 7 May 2019 21:03:50 +0000 (17:03 -0400)]
bpo-36838: Suggest 'make venv' when missing Doc/ tools. (GH-13173)

5 years agobpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)
Andrew Svetlov [Tue, 7 May 2019 20:53:19 +0000 (16:53 -0400)]
bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)

https://bugs.python.org/issue36801

5 years agoAdd a footnote about Cheese Shop in Doc/tutorial (GH-13103)
Adorilson Bezerra [Tue, 7 May 2019 20:20:58 +0000 (17:20 -0300)]
Add a footnote about Cheese Shop in Doc/tutorial (GH-13103)

5 years agobpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)
Romain Picard [Tue, 7 May 2019 18:58:24 +0000 (20:58 +0200)]
bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)

When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregisters the callback from the inner future when the outer
future is cancelled.

https://bugs.python.org/issue35125

5 years agoDon't import wait from connection, it shadows a name (GH-13112)
Brian Quinlan [Tue, 7 May 2019 17:31:11 +0000 (13:31 -0400)]
Don't import wait from connection, it shadows a name (GH-13112)

(lint cleanup) This import causes an argument parameter to shadow the global import name.

5 years agobpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)
Vincent Michel [Tue, 7 May 2019 17:18:49 +0000 (19:18 +0200)]
bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)

*Moved from python/asyncio#493.*

This PR fixes issue python/asyncio#480, as explained in [this comment](https://github.com/python/asyncio/issues/480#issuecomment-278703828).

The `_SelectorDatagramTransport.sendto` method has to be modified ~~so `_sock.sendto` is used in all cases (because it is tricky to reliably tell if the socket is connected or not). Could that be an issue for connected sockets?~~ *EDIT* ... so `_sock.send` is used only if `_sock` is connected.

It also protects `socket.getsockname` against `OSError` in `_SelectorTransport`. This might happen on Windows if the socket is not connected (e.g. for UDP broadcasting).

https://bugs.python.org/issue31922

5 years agobpo-11001: updated cookie docs (GH-13086)
Julia Iliuk [Tue, 7 May 2019 17:05:20 +0000 (10:05 -0700)]
bpo-11001: updated cookie docs (GH-13086)

Used **spookylukey**'s patch from 2011-01-24

https://bugs.python.org/issue11001

5 years agobpo-36533: Reinit logging.Handler locks on fork(). (GH-12704)
Gregory P. Smith [Tue, 7 May 2019 16:18:20 +0000 (12:18 -0400)]
bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704)

Instead of attempting to acquire and release them all across fork
which was leading to deadlocks in some applications that had chained
their own handlers while holding multiple locks.

5 years agobpo-28795: Signal documentation: Fix misleading statement. (GH-13121)
Julien Palard [Tue, 7 May 2019 15:27:48 +0000 (17:27 +0200)]
bpo-28795: Signal documentation: Fix misleading statement. (GH-13121)

5 years agobpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDate...
Edison A [Tue, 7 May 2019 15:00:21 +0000 (08:00 -0700)]
bpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold (GH-13147)

5 years agoPost v3.8.0a4
Łukasz Langa [Tue, 7 May 2019 14:56:31 +0000 (16:56 +0200)]
Post v3.8.0a4

5 years agoMerge tag 'v3.8.0a4'
Łukasz Langa [Tue, 7 May 2019 14:56:06 +0000 (16:56 +0200)]
Merge tag 'v3.8.0a4'

Python 3.8.0a4

5 years agobpo-31855: unittest.mock.mock_open() results now respects the argument of read([size...
Rémi Lapeyre [Tue, 7 May 2019 10:48:36 +0000 (12:48 +0200)]
bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521)

unittest.mock.mock_open() results now respects the argument of read([size])

Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
5 years agoForbid creating of stream objects outside of asyncio (#13101)
Andrew Svetlov [Tue, 7 May 2019 02:52:11 +0000 (22:52 -0400)]
Forbid creating of stream objects outside of asyncio (#13101)