summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-36878: Track extra text added to 'type: ignore' in the AST (GH-13479)Michael J. Sullivan2019-05-229-26/+86
| | | | | GH-13238 made extra text after a # type: ignore accepted by the parser. This finishes the job and actually plumbs the extra text through the parser and makes it available in the AST.
* bpo-36972: Add SupportsIndex (GH-13448)Paul Dagnelie2019-05-225-0/+21
| | | | In order to support typing checks calling hex(), oct() and bin() on user-defined classes, a SupportIndex protocol is required. The ability to check these at runtime would be good to add for completeness sake. This is pretty much just a copy of SupportsInt with the names tweaked.
* bpo-31862: Port binascii to PEP 489 multiphase initialization (GH-4108)Marcel Plch2019-05-223-34/+118
|
* bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381)Jeroen Demeyer2019-05-223-5/+31
|
* bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461)Jeroen Demeyer2019-05-221-0/+9
| | | | | It adds a missing testcase for bpo-34125. This is testing code which is affected by PEP 590, so missing this test might accidentally break CPython if we screw up with implementing PEP 590.
* bpo-36829: Add sys.unraisablehook() (GH-13187)Victor Stinner2019-05-2212-117/+491
| | | | | | | | | | | | | | | | | | | Add new sys.unraisablehook() function which can be overridden to control how "unraisable exceptions" are handled. It is called when an exception has occurred but there is no way for Python to handle it. For example, when a destructor raises an exception or during garbage collection (gc.collect()). Changes: * Add an internal UnraisableHookArgs type used to pass arguments to sys.unraisablehook. * Add _PyErr_WriteUnraisableDefaultHook(). * The default hook now ignores exception on writing the traceback. * test_sys now uses unittest.main() to automatically discover tests: remove test_main(). * Add _PyErr_Init(). * Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr while using it
* bpo-36948: Fix test_urlopener_retrieve_file on Windows (GH-13476)Berker Peksag2019-05-211-1/+2
|
* bpo-34616: Fix code style and unbreak buildbots (GH-13473)Yury Selivanov2019-05-211-18/+20
| | | See also PR GH-13148.
* 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
|