summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)Neil Schemenauer2019-07-223-1/+61
| | | | | | | | | | | | Reduce the number of unit tests run for the PGO generation task. This speeds up the task by a factor of about 15x. Running the full unit test suite is slow. This change may result in a slightly less optimized build since not as many code branches will be executed. If you are willing to wait for the much slower build, the old behavior can be restored using './configure [..] PROFILE_TASK="-m test --pgo-extended"'. We make no guarantees as to which PGO task set produces a faster build. Users who care should run their own relevant benchmarks as results can depend on the environment, workload, and compiler tool chain.
* bpo-21478: Record calls to parent when autospecced objects are used as child ↵Xtreak2019-07-222-11/+53
| | | | | | | | | | | | | | with attach_mock (GH 14688) * Clear name and parent of mock in autospecced objects used with attach_mock * Add NEWS entry * Fix reversed order of comparison * Test child and standalone function calls * Use a helper function extracting mock to avoid code duplication and refactor tests.
* Fix typos in docs, comments and test assert messages (#14872)Min ho Kim2019-07-2112-15/+15
|
* Fix typo found by Min ho Kim (#14879)Terry Jan Reedy2019-07-211-1/+1
|
* Minor whitespace, indentation, and quoting changes to improve internal ↵Raymond Hettinger2019-07-211-53/+74
| | | | consistency and appease linters (GH-14888)
* bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)Ngalim Siregar2019-07-213-10/+19
| | | Repeat the command line arguments most recently entered before so the user can edit them.
* bpo-36324: Make internal attributes for statistics.NormalDist() private. ↵Raymond Hettinger2019-07-212-49/+55
| | | | | | | | | | | | (GH-14871) * Make internals private * Finish making mu and sigma private * Add missing __hash__() method * Add blurb
* bpo-37476: Adding tests for asutf8 and asutf8andsize (GH-14531)Hai Shi2019-07-201-0/+28
|
* bpo-36546: Clean-up comments (GH-14857)Raymond Hettinger2019-07-191-9/+3
|
* bpo-33610: IDLE's code-context always shows current context immediately ↵Tal Einat2019-07-182-7/+21
| | | | | | | (GH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show.
* bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. ↵Walter Dörwald2019-07-182-10/+11
| | | | | (GH-14809) * Use __qualname__ instead of __name__ in enum exception messages.
* bpo-37552: Skip failing tests in strptime/strftime with UCRT version ↵Paul Monson2019-07-183-1/+32
| | | | | 17763.615 (#14460) A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.
* bpo-36390: Gather IDLE Format menu functions into format.py (#14827)Terry Jan Reedy2019-07-185-114/+112
| | | | | | Add two indent spec methods from editor and Rstrip to existing file. Tests are not added for indent methods because they need change in lights of 3.x's prohibition on mixing tabs and spaces.
* bpo-34155: Dont parse domains containing @ (GH-13079)jpic2019-07-174-1/+36
| | | | | | | | | | | | | | | | | | | | | | Before: >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses (Address(display_name='', username='a', domain='malicious.org'),) >>> parseaddr('a@malicious.org@important.com') ('', 'a@malicious.org') After: >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses (Address(display_name='', username='', domain=''),) >>> parseaddr('a@malicious.org@important.com') ('', 'a@') https://bugs.python.org/issue34155
* Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)Abhilash Raj2019-07-172-1/+5
| | | | This exception was caused because the input ended unexpectedly with only one single quote instead of a pair with some value inside it.
* bpo-37461: Fix infinite loop in parsing of specially crafted email headers ↵Abhilash Raj2019-07-172-0/+10
| | | | | | | | | | (GH-14794) * bpo-37461: Fix infinite loop in parsing of specially crafted email headers. Some crafted email header would cause the get_parameter method to run in an infinite loop causing a DoS attack surface when parsing those headers. This patch fixes that by making sure the DQUOTE character is handled to prevent going into an infinite loop.
* bpo-36390: IDLE: Combine region formatting methods. (GH-12481)Cheryl Sabella2019-07-176-327/+587
| | | | | Rename paragraph.py to format.py and add region formatting methods from editor.py. Add tests for the latter.
* bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)Tal Einat2019-07-174-99/+137
| | | | | | | | | | | * Only create CodeContext instances for "real" editors windows, but not e.g. shell or output windows. * Remove configuration update Tk event fired every second, by having the editor window ask its code context widget to update when necessary, i.e. upon font or highlighting updates. * When code context isn't being shown, avoid having a Tk event fired every 100ms to check whether the code context needs to be updated. * Use the editor window's getlineno() method where applicable. * Update font of the code context widget before the main text widget
* bpo-27452: IDLE: Cleanup config.py code (GH-14577)Cheryl Sabella2019-07-162-39/+9
|
* Fix infinite loop in email folding logic (GH-12732)Paul Ganssle2019-07-163-6/+32
| | | | | | | | | | As far as I can tell, this infinite loop would be triggered if: 1. The value being folded contains a single word (no spaces) longer than max_line_length 2. The max_line_length is shorter than the encoding's name + 9 characters. bpo-36564: https://bugs.python.org/issue36564
* bpo-37500: Make sure dead code does not generate bytecode but also detect ↵Pablo Galindo2019-07-153-13/+110
| | | | | | | | | | | | syntax errors (GH-14612) https://bugs.python.org/issue37500 Add a new field to the compiler structure that allows to be configured so no bytecode is emitted. In this way is possible to detect errors by walking the nodes while preserving optimizations. https://bugs.python.org/issue37500
* bpo-37593: Swap the positions of posonlyargs and args in the constructor of ↵Pablo Galindo2019-07-142-16/+18
| | | | | ast.parameters nodes (GH-14778) https://bugs.python.org/issue37593
* bpo-37473: Don't import importlib ASAP in tests (GH-14661)Victor Stinner2019-07-143-15/+7
| | | | | | | | | bpo-15386, bpo-37473: test_import, regrtest and libregrtest no longer import importlib as soon as possible, as the first import, "to test bpo-15386". It is tested by test_import.test_there_can_be_only_one(). Sort test_import imports.
* Clarify that plistlib's load and dump functions take a binary file object ↵Collin Styles2019-07-141-3/+3
| | | | | | | | | | | (GH-9825) The documentation says that the fp parameter to plistlib.load "should be a readable and binary file object" but the docstring only mentions that it should be readable. Similarly, plistlib.dump's docstring only mentions "writable". This commit clarifies that fp should also be binary. https://docs.python.org/3/library/plistlib.html#plistlib.load https://docs.python.org/3/library/plistlib.html#plistlib.dump
* bpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 ↵Paul Monson2019-07-141-1/+2
| | | | (GH-14716)
* bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)Zac Hatfield-Dodds2019-07-142-1/+20
| | | | | | | | | | | The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing. However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`). Checking the argument for a leading `--` before rejecting it fixes this. This was prompted by pytest-dev/pytest#5469, so a backport to at least 3.8 would be great :smile: And this is my first PR to CPython, so please let me know if I've missed anything! https://bugs.python.org/issue26967
* bpo-37579: Improve equality behavior for pure Python datetime and time ↵Xtreak2019-07-132-2/+22
| | | | | | | | | | (GH-14726) Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation. This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation. bpo-37579
* closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268)gescheit2019-07-131-58/+13
|
* bpo-19696: Move threaded_import_hangers (GH-14655)Kyle Stanley2019-07-122-3/+3
| | | | | | | | | Move `threaded_import_hangers`, a dependency of `test_threaded_import`, to the directory `test_importlib/`. Also update the import references for `threaded_import_hangers` in `test_threaded_import`. https://bugs.python.org/issue19696
* closes bpo-37566: Remove _realsocket from socket.py. (GH-14711)Hai Shi2019-07-121-2/+0
|
* bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)Jakub Kulík2019-07-111-1/+1
| | | | | | With the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. The reason seems to be incorrect name handling which results in two slashes being prepended. https://bugs.python.org/issue37558
* bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)Tal Einat2019-07-112-23/+77
|
* bpo-26806: IDLE should run without docstrings (#14657)Terry Jan Reedy2019-07-092-8/+19
| | | After fcf1d00, IDLE startup failed with python compiled without docstrings.
* bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)Victor Stinner2019-07-091-15/+18
| | | | | | test_ssl.test_pha_required_nocert() now uses support.catch_threading_exception() to ignore the expected SSLError in ConnectionHandler of ThreadedEchoServer (it is only raised sometimes on Windows).
* bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)Carl Friedrich Bolz-Tereick2019-07-091-4/+4
|
* Revert "bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning ↵Victor Stinner2019-07-091-1/+0
| | | | | (GH-14662)" (GH-14669) This reverts commit cf9c41c422de3774862db964fe3153086bad3f61.
* bpo-37526: Add support.catch_threading_exception() (GH-14664)Victor Stinner2019-07-091-0/+57
| | | | Context manager catching threading.Thread exception using threading.excepthook.
* bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)Victor Stinner2019-07-091-0/+1
| | | | Close the TLS connection in test_pha_required_nocert() of test_ssl to fix a ResourceWarning.
* bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)Carl Friedrich Bolz-Tereick2019-07-081-0/+30
| | | | | Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the correct st node to copy the line and col_offset from in ast.c.
* bpo-37421: test_concurrent_futures stops ForkServer (GH-14643)Victor Stinner2019-07-081-0/+3
| | | | test_concurrent_futures now explicitly stops the ForkServer instance if it's running.
* bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638)Jason R. Coombs2019-07-072-1/+12
| | | | | | * bpo-37520: Correct behavior for zipfile.Path.parent * 📜🤖 Added by blurb_it.
* bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)Tal Einat2019-07-064-135/+173
| | | | | | | | This is done to compensate for the extra stack frames added by IDLE itself, which cause problems when setting the recursion limit to low values. This wraps sys.setrecursionlimit() and sys.getrecursionlimit() as invisibly as possible.
* Move test_threaded_import.py to test_importlib/ (GH-14582)Kyle Stanley2019-07-051-0/+0
|
* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)Victor Stinner2019-07-052-0/+25
| | | | | multiprocessing tests now stop the ForkServer instance if it's running: close the "alive" file descriptor to ask the server to stop and then remove its UNIX address.
* bpo-36974: separate vectorcall functions for each calling convention (GH-13781)Jeroen Demeyer2019-07-052-4/+6
|
* bpo-37481: Deprecate distutils bdist_wininst command (GH-14553)Victor Stinner2019-07-052-3/+12
| | | | The distutils bdist_wininst command is now deprecated, use bdist_wheel (wheel packages) instead.
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden ↵thatneat2019-07-042-3/+55
| | | | | __str__ (GH-14545) * bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__
* bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572)Victor Stinner2019-07-041-1/+13
| | | | | | Fix multiprocessing.util.get_temp_dir() finalizer: clear also the 'tempdir' configuration of the current process, so next call to get_temp_dir() will create a new temporary directory, rather than reusing the removed temporary directory.
* bpo-19696: Replace deprecated method in "test_import_pkg.py" (GH-14466)Kyle Stanley2019-07-031-2/+2
| | | | | | | | | Replacing the deprecated method "random.choose" to "random.choice" was technically not part of the original issue. However, it was discussed in the talk page and involved one of the files being moved. I assumed this was too minor to justify the creation of a separate issue. Also, I added my name to the contributors list in Misc/ACKS. This will be my third PR to cpython, forgot to do it in the previous ones. https://bugs.python.org/issue19696
* bpo-37421: Fix test_distutils.test_build_ext() (GH-14564)Victor Stinner2019-07-032-23/+33
| | | | | test_distutils.test_build_ext() is now able to remove the temporary directory on Windows: don't import the newly built C extension ("xx") in the current process, but test it in a separated process.