summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Document a workaround for a curses bug (GH-13209)Toshio Kuratomi2019-05-172-3/+12
|
* Correct typos in the Barrier specification (GH-9395)Géry Ogam2019-05-171-2/+2
|
* bpo-36763: _Py_InitializeFromArgs() argc becomes Py_ssize_t (GH-13396)Victor Stinner2019-05-175-53/+25
| | | | | | | * The type of initlization function 'argc' parameters becomes Py_ssize_t, instead of int. * Change _PyPreConfig_Copy() return type to void, instead of int. The function cannot fail anymore. * Fix compilation warnings on Windows.
* bpo-27268: Fix incorrect error message on float('') (GH-2745)Pedro Lacerda2019-05-171-3/+3
|
* bpo-36763: Add _PyInitError functions (GH-13395)Victor Stinner2019-05-1712-59/+102
| | | | | | | | | | | | | | | * Add _PyInitError functions: * _PyInitError_Ok() * _PyInitError_Error() * _PyInitError_NoMemory() * _PyInitError_Exit() * _PyInitError_IsError() * _PyInitError_IsExit() * _PyInitError_Failed() * frozenmain.c and _testembed.c now use functions rather than macros. * Move _Py_INIT_xxx() macros to the internal API. * Move _PyWstrList_INIT macro to the internal API.
* bpo-36763: _Py_RunMain() doesn't call Py_Exit() anymore (GH-13390)Victor Stinner2019-05-174-62/+116
| | | | | | | | | Py_Main() and _Py_RunMain() now return the exitcode rather than calling Py_Exit(exitcode) when calling PyErr_Print() if the current exception type is SystemExit. * Add _Py_HandleSystemExit(). * Add pymain_exit_err_print(). * Add pymain_exit_print().
* bpo-36945: Add _PyPreConfig.configure_locale (GH-13368)Victor Stinner2019-05-174-10/+82
| | | | | _PyPreConfig_InitIsolatedConfig() sets configure_locale to 0 to prevent Python to modify the LC_CTYPE locale. In that case, coerce_c_locale an coerce_c_locale_warn are set to 0 as well.
* bpo-36782: Created C API wrappers and added missing tests for functions in ↵Edison A2019-05-174-4/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the PyDateTimeAPI. (#13088) * created a c API wrapper for pyDate_FromDate and added the test * 📜🤖 Added by blurb_it. * fixed auto-alignment by vscode * made changes as per PEP7 * Update 2019-05-04-21-25-19.bpo-36782.h3oPIb.rst * Refactored code as per requested changes * Remove Whitespace to Fix failed travis build * Update 2019-05-04-21-25-19.bpo-36782.h3oPIb.rst * Add a new line at end of ACKS * Added C API function for PyDateTime_FromDateAndTime * Added a test for the C API wrapper of PyDateTime_FromDateAndTime * Added C API function for PyDateTime_FromDateAndTime * Added a test for the C API wrapper of PyDateTime_FromDateAndTimeAndFold * Remove Whitespace using patchcheck * Added a C API function for PyTime_FromTime * Added a test for the C API wrapper of PyTime_FromTime * Added a C API function for PyTime_FromTimeAndFold * Added a test for the C API wrapper of PyTime_FromTimeAndFold * Added a C API function for PyDelta_FromDSU * Added a test for the C API wrapper of PyDelta_FromDSU * Refactor code, re-edit lines longer than 80 chars * Fix Whitespace issues in DatetimeTester * List all tests that were added in this PR * Update 2019-05-04-21-25-19.bpo-36782.h3oPIb.rst * Reformat code as per PEP7 guidelines * Remove unused varibles from another function * Added specific tests for the Fold Attribute * Update 2019-05-04-21-25-19.bpo-36782.h3oPIb.rst * Reformat code according to requested changes * Reformat code to PEP7 Guidelines * Reformat code to PEP7 Guidelines * Re-add name to blurb * Added a backtick to blurb file * Update 2019-05-04-21-25-19.bpo-36782.h3oPIb.rst * Remove the need to initialize mandatory parameters * Make the macro parameter mandatory * Re-arrange the order of unit-test args * Removed the need to initialize macro change all the int macro = 0 to int macro; now that macro is required Co-Authored-By: Paul Ganssle <pganssle@users.noreply.github.com> * Removed the need to initialize macro change all the `int macro = 0` to `int macro`; now that macro is required Co-Authored-By: Paul Ganssle <pganssle@users.noreply.github.com> * Removed the need to initialize macro change all the `int macro = 0` to `int macro`; now that macro is required Co-Authored-By: Paul Ganssle <pganssle@users.noreply.github.com> * Removed the need to initialize macro change all the `int macro = 0` to `int macro`; now that macro is required Co-Authored-By: Paul Ganssle <pganssle@users.noreply.github.com> * Removed the need to initialize macro change all the `int macro = 0` to `int macro`; now that macro is required Co-Authored-By: Paul Ganssle <pganssle@users.noreply.github.com> * Removed the need to initialize macro change all the `int macro = 0` to `int macro`; now that macro is required Co-Authored-By: Paul Ganssle <pganssle@users.noreply.github.com>
* bpo-33524: Fix the folding of email header when max_line_length is 0 or None ↵Abhilash Raj2019-05-174-2/+20
| | | | | (#13391) and there are non-ascii characters in the header.