summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-25652: Fix __rmod__ of UserString (GH-13326)Batuhan Taşkaya2019-05-213-3/+15
| | | | | | The ``__rmod__`` method of ``collections.UserString`` class had a bug that made it unusable. https://bugs.python.org/issue25652
* bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148)Matthias Bussonnier2019-05-217-8/+109
| | | Co-Authored-By: Yury Selivanov <yury@magic.io>
* bpo-23378: Add an extend action to argparse (GH-13305)Batuhan Taşkaya2019-05-214-0/+26
| | | | | | Add an extend action to argparse https://bugs.python.org/issue23378
* bpo-36035: fix Path.rglob for broken links (GH-11988)Jörg Stucke2019-05-213-5/+17
| | | Links creating an infinite symlink loop would raise an exception.
* bpo-36929: Modify io/re tests to allow for missing mod name (#13392)Max Bernstein2019-05-213-29/+34
| | | | | | | | | | | | | | | | | | * bpo-36929: Modify io/re tests to allow for missing mod name For a vanishingly small number of internal types, CPython sets the tp_name slot to mod_name.type_name, either in the PyTypeObject or the PyType_Spec. There are a few minor places where this surfaces: * Custom repr functions for those types (some of which ignore the tp_name in favor of using a string literal, such as _io.TextIOWrapper) * Pickling error messages The test suite only tests the former. This commit modifies the test suite to allow Python implementations to omit the module prefix. https://bugs.python.org/issue36929
* Annotate the unexplained assignment in exception unbinding (GH-11448)Chris Angelico2019-05-211-1/+1
|
* bpo-36648: fix mmap issue for VxWorks (GH-12394)Lihua Zhao2019-05-212-0/+8
| | | | | The mmap module set MAP_SHARED flag when map anonymous memory, however VxWorks only support MAP_PRIVATE when map anonymous memory, this commit clear MAP_SHARED and set MAP_PRIVATE.
* bpo-31904: Add posix module support for VxWorks (GH-12118)pxinwr2019-05-218-15/+84
|
* Revert "bpo-36084: Add native thread ID to threading.Thread objects ↵Victor Stinner2019-05-2110-133/+2
| | | | | (GH-11993)" (GH-13458) This reverts commit 4959c33d2555b89b494c678d99be81a65ee864b0.
* bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421)Erik Janssens2019-05-212-2/+3
| | | | Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant. Moreover, include windows.h on Windows, not only when MSC is used.
* Fix RuntimeWarning in unittest.mock asyncio example (GH-13449)Xtreak2019-05-212-3/+3
| | | | * This PR fixes the `RuntimeWarning` in `inspect.isawaitable(mock())` where `mock()` was not awaited. * Fix typo in asynctest project.
* bpo-36932: use proper deprecation-removed directive (GH-13349)Matthias Bussonnier2019-05-213-24/+31
| | | | | | | | .. And update some deprecation warnings with version numbers. https://bugs.python.org/issue36932
* Remove workaround for defaults in namedtuple now that we have the defaults ↵Andre Delfino2019-05-211-9/+0
| | | | | | parameter (GH-13263)
* bpo-35563: Add reference links to warnings.rst (GH-11289)Cheryl Sabella2019-05-201-12/+12
|
* bpo-36969: Make PDB args command display keyword only arguments (GH-13452)Rémi Lapeyre2019-05-203-7/+26
|
* bpo-36952: Remove the bufsize parameter in fileinput.input(). (GH-13400)Matthias Bussonnier2019-05-205-47/+41
| | | | | This parameter is marked as deprecated since 3.6 and for removal in 3.8. It already had no effects.
* bpo-23896: Add a grammar where exec isn't a stmt (#13272)Batuhan Taşkaya2019-05-203-0/+6
| | | https://bugs.python.org/issue23896
* bpo-36888: Add multiprocessing.parent_process() (GH-13247)Thomas Moreau2019-05-2012-20/+155
|
* bpo-36949: Implement __repr__ on WeakSet (GH-13415)Batuhan Taşkaya2019-05-203-0/+7
|
* bpo-26467: Adds AsyncMock for asyncio Mock library support (GH-9296)Lisa Roach2019-05-206-20/+1161
|
* bpo-36763: Fix _PyRuntime.preconfig.coerce_c_locale (GH-13444)Victor Stinner2019-05-203-19/+37
| | | | | | | | | | | _PyRuntime.preconfig.coerce_c_locale can now be used to check if the C locale has been coerced. * Fix _Py_LegacyLocaleDetected(): don't attempt to coerce the C locale if LC_ALL environment variable is set. Add 'warn' parameter: emit_stderr_warning_for_legacy_locale() must not the LC_ALL env var. * _PyPreConfig_Write() sets coerce_c_locale to 0 if _Py_CoerceLegacyLocale() fails.
* bpo-22865: Expand on documentation for the pty.spawn function (GH-11980)Geoff Shannon2019-05-203-4/+27
|
* Pass _asyncio_internal=True into stream tests on windows (#13442)Andrew Svetlov2019-05-201-2/+4
|
* bpo-36763: Fix encoding/locale tests in test_embed (GH-13443)Victor Stinner2019-05-202-96/+113
| | | | | * Fix encoding and locale tests in test_embed.InitConfigTests. * InitConfigTests now only computes EXPECTED_CONFIG once. * Add tests for PYTHONWARNINGS and PYTHONPATH env vars
* bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails ↵Niklas Fiekas2019-05-204-10/+29
| | | | | | | | (GH-11553) This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it. https://bugs.python.org/issue35721
* bpo-36763: Fix Python preinitialization (GH-13432)Victor Stinner2019-05-208-178/+476
| | | | | | | | | | | | | | | | | | | | | * Add _PyPreConfig.parse_argv * Add _PyCoreConfig._config_init field and _PyCoreConfigInitEnum enum type * Initialization functions: reject preconfig=NULL and config=NULL * Add config parameter to _PyCoreConfig_DecodeLocaleErr(): pass config->argv to _Py_PreInitializeFromPyArgv(), to parse config command line arguments in preinitialization. * Add config parameter to _PyCoreConfig_SetString(). It now preinitializes Python. * _PyCoreConfig_SetPyArgv() now also preinitializes Python for wide argv * Fix _Py_PreInitializeFromCoreConfig(): don't pass args to _Py_PreInitializeFromPyArgv() if config.parse_argv=0. * Use "char * const *" and "wchar_t * const *" types for 'argv' parameters and _PyArgv.argv. * Add unit test on preinitialization from argv. * _PyPreConfig.allocator type becomes int * Add _PyPreConfig_InitFromPreConfig() and _PyPreConfig_InitFromCoreConfig() helper functions
* bpo-36958: In IDLE, print exit message (GH-13435)Terry Jan Reedy2019-05-205-6/+20
| | | | | Print any argument other than None or int passed to SystemExit or sys.exit().
* closes bpo-36951: Correct some types in the type_members struct in ↵Zackery Spytz2019-05-201-3/+3
| | | | typeobject.c. (GH-13403)
* bpo-35134: Register new traceback.h header files (GH-13431)Victor Stinner2019-05-203-0/+10
| | | | Add new cpython/traceback.h and pycore_traceback.h header files to Makefile.pre.in and PCbuild/ project.
* bpo-35134: Split traceback.h header (GH-13430)Victor Stinner2019-05-198-96/+123
| | | | Add new Include/cpython/traceback.h and Include/internal/traceback.h header files.
* bpo-35252: Remove FIXME from test_functools (GH-10551)Lysandros Nikolaou2019-05-193-9/+11
|
* bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)Xtreak2019-05-1926-19/+52
| | | | | The sqlit3.Connection object doesn't call its close() method when it's used as a context manager.
* bpo-36957: Speed up math.isqrt (#13405)Mark Dickinson2019-05-192-8/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add math.isqrt function computing the integer square root. * Code cleanup: remove redundant comments, rename some variables. * Tighten up code a bit more; use Py_XDECREF to simplify error handling. * Update Modules/mathmodule.c Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Update Modules/mathmodule.c Use real argument clinic type instead of an alias Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add proof sketch * Updates from review. * Correct and expand documentation. * Fix bad reference handling on error; make some variables block-local; other tidying. * Style and consistency fixes. * Add missing error check; don't try to DECREF a NULL a * Simplify some error returns. * Another two test cases: - clarify that floats are rejected even if they happen to be squares of small integers - TypeError beats ValueError for a negative float * Add fast path for small inputs. Needs tests. * Speed up isqrt for n >= 2**64 as well; add extra tests. * Reduce number of test-cases to avoid dominating the run-time of test_math. * Don't perform unnecessary extra iterations when computing c_bit_length. * Abstract common uint64_t code out into a separate function. * Cleanup. * Add a missing Py_DECREF in an error branch. More cleanup. * Update Modules/mathmodule.c Add missing `static` declaration to helper function. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add missing backtick.
* bpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914)Berker Peksag2019-05-193-1/+38
|
* bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094)Bar Harel2019-05-193-0/+41
|
* bpo-36948: Fix NameError in urllib.request.URLopener.retrieve (GH-13389)Xtreak2019-05-193-6/+26
|
* bpo-36957: Add _PyLong_Rshift() and _PyLong_Lshift(). (GH-13416)Serhiy Storchaka2019-05-194-53/+87
|
* Orthographical fix (GH-13418)Boštjan Mejak2019-05-191-1/+1
| | | Add a missing comma.
* Fix typo in test comment (GH-11442)Ashwin Ramaswami2019-05-191-1/+1
|
* bpo-33519: clarify that .copy() is not part of the MutableSequence ABC (GH-6965)Jelle Zijlstra2019-05-192-2/+5
|
* bpo-36961: Handle positional-only arguments in uparse.c (GH-13412)Pablo Galindo2019-05-182-6/+28
|
* Add support for PEP572 in ast_unparse.c (GH-13337)Batuhan Taşkaya2019-05-183-0/+16
|
* bpo-36567: Use manpages_url to create links for man pages (GH-13339)Batuhan Taşkaya2019-05-181-0/+3
|
* bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails ↵Abhishek Kumar Singh2019-05-181-0/+4
| | | | for Feb 29. (GH-10243)
* bpo-2180: Treat line continuation at EOF as a `SyntaxError` (GH-13401)Anthony Sottile2019-05-183-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the parser consistent with the tokenize module (already the case in `pypy`). sample ------ ```python x = 5\ ``` before ------ ```console $ python3 t.py $ python3 -mtokenize t.py t.py:2:0: error: EOF in multi-line statement ``` after ----- ```console $ ./python t.py File "t.py", line 3 x = 5\ ^ SyntaxError: unexpected EOF while parsing $ ./python -m tokenize t.py t.py:2:0: error: EOF in multi-line statement ``` https://bugs.python.org/issue2180
* bpo-36546: Add more tests and expand docs (#13406)Raymond Hettinger2019-05-182-22/+49
|
* bpo-36887: add math.isqrt (GH-13244)Mark Dickinson2019-05-186-1/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add math.isqrt function computing the integer square root. * Code cleanup: remove redundant comments, rename some variables. * Tighten up code a bit more; use Py_XDECREF to simplify error handling. * Update Modules/mathmodule.c Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Update Modules/mathmodule.c Use real argument clinic type instead of an alias Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> * Add proof sketch * Updates from review. * Correct and expand documentation. * Fix bad reference handling on error; make some variables block-local; other tidying. * Style and consistency fixes. * Add missing error check; don't try to DECREF a NULL a * Simplify some error returns. * Another two test cases: - clarify that floats are rejected even if they happen to be squares of small integers - TypeError beats ValueError for a negative float * Documentation and markup improvements; thanks Serhiy for the suggestions! * Cleaner Misc/NEWS entry wording. * Clean up (with one fix) to the algorithm explanation and proof.
* bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402)Victor Stinner2019-05-186-41/+15
|
* bpo-36763: Use _PyCoreConfig_InitPythonConfig() (GH-13398)Victor Stinner2019-05-188-181/+240
| | | | | | | | | | | | | | | | | _PyPreConfig_InitPythonConfig() and _PyCoreConfig_InitPythonConfig() no longer inherit their values from global configuration variables. Changes: * _PyPreCmdline_Read() now ignores -X dev and PYTHONDEVMODE if dev_mode is already set. * Inline _PyPreConfig_INIT macro into _PyPreConfig_Init() function. * Inline _PyCoreConfig_INIT macro into _PyCoreConfig_Init() function. * Replace _PyCoreConfig_Init() with _PyCoreConfig_InitPythonConfig() in most tests of _testembed.c. * Replace _PyCoreConfig_Init() with _PyCoreConfig_InitIsolatedConfig() in _freeze_importlib.c. * Move some initialization functions from the internal to the private API.
* Fix couple of dead code paths (GH-7418)David Carlier2019-05-174-7/+0
|