summaryrefslogtreecommitdiff
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-39485: fix corner-case in method-detection of mock (GH-18252)Carl Friedrich Bolz-Tereick2020-01-291-5/+1
| | | | | | | | | | | | | | Replace check for whether something is a method in the mock module. The previous version fails on PyPy, because there no method wrappers exist (everything looks like a regular Python-defined function). Thus the isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check returns True for any descriptor, not just methods. This condition could also return erroneously True in CPython for C-defined descriptors. Instead to decide whether something is a method, just check directly whether it's a function defined on the class. This passes all tests on CPython and fixes the bug on PyPy.
* bpo-39460: Fix test_zipfile.test_add_file_after_2107() (GH-18247)Victor Stinner2020-01-291-0/+12
| | | | | | | | XFS filesystem is limited to 32-bit timestamp, but the utimensat() syscall doesn't fail. Moreover, there is a VFS bug which returns a cached timestamp which is different than the value on disk. https://bugzilla.redhat.com/show_bug.cgi?id=1795576 https://bugs.python.org/issue39460#msg360952
* bpo-36051: Drop GIL during large bytes.join() (GH-17757)Bruce Merry2020-01-291-2/+6
| | | | | Improve multi-threaded performance by dropping the GIL in the fast path of bytes.join. To avoid increasing overhead for small joins, it is only done if the output size exceeds a threshold.
* bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412)Rémi Lapeyre2020-01-282-21/+23
|
* bpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158)Adam Meily2020-01-281-1/+1
|
* bpo-38883: Don't use POSIX `$HOME` in `pathlib.Path.home/expanduser` on ↵Christoph Reiter2020-01-282-11/+15
| | | | | | | | | Windows (GH-17961) In bpo-36264 os.path.expanduser was changed to ignore HOME on Windows. Path.expanduser/home still honored HOME despite being documented as behaving the same as os.path.expanduser. This makes them also ignore HOME so that both implementations behave the same way again.
* bpo-39205: Tests that highlight a hang on ProcessPoolExecutor shutdown (#18221)Brian Quinlan2020-01-271-0/+20
|
* bpo-30780: Add IDLE configdialog tests (#3592)Cheryl Sabella2020-01-273-31/+148
| | | | | | | Expose dialog buttons to test code and complete their test coverage. Complete test coverage for highlights and keys tabs. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-39459: test.pythoninfo logs effective uid/gid (GH-18203)Victor Stinner2020-01-271-9/+14
| | | Fix also umask formatting: use octal prefix.
* bpo-39453: Add testcase for bpo-39453 (GH-18202)Dong-hee Na2020-01-271-0/+2
| | | | | | | | | https://bugs.python.org/issue39453 Automerge-Triggered-By: @pablogsal Automerge-Triggered-By: @pablogsal
* bpo-39453: Make list.__contains__ hold strong references to avoid crashes ↵Dong-hee Na2020-01-271-0/+5
| | | | (GH-18181)
* Clarify and fix assertions that mocks have not been awaited (GH-18196)Chris Withers2020-01-272-27/+30
| | | | | - The gc.collect is needed for other implementations, such as pypy - Using context managers over multiple lines will only catch the warning from the first line in the context! - remove a skip for a test that no longer fails on pypy
* Use relative imports in mock and its tests to help backporting (GH-18197)Chris Withers2020-01-273-79/+82
| | | | | | | | * asyncio.run only available in 3.8+ * iscoroutinefunction has important bungfixes in 3.8 * IsolatedAsyncioTestCase only available in 3.8+
* Fix so that test.test_distutils can be executed by unittest and not just ↵Toshio Kuratomi2020-01-271-0/+6
| | | | regrtest (GH-13480)
* bpo-39320: Handle unpacking of **values in compiler (GH-18141)Mark Shannon2020-01-272-4/+4
| | | | | | | | | | | | | * Add DICT_UPDATE and DICT_MERGE bytecodes. Use them for ** unpacking. * Remove BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL, as they are now unused. * Update magic number for ** unpacking opcodes. * Update dis.rst to incorporate new bytecodes. * Add blurb entry.
* bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock ↵Karthikeyan Singaravelan2020-01-272-0/+53
| | | | (#16029)
* Fix linecache.py add lazycache to __all__ and use dict.clear to clear the ↵加和2020-01-251-18/+18
| | | | cache (GH-4641)
* bpo-38932: Mock fully resets child objects on reset_mock(). (GH-17409)Vegard Stikbakke2020-01-252-2/+14
|
* Merge tag 'v3.9.0a3'Łukasz Langa2020-01-251-52/+115
|\ | | | | | | Python 3.9.0a3
| * Python 3.9.0a3v3.9.0a3Łukasz Langa2020-01-241-52/+115
| |
* | bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521)Paulo Henrique Silva2020-01-251-1/+2
| |
* | bpo-39082: Allow AsyncMock to correctly patch static/class methods (GH-18116)Matthew Kokotovich2020-01-252-0/+25
| |
* | bpo-39388: IDLE: Fix bug when cancelling out of configdialog (GH-18068)Cheryl Sabella2020-01-253-8/+18
|/ | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161)Serhiy Storchaka2020-01-241-10/+8
| | | Use `from ... import ...` to ensure module is fully loaded before accessing its attributes.
* bpo-39390 shutil: fix argument types for ignore callback (GH-18122)mbarkhau2020-01-242-1/+43
|
* bpo-38473: Handle autospecced functions and methods used with attach_mock ↵Karthikeyan Singaravelan2020-01-242-0/+33
| | | | (GH-16784)
* bpo-39395: putenv() and unsetenv() always available (GH-18135)Victor Stinner2020-01-243-31/+6
| | | | | | | | The os.putenv() and os.unsetenv() functions are now always available. On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. Remove putenv_dict from posixmodule.c: it's not longer needed.
* bpo-39413: Implement os.unsetenv() on Windows (GH-18163)Victor Stinner2020-01-241-8/+35
| | | The os.unsetenv() function is now also available on Windows.
* bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)Mark Dickinson2020-01-241-3/+3
| | | | | | Some portions of the pickle documentation hadn't been updated for the pickle protocol changes in Python 3.8 (new protocol 5, default protocol 4). This PR fixes those docs. https://bugs.python.org/issue39426
* Fix `mock.patch.dict` to be stopped with `mock.patch.stopall` (#17606)Mario Corchero2020-01-242-2/+67
| | | | | As the function was not registering in the active patches, the mocks started by `mock.patch.dict` were not being stopped when `mock.patch.stopall` was being called.
* bpo-24928: Add test case for patch.dict using OrderedDict (GH -11437)Emmanuel Arias2020-01-241-0/+20
| | | | | * add test for path.dict using OrderedDict Co-authored-by: Yu Tomita nekobon@users.noreply.github.com
* bpo-17005: Add a class to perform topological sorting to the standard ↵Pablo Galindo2020-01-232-3/+520
| | | | | library (GH-11583) Co-Authored-By: Tim Peters <tim.peters@gmail.com>
* bpo-39421: Fix posible crash in heapq with custom comparison operators ↵Pablo Galindo2020-01-231-0/+31
| | | | | | | | | | (GH-18118) * bpo-39421: Fix posible crash in heapq with custom comparison operators * fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators * fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
* bpo-39320: Handle unpacking of *values in compiler (GH-17984)Mark Shannon2020-01-233-7/+9
| | | | | | | | * Add three new bytecodes: LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE. Use them to implement star unpacking expressions. * Remove four bytecodes BUILD_LIST_UNPACK, BUILD_TUPLE_UNPACK, BUILD_SET_UNPACK and BUILD_TUPLE_UNPACK_WITH_CALL opcodes as they are now unused. * Update magic number and dis.rst for new bytecodes.
* bpo-32989: IDLE - remove unneeded parameter (GH-18138)Terry Jan Reedy2020-01-222-2/+3
| | | | | IDLE does not pass a non-default _synchre in any of its calls to pyparse.find_good_parse_start.
* bpo-39050: The Help button in IDLE's config menu works again (GH-17611)Zackery Spytz2020-01-223-1/+14
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-29435: Allow is_tarfile to take a filelike obj (GH-18090)William Woodruff2020-01-222-1/+38
| | | `is_tarfile()` now supports `name` being a file or file-like object.
* bpo-39336: Allow packages to not let their child modules be set on them (#18006)Dino Viehland2020-01-224-1/+32
| | | | | * bpo-39336: Allow setattr to fail on modules which aren't assignable When attaching a child module to a package if the object in sys.modules raises an AttributeError (e.g. because it is immutable) it causes the whole import to fail. This now allows immutable packages to exist and an ImportWarning is reported and the AttributeError exception is ignored.
* bpo-35182: fix communicate() crash after child closes its pipes (GH-17020) ↵Alex Rebert2020-01-222-2/+13
| | | | | | | | | (GH-18117) When communicate() is called in a loop, it crashes when the child process has already closed any piped standard stream, but still continues to be running Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>
* bpo-39366: Remove xpath() and xgtitle() methods of NNTP (GH-18035)Dong-hee Na2020-01-231-39/+0
|
* Revert "bpo-39413: Implement os.unsetenv() on Windows (GH-18104)" (GH-18124)Victor Stinner2020-01-221-3/+8
| | | This reverts commit 56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8.
* bpo-39353: Deprecate the binhex module (GH-18025)Victor Stinner2020-01-223-13/+62
| | | | | | | | Deprecate binhex4 and hexbin4 standards. Deprecate the binhex module and the following binascii functions: * b2a_hqx(), a2b_hqx() * rlecode_hqx(), rledecode_hqx() * crc_hqx()
* bpo-39413: Implement os.unsetenv() on Windows (GH-18104)Victor Stinner2020-01-211-8/+3
| | | | | The os.unsetenv() function is now also available on Windows. It is implemented with SetEnvironmentVariableW(name, NULL).
* Move test_math tests (GH-18098)Victor Stinner2020-01-211-148/+148
| | | | | testPerm() and testComb() belong to MathTests, not to IsCloseTests(). test_nextafter() and test_ulp() now use assertIsNaN().
* bpo-39389: gzip: fix compression level metadata (GH-18077)William Chargin2020-01-212-3/+29
| | | | | | As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a gzip member header should indicate whether the DEFLATE algorithm was tuned for speed or compression ratio. Prior to this patch, archives emitted by the `gzip` module always indicated maximum compression.
* bpo-39396: Fix math.nextafter(-0.0, +0.0) on AIX 7.1 (GH-18094)Victor Stinner2020-01-211-77/+77
| | | | Move also math.nextafter() on math.ulp() tests from IsCloseTests to MathTests.
* bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)Cheryl Sabella2020-01-215-39/+152
| | | | | | | | Fix comments and add tests for editor newline_and_indent_event method. Remove unused None default for function parameter of pyparse find_good_parse_start method and code triggered by that default. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-39386: Prevent double awaiting of async iterator (GH-18081)Andrew Svetlov2020-01-211-0/+36
|
* bpo-39377: json: Remove the encoding option. (GH-18075)Inada Naoki2020-01-202-15/+0
|
* bpo-38536: locale: Remove trailing space in formatted currency (GH-16864)Inada Naoki2020-01-202-2/+3
|