summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)Ivan Levkivskyi2019-02-171-1/+8
| | | | Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional.
* bpo-36013: delete fragile interactive shell SIGINT test (GH-11902)Gregory P. Smith2019-02-171-33/+7
| | | | | It makes the existing smaller test more readable and robust at the same time. The execution of a shell in interactive mode from CI and buildbot test automation wasn't working out. What would work locally in our terminals would only work within a fraction of automation systems. The integration test was a nice to have. painful. deleting. :)
* Convert range to repeat for choices() (#11889)Raymond Hettinger2019-02-161-3/+3
|
* bpo-1054041: Exit properly after an uncaught ^C. (#11862)Gregory P. Smith2019-02-161-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-1054041: Exit properly by a signal after a ^C. An uncaught KeyboardInterrupt exception means the user pressed ^C and our code did not handle it. Programs that install SIGINT handlers are supposed to reraise the SIGINT signal to the SIG_DFL handler in order to exit in a manner that their calling process can detect that they died due to a Ctrl-C. https://www.cons.org/cracauer/sigint.html After this change on POSIX systems while true; do python -c 'import time; time.sleep(23)'; done can be stopped via a simple Ctrl-C instead of the shell infinitely restarting a new python process. What to do on Windows, or if anything needs to be done there has not yet been determined. That belongs in its own PR. TODO(gpshead): A unittest for this behavior is still needed. * Do the unhandled ^C check after pymain_free. * Return STATUS_CONTROL_C_EXIT on Windows. * Fix ifdef around unistd.h include. * 📜🤖 Added by blurb_it. * Add STATUS_CTRL_C_EXIT to the os module on Windows * Add unittests. * Don't send CTRL_C_EVENT in the Windows test. It was causing CI systems to bail out of the entire test suite. See https://dev.azure.com/Python/cpython/_build/results?buildId=37980 for example. * Correct posix test (fail on macOS?) check. * STATUS_CONTROL_C_EXIT must be unsigned. * Improve the error message. * test typo :) * Skip if the bash version is too old. ...and rename the windows test to reflect what it does. * min bash version is 4.4, detect no bash. * restore a blank line i didn't mean to delete. * PyErr_Occurred() before the Py_DECREF(co); * Don't add os.STATUS_CONTROL_C_EXIT as a constant. * Update the Windows test comment. * Refactor common logic into a run_eval_code_obj fn.
* bpo-15248: Emit a compiler warning when missed a comma before tuple or list. ↵Serhiy Storchaka2019-02-161-0/+87
| | | | (GH-11757)
* bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)Daniel Hahler2019-02-152-1/+15
| | | | | | | | Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt. This patch fixes this by pre-compiling the code before passing it to `Pdb.run`. https://bugs.python.org/issue35931
* bpo-35994: add sub dir for sub2_tree in os.walk test if symlink is not ↵pxinwr2019-02-151-1/+1
| | | | | supported (GH-11853) https://bugs.python.org/issue35994
* bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission ↵Michael Felt2019-02-141-0/+4
| | | | | | | | | | | | denied" on AIX (GH-11424) [bpo-35633](https://bugs.python.org/issue35633): Fix a test regression introduced with [bpo-35189](https://bugs.python.org/issue35189) (PEP 475: fnctl functions are not retried if interrupted (EINTR)). Not only a blocking IO error needs to be ignored - permission errors also need to be ignored. p.s. - iirc as a "test" only correction a NEWS item is not required. If this is not correct - just mention, and I'll add a NEWS blurb. https://bugs.python.org/issue35633
* bpo-35500: align expected and actual calls on mock.assert_called_with error ↵Susan Su2019-02-142-9/+13
| | | | message. (GH-11804)
* bpo-35887: Add make regen-importlib step to importlib._bootstrap docstring ↵Nina Zakharenko2019-02-131-3/+3
| | | | (GH-11777)
* bpo-18283: Add support for bytes to shutil.which (GH-11818)Cheryl Sabella2019-02-132-14/+41
|
* Be consistent about the use of from-imports in random module (GH-11837)Raymond Hettinger2019-02-131-4/+4
| | | Minor code clean-up.
* bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP ↵Matěj Cepl2019-02-121-0/+10
| | | | | | port (GH-11823) Make test_imap4_host_default_value independent on whether the local IMAP server is running.
* bpo-35972: _xxsubinterpreters: Fix potential integer truncation on 32-bit in ↵Alexey Izbyshev2019-02-121-1/+13
| | | | channel_send() (gh-11822)
* bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815)Christopher Hunt2019-02-122-3/+13
|
* bpo-35918: Remove broken has_key method and add test (#11819)Rémi Lapeyre2019-02-122-3/+1
|
* bpo-35378: Fix multiprocessing.Pool references (GH-11627)Pablo Galindo2019-02-112-39/+74
| | | | | | | | | Changes in this commit: 1. Use a _strong_ reference between the Pool and associated iterators 2. Rework PR #8450 to eliminate a cycle in the Pool. There is no test in this commit because any test that automatically tests this behaviour needs to eliminate the pool before joining the pool to check that the pool object is garbaged collected/does not hang. But doing this will potentially leak threads and processes (see https://bugs.python.org/issue35413).
* bpo-22062: Updated docstring and documentation for pathlib (GH-8519)Eivind Teig2019-02-111-2/+3
| | | | | | Original patch by Mike Short https://bugs.python.org/issue22062
* Fix division by 0 when checking for overflow in math.prod (GH-11808)Pablo Galindo2019-02-101-0/+4
|
* Make sure the BaseManager in test_multiprocessing is cleaned up correctly ↵Pablo Galindo2019-02-091-15/+20
| | | | (GH-11653)
* Do not retain references to processes and managers in TestSyncManagerTypes ↵Pablo Galindo2019-02-091-0/+2
| | | | | (GH-11801) Keeping references to processes and managers between tests makes them count as dangling processes.
* bpo-35833: Revise IDLE doc for control codes sent to Shell. (GH-11799)Terry Jan Reedy2019-02-092-14/+34
| | | Add a code example block.
* Rework tuple hash tests. (GH-10161)Tim Peters2019-02-082-84/+308
| | | Add tooling that will useful in future updates, paying particular attention to difficult cases where only the upper bits on the input vary.
* Complete and neaten-up namedtuple's replacement of builtin function lookups ↵Raymond Hettinger2019-02-081-6/+3
| | | | with derefs (GH-11794)
* bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384)Fish2019-02-072-16/+102
| | | | | | | | | | Protect dict iterations by wrapping them with _IterationGuard in the following methods: - WeakValueDictionary.copy() - WeakValueDictionary.__deepcopy__() - WeakKeyDictionary.copy() - WeakKeyDictionary.__deepcopy__()
* bpo-35911: add cell constructor (GH-11771)Pierre Glaser2019-02-072-0/+16
| | | | Add a cell constructor, expose the cell type in the types module.
* bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred ↵Jason R. Coombs2019-02-072-23/+75
| | | | | | | address based on the bind parameter. (#11767) In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter. As a result, now IPv6 is used as the default (including IPv4 on dual-stack systems). Enhanced tests.
* bpo-35917: Test multiprocessing manager classes and shareable types (GH-11772)Giampaolo Rodola2019-02-071-0/+246
| | | | multiprocessing: provide unittests for manager classes and shareable types
* bpo-35606: Implement math.prod (GH-11359)Pablo Galindo2019-02-071-0/+31
|
* email: use dict instead of OrderedDict (GH-11709)Inada Naoki2019-02-051-2/+1
|
* asyncio: use dict instead of OrderedDict (GH-11710)Inada Naoki2019-02-051-1/+1
|
* bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744)Steve Dower2019-02-054-13/+36
|
* bpo-35321: Set the spec origin to frozen in frozen modules (#11732)Nina Zakharenko2019-02-052-2/+15
| | | | | | | | | | * bpo-35321: Set the spec origin to frozen in frozen modules This fix correctly sets the spec origin to "frozen" for the _frozen_importlib module. Note that the origin was already correctly set in _frozen_importlib_external. * 📜🤖 Added by blurb_it.
* bpo-32417: Make timedelta arithmetic respect subclasses (#10902)Paul Ganssle2019-02-042-15/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | * Make timedelta return subclass types Previously timedelta would always return the `date` and `datetime` types, regardless of what it is added to. This makes it return an object of the type it was added to. * Add tests for timedelta arithmetic on subclasses * Make pure python timedelta return subclass types * Add test for fromtimestamp with tz argument * Add tests for subclass behavior in now * Add news entry. Fixes: bpo-32417 bpo-35364 * More descriptive variable names in tests Addresses Victor's comments
* Merge tag 'v3.8.0a1'Łukasz Langa2019-02-041-827/+1128
|\ | | | | | | Python 3.8.0a1
| * [pydoc] Regenerate topics for v3.8.0a1Łukasz Langa2019-02-031-827/+1128
| |
* | bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)Steve Dower2019-02-045-23/+31
| | | | | | | | After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use. Make the same changes for macOS to avoid extra platform checks.
* | bpo-35692: pathlib no longer raises when checking file and directory ↵Steve Dower2019-02-041-9/+18
|/ | | | existence on drives that are not ready (GH-11746)
* bpo-29734: nt._getfinalpathname handle leak (GH-740)Mark Becwar2019-02-021-0/+56
| | | Make sure that failure paths call CloseHandle outside of the function that failed
* bpo-35845: Add order={'C', 'F', 'A'} parameter to memoryview.tobytes(). (#11730)Stefan Krah2019-02-021-0/+15
|
* bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one ↵Tzu-ping Chung2019-02-021-2/+25
| | | | | | character (GH-4517) Add one char to MsiSummaryInfoGetProperty() output Based on the patch in bpo-1104 by Anthony Tuininga (atuining) and Mark McMahon (markm).
* bpo-35813: Added shared_memory submodule of multiprocessing. (#11664)Davin Potts2019-02-021-0/+573
| | | Added shared_memory submodule to multiprocessing in time for first alpha with cross-platform tests soon to follow.
* bpo-35877: Add test for while loop named expression without parentheses ↵Emily Morehouse2019-02-011-1/+7
| | | | (GH-11726)
* bpo-35877: Make parenthesis optional for named expression in while statement ↵Xtreak2019-02-011-0/+1
| | | | | | | | (GH-11724) * Add parenthesis optional in named expressions for while statement * Add NEWS entry
* bpo-35864: fix namedtuple._asdict() docstring (GH-11720)Amador Pahim2019-02-011-1/+1
|
* bpo-35861: Fix SyntaxWarning in test_named_expressions.py (GH-11722)Joannah Nanjekye2019-02-011-1/+1
|
* bpo-35537: Skip test_start_new_session() of posix_spawn (GH-11718)Victor Stinner2019-02-011-0/+2
| | | The test fails. Skip the test until a fix can be found.
* bpo-35537: Add setsid parameter to os.posix_spawn() and os.posix_spawnp() ↵Joannah Nanjekye2019-02-011-0/+16
| | | | (GH-11608)
* Consistently move the misses update to just before the user function call ↵Raymond Hettinger2019-01-311-3/+3
| | | | (GH-11715)
* bpo-35766: Merge typed_ast back into CPython (GH-11645)Guido van Rossum2019-01-316-73/+380
|