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

6 years agobpo-36326: Let inspect.getdoc() find docstrings for __slots__ (GH-12498)
Raymond Hettinger [Mon, 25 Mar 2019 20:01:13 +0000 (13:01 -0700)]
bpo-36326: Let inspect.getdoc() find docstrings for __slots__ (GH-12498)

6 years agoAdd note to Queue.get() docs about block=True (GH-2223)
Stephen Rosen [Mon, 25 Mar 2019 19:55:20 +0000 (15:55 -0400)]
Add note to Queue.get() docs about block=True (GH-2223)

6 years agov3.8.0a3 v3.8.0a3
Ɓukasz Langa [Mon, 25 Mar 2019 19:36:40 +0000 (20:36 +0100)]
v3.8.0a3

6 years agobpo-36301: Add _Py_PreInitializeFromConfig() (GH-12536)
Victor Stinner [Mon, 25 Mar 2019 17:37:10 +0000 (18:37 +0100)]
bpo-36301: Add _Py_PreInitializeFromConfig() (GH-12536)

* Initialize _PyPreConfig.dev_mode to -1.
* _PyPreConfig_Read(): coreconfig has the priority over preconfig.
* _PyCoreConfig_Read() now calls _PyPreCmdline_Read() internally.
* config_from_cmdline() now pass _PyPreCmdline to config_read().
* Add _PyPreCmdline_Copy().

6 years agobpo-36301: Cleanup preconfig code (GH-12535)
Victor Stinner [Mon, 25 Mar 2019 16:54:58 +0000 (17:54 +0100)]
bpo-36301: Cleanup preconfig code (GH-12535)

Prepare code to move some _PyPreConfig parameters into _PyPreCmdline.
Changes:

* _PyCoreConfig_ReadFromArgv(): remove preconfig parameter,
  use _PyRuntime.preconfig.
* Add _PyPreCmdline_GetPreConfig() (called by _PyPreConfig_Read()).
* Rename _PyPreCmdline_Init() to _PyPreCmdline_SetArgv()
* Factorize _Py_PreInitializeFromPreConfig() code: add
  pyinit_preinit().
* _PyPreConfig_Read() now sets coerce_c_locale to 2 if it must be
  coerced.
* Remove _PyCoreConfig_ReadPreConfig().
* _PyCoreConfig_Write() now copies updated preconfig into _PyRuntime.

6 years agobpo-35884: Add string-keys-only microbenchmark for dict access to var_access_benchmar...
Stefan Behnel [Mon, 25 Mar 2019 08:20:53 +0000 (09:20 +0100)]
bpo-35884: Add string-keys-only microbenchmark for dict access to var_access_benchmark.py (GH-11905)

6 years agobpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)
Zackery Spytz [Mon, 25 Mar 2019 08:07:47 +0000 (02:07 -0600)]
bpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)

Set type_attr to NULL after the assignment to stgdict->proto (like
what is done with stgdict after the Py_SETREF() call) so that it is
not decrefed twice on error.

6 years agobpo-36218: Fix handling of heterogeneous values in list.sort (GH-12209)
Rémi Lapeyre [Mon, 25 Mar 2019 07:25:37 +0000 (08:25 +0100)]
bpo-36218: Fix handling of heterogeneous values in list.sort (GH-12209)

6 years agoFix line ending (GH-12531)
Raymond Hettinger [Mon, 25 Mar 2019 07:23:39 +0000 (00:23 -0700)]
Fix line ending (GH-12531)

6 years agobpo-36401: Have help() show readonly properties separately (GH-12517)
Raymond Hettinger [Mon, 25 Mar 2019 00:07:47 +0000 (17:07 -0700)]
bpo-36401: Have help() show readonly properties separately (GH-12517)

6 years agobpo-30348: IDLE: Add test_autocomplete unittest (GH-2209)
Louie Lu [Sun, 24 Mar 2019 23:33:12 +0000 (07:33 +0800)]
bpo-30348: IDLE: Add test_autocomplete unittest (GH-2209)

6 years agobpo-31822: Document that urllib.parse.{Defrag,Split,Parse}Result are namedtuples...
Lisa Roach [Sun, 24 Mar 2019 21:28:48 +0000 (14:28 -0700)]
bpo-31822: Document that urllib.parse.{Defrag,Split,Parse}Result are namedtuples (GH-4434)

6 years agobpo-36405: IDLE - Restore __main__ and add tests (#12518)
Terry Jan Reedy [Sun, 24 Mar 2019 21:12:28 +0000 (17:12 -0400)]
bpo-36405: IDLE - Restore __main__ and add tests (#12518)

Fix error in commit 2b75155 noticed by Serhiy Storchaka.

6 years agoReplace "DOS box" with link to Windows FAQ. (GH-12390)
Ned Deily [Sun, 24 Mar 2019 19:03:54 +0000 (15:03 -0400)]
Replace "DOS box" with link to Windows FAQ. (GH-12390)

6 years agobpo-36412: fix a possible crash in dictobject.c's new_dict() (GH-12519)
Zackery Spytz [Sun, 24 Mar 2019 02:23:29 +0000 (20:23 -0600)]
bpo-36412: fix a possible crash in dictobject.c's new_dict() (GH-12519)

6 years agobpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
AraHaan [Sat, 23 Mar 2019 16:29:49 +0000 (12:29 -0400)]
bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)

Check for sys.abiflags before using since not all platforms have it defined.

6 years agobpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473)
Inada Naoki [Sat, 23 Mar 2019 12:04:40 +0000 (21:04 +0900)]
bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473)

We will remove int support from 3.10 or 4.0.

6 years agobpo-23205: IDLE: Add tests and refactor grep's findfiles (GH-12203)
Cheryl Sabella [Sat, 23 Mar 2019 11:33:42 +0000 (07:33 -0400)]
bpo-23205: IDLE: Add tests and refactor grep's findfiles (GH-12203)

* Add tests for grep findfiles.
* Move findfiles to module function.
* Change findfiles to use os.walk.

Based on a patch by Al Sweigart.

6 years agobpo-36301: Add _PyRuntimeState.preconfig (GH-12506)
Victor Stinner [Sat, 23 Mar 2019 11:05:43 +0000 (12:05 +0100)]
bpo-36301: Add _PyRuntimeState.preconfig (GH-12506)

_PyPreConfig_Write() now writes the applied pre-configuration into
_PyRuntimeState.preconfig.

6 years agobpo-36405: Use dict unpacking in idlelib (#12507)
Terry Jan Reedy [Sat, 23 Mar 2019 07:50:15 +0000 (03:50 -0400)]
bpo-36405: Use dict unpacking in idlelib (#12507)

Remove now unneeded imports.

6 years agobpo-33319: Clarify subprocess call docs. (GH-12508)
Gregory P. Smith [Sat, 23 Mar 2019 07:40:28 +0000 (00:40 -0700)]
bpo-33319: Clarify subprocess call docs. (GH-12508)

Clarify capturing or suppressing stdout and stderr on the old call APIs.

Do not state that they are equivalent to run() calls when they are not implemented using run as that was misleading. Unlike run they cannot handle stdout or stderr being set to PIPE without a risk of deadlock.