Commit Graph

103843 Commits

Author SHA1 Message Date
Thomas Perl b8311cf5e5 bpo-36473: add maximum iteration check for dict .values() and .items() (GH-12619) 2019-04-02 18:30:10 +09:00
Inada Naoki 04694a306b
bpo-35838: document optionxform must be idempotent (GH-12656) 2019-04-02 18:08:46 +09:00
Max Bernstein e6a0e804bf fix confusing argument name in unicodeobject.c (GH-12653) 2019-04-02 01:16:22 -07:00
Emmanuel Arias b00479d42a bpo-36377: Specify that range() can not be compared (GH-12468) 2019-04-01 21:52:42 -07:00
Daniel Hahler 9139f926a8 bpo-13120: fix typo with test_issue13120() method name (GH-12250)
Incorrect issue number '13210' added in 539ee5da6f.


https://bugs.python.org/issue13120
2019-04-01 14:59:50 -07:00
Steve Dower b4bcefe5fe
Temporary workaround for an ACL issue on Ubuntu on Azure Pipelines (GH-12649) 2019-04-01 09:10:20 -07:00
Joannah Nanjekye 8c61739def 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
2019-04-01 08:08:43 -07:00
Brad Larsen a4d7836239 bpo-36495: Fix two out-of-bounds array reads (GH-12641)
Research and fix by @bradlarsen.
2019-04-01 07:36:05 -07:00
Inada Naoki 10654c19b5
bpo-20844: open script file with "rb" mode (GH-12616) 2019-04-01 18:35:20 +09:00
Inada Naoki 62f9588663
bpo-36026: make descr error message consistent (GH-11930)
set.add(0) and set.add.__get__(0) now raise TypeError
with same error message.
2019-04-01 17:56:11 +09:00
Serhiy Storchaka 42a139ed88
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.
2019-04-01 09:16:35 +03:00
Zackery Spytz 5f2c50810a bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106) 2019-03-31 19:02:11 +03:00
Zackery Spytz 48600c72c1 bpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH-12629) 2019-03-31 19:00:12 +03:00
Steve Dower 79da388a40
bpo-36085: Add installer check for KB2533625 (GH-12636) 2019-03-30 20:58:17 -07:00
Steve Dower ac19d96527
bpo-36085: Add additional load flag to ensure DLL loads successfully (GH-12633) 2019-03-30 17:14:46 -07:00
Paul Moore e724152796 bpo-36010: Add venv to the nuget distribution (GH-12367) 2019-03-30 09:32:05 -07:00
Joel Croteau e653d4d8e8 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.
2019-03-31 00:53:48 +10:00
Nick Coghlan ddbb978e10
C API docs: Py_IsInitialized is always safe to call (GH-12630) 2019-03-30 21:24:05 +10:00
Serhiy Storchaka 172bb39452
bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927) 2019-03-30 08:33:02 +02:00
Serhiy Storchaka afbb7a371f
bpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926) 2019-03-30 08:32:18 +02:00
Serhiy Storchaka 2524fdefc9
bpo-36434: Properly handle writing errors in ZIP files. (GH-12559)
Errors during writing no longer prevent to properly close
the ZIP file.
2019-03-30 08:25:19 +02:00
Serhiy Storchaka 7a465cb5ee
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.
2019-03-30 08:23:38 +02:00
Inada Naoki 38f4e468d4
bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602) 2019-03-30 14:32:08 +09:00
Inada Naoki 7444daada1
github: assign @methane to dict owner (GH-12617) 2019-03-30 11:08:17 +09:00
Steve Dower 2438cdf0e9
bpo-36085: Enable better DLL resolution on Windows (GH-12302) 2019-03-29 16:37:16 -07:00
Paul Monson 32119e10b7 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.
2019-03-29 16:30:10 -07:00
Jeroen Demeyer 3396d1e0ca bpo-36448: mention 'make regen-all' in error message (GH-12585) 2019-03-29 11:37:22 -07:00
Victor Stinner 2f54908afc
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
2019-03-29 15:13:46 +01:00
Alexey Izbyshev 5f45979b63 bpo-35194: cjkcodec: check the encoded value is not truncated (GH-10432) 2019-03-29 16:48:47 +09:00
Julien Palard 9e30fbac01 bpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990) 2019-03-28 19:15:34 -07:00
Susan Su 081158e3ba 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>
2019-03-28 18:55:24 -07:00
Wolfgang Maier 74510e2a57 bpo-30427: eliminate redundant type checks in os.path.normcase() (GH-1712)
https://bugs.python.org/issue30427
2019-03-28 14:47:18 -07:00
Xtreak 02b84cb1b4 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
2019-03-28 14:08:43 -07:00
Jules Lasne (jlasne) 3d78c4a6e5 Fixed capital letters missing and missing . (GH-12584)
No `bpo` for minor doc fix
2019-03-28 14:06:27 -07:00
ksamuel e63fc11b1d Fix typo in email.encoders doc (GH-9700)
Make the encoding/encoders mention congruent.
2019-03-28 13:38:30 -07:00
kctherookie d93fbbf88e 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.
2019-03-28 10:59:06 -07:00
zhsj 45a5fdb91c bpo-36425: Add Simplified Chinese to the language switcher (GH-12537) 2019-03-28 16:32:25 +01:00
Giampaolo Rodola 3eca28c613
bpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183) 2019-03-28 15:20:30 +01:00
Serhiy Storchaka 8abd7c7e37
bpo-36387: Refactor getenvironment() in _winapi.c. (GH-12482)
Make it doing less memory allocations and using the modern C API.
2019-03-28 16:01:34 +02:00
Zackery Spytz cda139d1de 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.
2019-03-28 15:53:00 +02:00
Thomas Perl 796cc6e3ad bpo-36452: dictiter: track maximum iteration count (GH-12596) 2019-03-28 15:03:25 +09:00
Ned Deily 738cb42a14
Fix NEWS entries with incorrect bpo numbers (GH-12599) 2019-03-28 00:19:30 -04:00
Raymond Hettinger fb28fcc925
Revert "Minor doc improvement (GH-10341)" (GH-12597)
This reverts commit dfd775a0b1.
2019-03-27 21:03:02 -07:00
Steve Dower b95a79c928
bpo-36245: Fix more empty environment variable checks (GH-12592) 2019-03-27 16:28:41 -07:00
Philipp A d5a5a33f12 bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605) 2019-03-27 17:34:19 -04:00
Raymond Hettinger a694f23948
Add missing docstrings for TarInfo objects (#12555) 2019-03-27 13:16:34 -07:00
Victor Stinner d929f1838a
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.
2019-03-27 18:28:46 +01:00
Steve Dower 4a9a505d6f
bpo-36441: Fixes creating a venv when debug binaries are installed. (#12566) 2019-03-27 08:14:53 -07:00
hliu0 f4333d0479 bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)
Python always use UTF-8 on VxWorks.
2019-03-27 16:11:12 +01:00
Pablo Galindo 34ef64fe59 bpo-36447, bpo-36447: Fix refleak in _PySys_InitMain() (GH-12586)
Fix refleak in sysmodule.c when calling SET_SYS_FROM_STRING_BORROW.
2019-03-27 13:43:47 +01:00