]> granicus.if.org Git - python/log
python
6 years agobpo-36503: remove references to 'aix3' and 'aix4' (GH-12658)
Michael Felt [Mon, 8 Apr 2019 00:51:33 +0000 (02:51 +0200)]
bpo-36503: remove references to 'aix3' and 'aix4' (GH-12658)

6 years agobpo-27181: Add statistics.geometric_mean() (GH-12638)
Raymond Hettinger [Sun, 7 Apr 2019 16:20:03 +0000 (09:20 -0700)]
bpo-27181: Add statistics.geometric_mean() (GH-12638)

6 years agobpo-35936: Updates to modulefinder (GH-11787)
Brandt Bucher [Sun, 7 Apr 2019 08:00:41 +0000 (01:00 -0700)]
bpo-35936: Updates to modulefinder (GH-11787)

* Properly handle SyntaxErrors in Python source files.

SyntaxErrors in the target module will rise normally, while SyntaxErrors in dependencies will be added to badmodules. This includes a new regression test.

* Fix name collision bug.

This fixes an issue where a "fromlist" import with the same name as a previously failed import would be incorrectly added to badmodules. This includes a new regression test.

* Replace mutable default values.

Bound empty lists have been replaced with the "if param is None" idiom.

* Replace deprecated imp usage.

Constants imported from imp have been moved to private module-level constants, and ModuleFinder.find_module has been refactored to use importlib. Other than an improvement on how frozen builtin imports are reported (as the frozen imports they are, rather than the stdlib modules they *may* have originated from), these changes maintain complete compatibility with past versions... including odd behavior for returning relative (below current directory, but not a C extension) vs. absolute (above current directory, or a C extension) paths.

Patch by Brandt Bucher.

6 years agobpo-35726: Add test for QueueHandler with multiple handlers (GH-11659)
Xtreak [Sun, 7 Apr 2019 07:51:27 +0000 (13:21 +0530)]
bpo-35726: Add test for QueueHandler with multiple handlers (GH-11659)

6 years agobpo-30661: Improve docs for tarfile pax change and effect on shutil (GH-12635)
CAM Gerlach [Sun, 7 Apr 2019 04:47:49 +0000 (23:47 -0500)]
bpo-30661: Improve docs for tarfile pax change and effect on shutil (GH-12635)

The shutil archive creation helpers use the default tarfile format,
so that API is also switching to use `pax` by default.

6 years agobpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)
Stefan Behnel [Sat, 6 Apr 2019 16:57:43 +0000 (18:57 +0200)]
bpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)

Remove names from the "unimplemented interfaces" list
in the minidom docs that are actually implemented.

6 years agobpo-36050: optimize HTTPResponse.read() (GH-12698)
Inada Naoki [Sat, 6 Apr 2019 09:06:19 +0000 (18:06 +0900)]
bpo-36050: optimize HTTPResponse.read() (GH-12698)

* No need to chunking for now.
* No need to partial read caused by EINTR for now.

6 years agobpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)
Dmitry Marakasov [Sat, 6 Apr 2019 09:04:47 +0000 (12:04 +0300)]
bpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)

6 years agoFix doc for create_subprocess_exec (GH-12598)
Dima Tisnek [Fri, 5 Apr 2019 14:02:28 +0000 (23:02 +0900)]
Fix doc for create_subprocess_exec (GH-12598)

Add missing `program` argument to asyncio.create_subprocess_exec documentation.

6 years agobpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)
Zackery Spytz [Fri, 5 Apr 2019 10:17:13 +0000 (04:17 -0600)]
bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)

6 years agobpo-29202: improve dict iteration (GH-11900)
Cheryl Sabella [Fri, 5 Apr 2019 10:08:43 +0000 (06:08 -0400)]
bpo-29202: improve dict iteration (GH-11900)

Use fewer iterations instead of iterating over the whole entry table.

6 years agobpo-36301: Fix _PyPreConfig_Read() compiler warning (GH-12695)
Victor Stinner [Fri, 5 Apr 2019 09:44:04 +0000 (11:44 +0200)]
bpo-36301: Fix _PyPreConfig_Read() compiler warning (GH-12695)

Initialize init_utf8_mode earlier to fix a compiler warning.

6 years agobpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)
Inada Naoki [Fri, 5 Apr 2019 08:54:24 +0000 (17:54 +0900)]
bpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)

6 years agoTools/importbench: Fix a misplaced stderr= (GH-12690)
Anthony Sottile [Fri, 5 Apr 2019 07:18:19 +0000 (00:18 -0700)]
Tools/importbench: Fix a misplaced stderr= (GH-12690)

6 years agoFix duplicated test case for re. (GH-12662)
MakDon [Thu, 4 Apr 2019 10:38:42 +0000 (18:38 +0800)]
Fix duplicated test case for re. (GH-12662)

6 years agobpo-36522: Print all values for headers with multiple values. (GH-12681)
Matt Houglum [Thu, 4 Apr 2019 04:36:47 +0000 (21:36 -0700)]
bpo-36522: Print all values for headers with multiple values. (GH-12681)

6 years agobpo-36440: include node names in ParserError messages, instead of numeric IDs (GH...
tyomitch [Wed, 3 Apr 2019 05:12:07 +0000 (08:12 +0300)]
bpo-36440: include node names in ParserError messages, instead of numeric IDs (GH-12565)

The error messages in the parser module are referring to numeric IDs for the nodes. To improve readability, use the node names when reporting errors.

6 years agoHave UserDict.__init__() implicitly check for updating w/ bool(kwargs) instead of...
Slam [Tue, 2 Apr 2019 21:47:41 +0000 (00:47 +0300)]
Have UserDict.__init__() implicitly check for updating w/ bool(kwargs) instead of len() (GH-12139)

Semantically the same, but more idiomatic by checking against `kwargs` instead of `len(kwargs)`.

6 years agobpo-32413: Add documentation that at the module level, locals(), globals() are the...
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Tue, 2 Apr 2019 17:58:50 +0000 (23:28 +0530)]
bpo-32413: Add documentation that at the module level, locals(), globals() are the  same dictionary (GH-5004)

https://bugs.python.org/issue32413

6 years agobpo-33261: guard access to __code__ attribute in inspect (GH-6448)
Jeroen Demeyer [Tue, 2 Apr 2019 14:03:42 +0000 (16:03 +0200)]
bpo-33261: guard access to __code__ attribute in inspect (GH-6448)

6 years agobpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660)
Zackery Spytz [Tue, 2 Apr 2019 10:47:51 +0000 (04:47 -0600)]
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660)

6 years agobpo-36473: add maximum iteration check for dict .values() and .items() (GH-12619)
Thomas Perl [Tue, 2 Apr 2019 09:30:10 +0000 (11:30 +0200)]
bpo-36473: add maximum iteration check for dict .values() and .items() (GH-12619)

6 years agobpo-35838: document optionxform must be idempotent (GH-12656)
Inada Naoki [Tue, 2 Apr 2019 09:08:46 +0000 (18:08 +0900)]
bpo-35838: document optionxform must be idempotent (GH-12656)

6 years agofix confusing argument name in unicodeobject.c (GH-12653)
Max Bernstein [Tue, 2 Apr 2019 08:16:22 +0000 (01:16 -0700)]
fix confusing argument name in unicodeobject.c (GH-12653)

6 years agobpo-36377: Specify that range() can not be compared (GH-12468)
Emmanuel Arias [Tue, 2 Apr 2019 04:52:42 +0000 (01:52 -0300)]
bpo-36377: Specify that range() can not be compared (GH-12468)

6 years agobpo-13120: fix typo with test_issue13120() method name (GH-12250)
Daniel Hahler [Mon, 1 Apr 2019 21:59:50 +0000 (23:59 +0200)]
bpo-13120: fix typo with test_issue13120() method name (GH-12250)

Incorrect issue number '13210' added in 539ee5da6f.

https://bugs.python.org/issue13120

6 years agoTemporary workaround for an ACL issue on Ubuntu on Azure Pipelines (GH-12649)
Steve Dower [Mon, 1 Apr 2019 16:10:20 +0000 (09:10 -0700)]
Temporary workaround for an ACL issue on Ubuntu on Azure Pipelines (GH-12649)

6 years agobpo-36157:Document PyInterpreterState_Main() (GH-12238)
Joannah Nanjekye [Mon, 1 Apr 2019 15:08:43 +0000 (18:08 +0300)]
bpo-36157:Document PyInterpreterState_Main() (GH-12238)

I have added documentation for `PyInterpreterState_Main()`.
 I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` .

https://bugs.python.org/issue36157

6 years agobpo-36495: Fix two out-of-bounds array reads (GH-12641)
Brad Larsen [Mon, 1 Apr 2019 14:36:05 +0000 (10:36 -0400)]
bpo-36495: Fix two out-of-bounds array reads (GH-12641)

Research and fix by @bradlarsen.

6 years agobpo-20844: open script file with "rb" mode (GH-12616)
Inada Naoki [Mon, 1 Apr 2019 09:35:20 +0000 (18:35 +0900)]
bpo-20844: open script file with "rb" mode (GH-12616)

6 years agobpo-36026: make descr error message consistent (GH-11930)
Inada Naoki [Mon, 1 Apr 2019 08:56:11 +0000 (17:56 +0900)]
bpo-36026: make descr error message consistent (GH-11930)

set.add(0) and set.add.__get__(0) now raise TypeError
with same error message.

6 years agobpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)
Serhiy Storchaka [Mon, 1 Apr 2019 06:16:35 +0000 (09:16 +0300)]
bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)

Deprecated passing the following arguments as keyword arguments:

- "func" in functools.partialmethod(), weakref.finalize(),
  profile.Profile.runcall(), cProfile.Profile.runcall(),
  bdb.Bdb.runcall(), trace.Trace.runfunc() and
  curses.wrapper().
- "function" in unittest.addModuleCleanup() and
  unittest.TestCase.addCleanup().
- "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor
  and concurrent.futures.ProcessPoolExecutor.
- "callback" in contextlib.ExitStack.callback(),
  contextlib.AsyncExitStack.callback() and
  contextlib.AsyncExitStack.push_async_callback().
- "c" and "typeid" in the create() method of multiprocessing.managers.Server
  and multiprocessing.managers.SharedMemoryServer.
- "obj" in weakref.finalize().

Also allowed to pass arbitrary keyword arguments (even "self" and "func")
if the above arguments are passed as positional argument.

6 years agobpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). ...
Zackery Spytz [Sun, 31 Mar 2019 16:02:11 +0000 (10:02 -0600)]
bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106)

6 years agobpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH...
Zackery Spytz [Sun, 31 Mar 2019 16:00:12 +0000 (10:00 -0600)]
bpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH-12629)

6 years agobpo-36085: Add installer check for KB2533625 (GH-12636)
Steve Dower [Sun, 31 Mar 2019 03:58:17 +0000 (20:58 -0700)]
bpo-36085: Add installer check for KB2533625 (GH-12636)

6 years agobpo-36085: Add additional load flag to ensure DLL loads successfully (GH-12633)
Steve Dower [Sun, 31 Mar 2019 00:14:46 +0000 (17:14 -0700)]
bpo-36085: Add additional load flag to ensure DLL loads successfully (GH-12633)

6 years agobpo-36010: Add venv to the nuget distribution (GH-12367)
Paul Moore [Sat, 30 Mar 2019 16:32:05 +0000 (16:32 +0000)]
bpo-36010: Add venv to the nuget distribution (GH-12367)

6 years agobpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)
Joel Croteau [Sat, 30 Mar 2019 14:53:48 +0000 (07:53 -0700)]
bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)

Stop rejecting IPv4 octets with leading zeroes as ambiguously octal.

Plenty of other tools generate decimal IPv4 octets with leading zeroes,
so keeping this check hurts interoperability.

Patch by Joel Croteau.

6 years agoC API docs: Py_IsInitialized is always safe to call (GH-12630)
Nick Coghlan [Sat, 30 Mar 2019 11:24:05 +0000 (21:24 +1000)]
C API docs: Py_IsInitialized is always safe to call (GH-12630)

6 years agobpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927)
Serhiy Storchaka [Sat, 30 Mar 2019 06:33:02 +0000 (08:33 +0200)]
bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927)

6 years agobpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926)
Serhiy Storchaka [Sat, 30 Mar 2019 06:32:18 +0000 (08:32 +0200)]
bpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926)

6 years agobpo-36434: Properly handle writing errors in ZIP files. (GH-12559)
Serhiy Storchaka [Sat, 30 Mar 2019 06:25:19 +0000 (08:25 +0200)]
bpo-36434: Properly handle writing errors in ZIP files. (GH-12559)

Errors during writing no longer prevent to properly close
the ZIP file.

6 years agobpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603)
Serhiy Storchaka [Sat, 30 Mar 2019 06:23:38 +0000 (08:23 +0200)]
bpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603)

The bug occurred when the encoded surrogate character is passed
to the incremental decoder in two chunks.

6 years agobpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)
Inada Naoki [Sat, 30 Mar 2019 05:32:08 +0000 (14:32 +0900)]
bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)

6 years agogithub: assign @methane to dict owner (GH-12617)
Inada Naoki [Sat, 30 Mar 2019 02:08:17 +0000 (11:08 +0900)]
github: assign @methane to dict owner (GH-12617)

6 years agobpo-36085: Enable better DLL resolution on Windows (GH-12302)
Steve Dower [Fri, 29 Mar 2019 23:37:16 +0000 (16:37 -0700)]
bpo-36085: Enable better DLL resolution on Windows (GH-12302)

6 years agobpo-35947: Update Windows to the current version of libffi (GH-11797)
Paul Monson [Fri, 29 Mar 2019 23:30:10 +0000 (16:30 -0700)]
bpo-35947: Update Windows to the current version of libffi (GH-11797)

We now use a pre-built libffi binary from our binaries repository, and no longer vendor the full implementation.

6 years agobpo-36448: mention 'make regen-all' in error message (GH-12585)
Jeroen Demeyer [Fri, 29 Mar 2019 18:37:22 +0000 (19:37 +0100)]
bpo-36448: mention 'make regen-all' in error message (GH-12585)

6 years agobpo-36471: Add _Py_RunMain() (GH-12618)
Victor Stinner [Fri, 29 Mar 2019 14:13:46 +0000 (15:13 +0100)]
bpo-36471: Add _Py_RunMain() (GH-12618)

* Add config_read_cmdline() subfunction. Remove _PyCmdline structure.
* _PyCoreConfig_Read() now also parses config->argv command line
  arguments

6 years agobpo-35194: cjkcodec: check the encoded value is not truncated (GH-10432)
Alexey Izbyshev [Fri, 29 Mar 2019 07:48:47 +0000 (10:48 +0300)]
bpo-35194: cjkcodec: check the encoded value is not truncated (GH-10432)

6 years agobpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990)
Julien Palard [Fri, 29 Mar 2019 02:15:34 +0000 (03:15 +0100)]
bpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990)

6 years agobpo-33043: Add a Contributing to Docs link and Update the Found a Bug Page (#12006)
Susan Su [Fri, 29 Mar 2019 01:55:24 +0000 (18:55 -0700)]
bpo-33043: Add a Contributing to Docs link and Update the Found a Bug Page (#12006)

* changes to html file -> added contributing to docs link at the end of the page

* revisions to the dealing with bugs page. added more links in the documentation bugs section

* 📜🤖 Added by blurb_it.

* Update Doc/bugs.rst

Updated Doc/bugs.rst in accordance with willingc and JulienPalard suggestions.

Co-Authored-By: suhearsawho <susansu.software@gmail.com>
6 years agobpo-30427: eliminate redundant type checks in os.path.normcase() (GH-1712)
Wolfgang Maier [Thu, 28 Mar 2019 21:47:18 +0000 (22:47 +0100)]
bpo-30427: eliminate redundant type checks in os.path.normcase() (GH-1712)

https://bugs.python.org/issue30427

6 years agobpo-36366: Return None on stopping unstarted patch object (GH-12472)
Xtreak [Thu, 28 Mar 2019 21:08:43 +0000 (02:38 +0530)]
bpo-36366: Return None on stopping unstarted patch object (GH-12472)

Return None after calling unittest.mock.patch.object.stop() regardless of whether the object was started. This makes the method idempotent.

https://bugs.python.org/issue36366

6 years agoFixed capital letters missing and missing . (GH-12584)
Jules Lasne (jlasne) [Thu, 28 Mar 2019 21:06:27 +0000 (22:06 +0100)]
Fixed capital letters missing and missing . (GH-12584)

No `bpo` for minor doc fix

6 years agoFix typo in email.encoders doc (GH-9700)
ksamuel [Thu, 28 Mar 2019 20:38:30 +0000 (21:38 +0100)]
Fix typo in email.encoders doc (GH-9700)

Make the encoding/encoders mention congruent.

6 years agobpo-35941: Fix ssl certificate enumeration for windows (GH-12486)
kctherookie [Thu, 28 Mar 2019 17:59:06 +0000 (00:59 +0700)]
bpo-35941: Fix ssl certificate enumeration for windows (GH-12486)

Add a function to collect certificates from several certificate stores into one certificate collection store that is then enumerated. This ensures we load as many certificates as we can access.

6 years agobpo-36425: Add Simplified Chinese to the language switcher (GH-12537)
zhsj [Thu, 28 Mar 2019 15:32:25 +0000 (23:32 +0800)]
bpo-36425: Add Simplified Chinese to the language switcher (GH-12537)

6 years agobpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183)
Giampaolo Rodola [Thu, 28 Mar 2019 14:20:30 +0000 (15:20 +0100)]
bpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183)

6 years agobpo-36387: Refactor getenvironment() in _winapi.c. (GH-12482)
Serhiy Storchaka [Thu, 28 Mar 2019 14:01:34 +0000 (16:01 +0200)]
bpo-36387: Refactor getenvironment() in _winapi.c. (GH-12482)

Make it doing less memory allocations and using the modern C API.

6 years agobpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)
Zackery Spytz [Thu, 28 Mar 2019 13:53:00 +0000 (07:53 -0600)]
bpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)

Remove the PyMem_FREE() call added in cb90c89.  The buffer will be
freed when PyTokenizer_Free() is called on the tokenizer state.

6 years agobpo-36452: dictiter: track maximum iteration count (GH-12596)
Thomas Perl [Thu, 28 Mar 2019 06:03:25 +0000 (07:03 +0100)]
bpo-36452: dictiter: track maximum iteration count (GH-12596)

6 years agoFix NEWS entries with incorrect bpo numbers (GH-12599)
Ned Deily [Thu, 28 Mar 2019 04:19:30 +0000 (00:19 -0400)]
Fix NEWS entries with incorrect bpo numbers (GH-12599)

6 years agoRevert "Minor doc improvement (GH-10341)" (GH-12597)
Raymond Hettinger [Thu, 28 Mar 2019 04:03:02 +0000 (21:03 -0700)]
Revert "Minor doc improvement (GH-10341)" (GH-12597)

This reverts commit dfd775a0b1aee51d842b20cdebd97cc52c0b32e7.

6 years agobpo-36245: Fix more empty environment variable checks (GH-12592)
Steve Dower [Wed, 27 Mar 2019 23:28:41 +0000 (16:28 -0700)]
bpo-36245: Fix more empty environment variable checks (GH-12592)

6 years agobpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605)
Philipp A [Wed, 27 Mar 2019 21:34:19 +0000 (22:34 +0100)]
bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605)

6 years agoAdd missing docstrings for TarInfo objects (#12555)
Raymond Hettinger [Wed, 27 Mar 2019 20:16:34 +0000 (13:16 -0700)]
Add missing docstrings for TarInfo objects (#12555)

6 years agobpo-36443: Disable C locale coercion and UTF-8 Mode by default (GH-12589)
Victor Stinner [Wed, 27 Mar 2019 17:28:46 +0000 (18:28 +0100)]
bpo-36443: Disable C locale coercion and UTF-8 Mode by default (GH-12589)

bpo-36443, bpo-36202: Since Python 3.7.0, calling Py_DecodeLocale()
before Py_Initialize() produces mojibake if the LC_CTYPE locale is
coerced and/or if the UTF-8 Mode is enabled by the user
configuration. This change fix the issue by disabling LC_CTYPE
coercion and UTF-8 Mode by default. They must now be enabled
explicitly (opt-in) using the new _Py_PreInitialize() API with
_PyPreConfig.

When embedding Python, set coerce_c_locale and utf8_mode attributes
of _PyPreConfig to -1 to enable automatically these parameters
depending on the LC_CTYPE locale, environment variables and command
line arguments

Alternative: Setting Py_UTF8Mode to 1 always explicitly enables the
UTF-8 Mode.

Changes:

* _PyPreConfig_INIT now sets coerce_c_locale and utf8_mode to 0 by
  default.
* _Py_InitializeFromArgs() and _Py_InitializeFromWideArgs() can now
  be called with config=NULL.

6 years agobpo-36441: Fixes creating a venv when debug binaries are installed. (#12566)
Steve Dower [Wed, 27 Mar 2019 15:14:53 +0000 (08:14 -0700)]
bpo-36441: Fixes creating a venv when debug binaries are installed. (#12566)

6 years agobpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)
hliu0 [Wed, 27 Mar 2019 15:11:12 +0000 (23:11 +0800)]
bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)

 Python always use UTF-8 on VxWorks.

6 years agobpo-36447, bpo-36447: Fix refleak in _PySys_InitMain() (GH-12586)
Pablo Galindo [Wed, 27 Mar 2019 12:43:47 +0000 (12:43 +0000)]
bpo-36447, bpo-36447: Fix refleak in _PySys_InitMain() (GH-12586)

Fix refleak in sysmodule.c when calling SET_SYS_FROM_STRING_BORROW.

6 years agobpo-36444: Rework _Py_InitializeFromConfig() API (GH-12576)
Victor Stinner [Wed, 27 Mar 2019 12:40:14 +0000 (13:40 +0100)]
bpo-36444: Rework _Py_InitializeFromConfig() API (GH-12576)

6 years agobpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661)
Eddie Elizondo [Wed, 27 Mar 2019 11:52:18 +0000 (07:52 -0400)]
bpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661)

* Incref heap-allocated types in PyObject_Init
* Add documentation and porting notes to What's New

6 years agoDoc: Fixed missing punctuation in datamodel.rst (GH-12581)
Jules Lasne (jlasne) [Wed, 27 Mar 2019 10:10:33 +0000 (11:10 +0100)]
Doc: Fixed missing punctuation in datamodel.rst (GH-12581)

6 years agobpo-32380: add "versionadded: 3.8" to singledispatchmethod (GH-12580)
Inada Naoki [Wed, 27 Mar 2019 09:15:17 +0000 (18:15 +0900)]
bpo-32380: add "versionadded: 3.8" to singledispatchmethod (GH-12580)

6 years agobpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553)
Serhiy Storchaka [Wed, 27 Mar 2019 06:02:28 +0000 (08:02 +0200)]
bpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553)

6 years agobpo-36407: Fix writing indentations of CDATA section (xml.dom.minidom). (GH-12514)
Vladimir Surjaninov [Wed, 27 Mar 2019 05:58:49 +0000 (08:58 +0300)]
bpo-36407: Fix writing indentations of CDATA section (xml.dom.minidom). (GH-12514)

6 years agobpo-33832: Add "magic method" glossary entry (GH-7630)
Andre Delfino [Wed, 27 Mar 2019 01:21:27 +0000 (22:21 -0300)]
bpo-33832: Add "magic method" glossary entry (GH-7630)

6 years agoMinor doc improvement (GH-10341)
Andre Delfino [Wed, 27 Mar 2019 01:17:50 +0000 (22:17 -0300)]
Minor doc improvement (GH-10341)

Change "star-operator" to "* operator".

6 years agobpo-36444: Add _PyCoreConfig._init_main (GH-12572)
Victor Stinner [Wed, 27 Mar 2019 01:04:16 +0000 (02:04 +0100)]
bpo-36444: Add _PyCoreConfig._init_main (GH-12572)

* Add _PyCoreConfig._init_main: if equals to zero,
  _Py_InitializeFromConfig() doesn't call
  _Py_InitializeMainInterpreter().
* Add interp_p parameter to _Py_InitializeFromConfig().
* pymain_init() now calls _Py_InitializeFromConfig().
* Make _Py_InitializeCore() private.

6 years agobpo-36444: Remove _PyMainInterpreterConfig (GH-12571)
Victor Stinner [Wed, 27 Mar 2019 00:36:16 +0000 (01:36 +0100)]
bpo-36444: Remove _PyMainInterpreterConfig (GH-12571)

6 years agobpo-36429: Fix starting IDLE with pyshell (#12548)
Terry Jan Reedy [Tue, 26 Mar 2019 23:58:19 +0000 (19:58 -0400)]
bpo-36429: Fix starting IDLE with pyshell (#12548)

Add idlelib.pyshell alias at top; remove pyshell alias at bottom.
Remove obsolete __name__=='__main__' command.

6 years agobpo-36301: Test Python init with isolated (GH-12569)
Victor Stinner [Tue, 26 Mar 2019 23:26:18 +0000 (00:26 +0100)]
bpo-36301: Test Python init with isolated (GH-12569)

Add test_preinit_isolated1() and test_preinit_isolated2() test_embed.

6 years agobpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821)
Tal Einat [Tue, 26 Mar 2019 21:10:40 +0000 (23:10 +0200)]
bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821)

6 years agobpo-36364: fix SharedMemoryManager examples (GH-12439)
Pierre Glaser [Tue, 26 Mar 2019 19:12:26 +0000 (20:12 +0100)]
bpo-36364: fix SharedMemoryManager examples (GH-12439)

Examples of the `multiprocessing.shared_memory` module try to import `SharedMemoryManager` from `multiprocessing.shared_memory` whereas this class is defined in `multiprocessing.managers`.

6 years agobpo-36301: Cleanup preconfig.c and coreconfig.c (GH-12563)
Victor Stinner [Tue, 26 Mar 2019 15:58:50 +0000 (16:58 +0100)]
bpo-36301: Cleanup preconfig.c and coreconfig.c (GH-12563)

* _PyCoreConfig_Write() now updates _PyRuntime.preconfig
* Remove _PyPreCmdline_Copy()
* _PyPreCmdline_Read() now accepts _PyPreConfig and _PyCoreConfig
  optional configurations.
* Rename _PyPreConfig_ReadFromArgv() to _PyPreConfig_Read(). Simplify
  the code.
* Calling _PyCoreConfig_Read() no longer adds the warning options
  twice: don't add a warning option if it's already in the list.
* Rename _PyCoreConfig_ReadFromArgv() to _PyCoreConfig_Read().
* Rename config_from_cmdline() to _PyCoreConfig_ReadFromArgv().
* Add more assertions on _PyCoreConfig in _PyCoreConfig_Read().
* Move some functions.
* Make some config functions private.

6 years agobpo-36436: Fix _testcapi.pymem_buffer_overflow() (GH-12560)
Victor Stinner [Tue, 26 Mar 2019 13:35:30 +0000 (14:35 +0100)]
bpo-36436: Fix _testcapi.pymem_buffer_overflow() (GH-12560)

Handle memory allocation failure.

6 years agobpo-36433: fix confusing error messages in classmethoddescr_call (GH-12556)
Inada Naoki [Tue, 26 Mar 2019 09:26:33 +0000 (18:26 +0900)]
bpo-36433: fix confusing error messages in classmethoddescr_call (GH-12556)

https://bugs.python.org/issue36433

6 years agoPost v3.8.0a3
Łukasz Langa [Tue, 26 Mar 2019 09:11:11 +0000 (10:11 +0100)]
Post v3.8.0a3

6 years agoMerge tag 'v3.8.0a3'
Łukasz Langa [Tue, 26 Mar 2019 09:08:49 +0000 (10:08 +0100)]
Merge tag 'v3.8.0a3'

Python 3.8.0a3

6 years agobpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551)
Zackery Spytz [Tue, 26 Mar 2019 06:05:29 +0000 (00:05 -0600)]
bpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551)

6 years agoDocument that logging registers shutdown as an atexit handler (GH-12378)
Andre Delfino [Tue, 26 Mar 2019 05:42:26 +0000 (02:42 -0300)]
Document that logging registers shutdown as an atexit handler (GH-12378)

6 years agoFix "the the" in the idle docs. (GH-12549)
Benjamin Peterson [Tue, 26 Mar 2019 04:46:35 +0000 (21:46 -0700)]
Fix "the the" in the idle docs. (GH-12549)

6 years agobpo-36301: Remove _PyCoreConfig.preconfig (GH-12546)
Victor Stinner [Tue, 26 Mar 2019 01:31:11 +0000 (02:31 +0100)]
bpo-36301: Remove _PyCoreConfig.preconfig (GH-12546)

* Replace _PyCoreConfig.preconfig with 3 new fields in _PyCoreConfig:
  isolated, use_environment, dev_mode.
* Add _PyPreCmdline.dev_mode.
* Add _Py_PreInitializeFromPreConfigInPlace().

6 years agobpo-36301: Add _Py_GetEnv() function (GH-12542)
Victor Stinner [Mon, 25 Mar 2019 23:03:15 +0000 (00:03 +0100)]
bpo-36301: Add _Py_GetEnv() function (GH-12542)

* Make _PyPreConfig_GetEnv(), _PyCoreConfig_GetEnv() and
  _PyCoreConfig_GetEnvDup() private
* _Py_get_env_flag() first parameter becomes "int use_environment"

6 years agobpo-34085: Improve wording on classmethod/staticmethod (#8228)
Andre Delfino [Mon, 25 Mar 2019 22:53:43 +0000 (19:53 -0300)]
bpo-34085: Improve wording on classmethod/staticmethod (#8228)

* bpo-34085: Improve wording on classmethod/staticmethod

* Address comments from Éric

* Address comments from Éric

6 years agobpo-36345: Add a new example in the documentation of wsgiref (#12511)
Stéphane Wirtel [Mon, 25 Mar 2019 22:52:56 +0000 (23:52 +0100)]
bpo-36345: Add a new example in the documentation of wsgiref (#12511)

6 years agobpo-36301: Add _Py_GetConfigsAsDict() function (GH-12540)
Victor Stinner [Mon, 25 Mar 2019 22:19:57 +0000 (23:19 +0100)]
bpo-36301: Add _Py_GetConfigsAsDict() function (GH-12540)

* Add _Py_GetConfigsAsDict() function to get all configurations as a
  dict.
* dump_config() of _testembed.c now dumps preconfig as a separated
  key: call _Py_GetConfigsAsDict().
* Make _PyMainInterpreterConfig_AsDict() private.

6 years agobpo-36143: Regenerate Lib/keyword.py from the Grammar and Tokens file using pgen...
Pablo Galindo [Mon, 25 Mar 2019 22:01:12 +0000 (22:01 +0000)]
bpo-36143: Regenerate Lib/keyword.py from the Grammar and Tokens file using pgen (GH-12456)

Now that the parser generator is written in Python (Parser/pgen) we can make use of it to regenerate the Lib/keyword file that contains the language keywords instead of parsing the autogenerated grammar files. This also allows checking in the CI that the autogenerated files are up to date.

6 years agobpo-36370: Check for PyErr_Occurred() after PyImport_GetModule() (GH-12504)
Stefan Krah [Mon, 25 Mar 2019 20:50:58 +0000 (21:50 +0100)]
bpo-36370: Check for PyErr_Occurred() after PyImport_GetModule() (GH-12504)