summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30290: IDLE: Add more tests for help_about dialog (#1697)mlouielu2017-05-212-28/+99
| | | Increases coverage to 99%
* bpo-30415: Add new tests for the fnmatch module. (#1684)Serhiy Storchaka2017-05-211-9/+55
|
* #30014: refactor poll-related classes (#1035)Giampaolo Rodola2017-05-201-132/+84
| | | | | | | | | | | | | | | | * #30014: refactor poll-related classes so that poll(), epoll() and devpoll() share the same methods for register(), unregister(), close() and select() * remove unused attribute * use specific class attributes instead of select.* constants * have all classes except SelectSelector a _selector attribute * BaseException -> Exception * be explicit in defining a close() method only for selectors which have it * fix AttributeError
* bpo-27945: Fixed various segfaults with dict. (#1657)Serhiy Storchaka2017-05-201-0/+85
| | | | Based on patches by Duane Griffin and Tim Mitchell.
* bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (#1652)Serhiy Storchaka2017-05-201-0/+27
| | | | Based on patch by Eryk Sun.
* Fix typos in multiple `.rst` files (#1668)delirious-lettuce2017-05-191-1/+1
|
* Remove duplicate line in Lib/http/client.py (#1665)remitamine2017-05-191-1/+0
|
* bpo-27103: regrtest disables -W if -R is used (#1651)Victor Stinner2017-05-181-0/+5
| | | Workaround for a regrtest bug.
* bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)Jon Dufresne2017-05-1816-35/+28
| | | | | | | | * Replaced list(<generator expression>) with list comprehension * Replaced dict(<generator expression>) with dict comprehension * Replaced set(<list literal>) with set literal * Replaced builtin func(<list comprehension>) with func(<generator expression>) when supported (e.g. any(), all(), tuple(), min(), & max())
* bpo-29976: urllib.parse clarify '' in scheme values. (GH-984)Senthil Kumaran2017-05-181-11/+19
|
* IDLE test_textview: add comments and test, increase coverage to 100% (#1641)terryjreedy2017-05-182-9/+25
|
* bpo-30303: IDLE: Add _utest argument to textview (#1499)Louie Lu2017-05-172-11/+57
|
* bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081)Nathaniel J. Smith2017-05-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a chain of generators/coroutines that are 'yield from'ing each other, then resuming the stack works like: - call send() on the outermost generator - this enters _PyEval_EvalFrameDefault, which re-executes the YIELD_FROM opcode - which calls send() on the next generator - which enters _PyEval_EvalFrameDefault, which re-executes the YIELD_FROM opcode - ...etc. However, every time we enter _PyEval_EvalFrameDefault, the first thing we do is to check for pending signals, and if there are any then we run the signal handler. And if it raises an exception, then we immediately propagate that exception *instead* of starting to execute bytecode. This means that e.g. a SIGINT at the wrong moment can "break the chain" – it can be raised in the middle of our yield from chain, with the bottom part of the stack abandoned for the garbage collector. The fix is pretty simple: there's already a special case in _PyEval_EvalFrameEx where it skips running signal handlers if the next opcode is SETUP_FINALLY. (I don't see how this accomplishes anything useful, but that's another story.) If we extend this check to also skip running signal handlers when the next opcode is YIELD_FROM, then that closes the hole – now the exception can only be raised at the innermost stack frame. This shouldn't have any performance implications, because the opcode check happens inside the "slow path" after we've already determined that there's a pending signal or something similar for us to process; the vast majority of the time this isn't true and the new check doesn't run at all.
* bpo-30149: Fix partialmethod without explicit self parameter (#1308)Dong-hee Na2017-05-172-4/+44
|
* bpo-30387: Fix warning in test_threading (#1634)Victor Stinner2017-05-171-3/+5
| | | | | | | | | test_is_alive_after_fork() now joins directly the thread to avoid the following warning added by bpo-30357: Warning -- threading_cleanup() failed to cleanup 0 threads after 2 sec (count: 0, dangling: 21) Use also a different exit code to catch generic exit code 1.
* bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601)Xiang Zhang2017-05-172-0/+37
| | | | | Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could raise AttributeError due to not setting _poll in __setstate__.
* bpo-30211: bdb: add docstrings (#1350)csabella2017-05-161-18/+212
|
* bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595)Serhiy Storchaka2017-05-162-13/+25
| | | | | | Warnings emitted when compile a regular expression now always point to the line in the user code. Previously they could point into inners of the re module if emitted from inside of groups or conditionals.
* Remove unused variable in test_urllibnet. (#1598)Senthil Kumaran2017-05-161-1/+3
|
* bpo-30339: test_multiprocessing_main_handling timeout (#1593)Victor Stinner2017-05-151-1/+1
| | | | | test_multiprocessing_main_handling: increase the test_source timeout from 10 seconds to 60 seconds, since the test fails randomly on busy buildbots.
* bpo-30357: test_thread now uses threading_cleanup() (#1592)Victor Stinner2017-05-151-0/+4
| | | | | | | test_thread: setUp() now uses support.threading_setup() and support.threading_cleanup() to wait until threads complete to avoid random side effects on following tests. Co-Authored-By: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
* bpo-30329: Catch Windows error 10022 on shutdown() (#1538)Victor Stinner2017-05-152-6/+12
| | | | | | Catch the Windows socket WSAEINVAL error (code 10022) in imaplib and poplib on shutdown(SHUT_RDWR): An invalid operation was attempted This error occurs sometimes on SSL connections.
* bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488)Serhiy Storchaka2017-05-152-76/+10
| | | | | in the plistlib module. Dict values in the result of functions readPlist() and readPlistFromBytes() are now exact dicts.
* bpo-9850: Deprecate the macpath module (#1540)Victor Stinner2017-05-152-1/+11
| | | Co-Authored-By: Chi Hsuan Yen <yan12125@gmail.com>.
* bpo-30110: fix resource leak in test_asyncio.test_events (#1413)Xiang Zhang2017-05-151-1/+3
|
* bpo-29763: Clean up _pth tests (GH-954)Zachary Ware2017-05-141-46/+31
|
* bpo-30299: Display a bytecode when compile a regex in debug mode. (#1491)Serhiy Storchaka2017-05-142-1/+174
| | | | | `re.compile(..., re.DEBUG)` now displays the compiled bytecode in human readable form.
* bpo-30340: Enhanced regular expressions optimization. (#1542)Serhiy Storchaka2017-05-143-54/+92
| | | | This increased the performance of matching some patterns up to 25 times.
* bpo-30308: Code coverage for argument in random.shuffle (#1504)csabella2017-05-111-1/+11
| | | | | | | | * bpo-30308: Code coverage for argument in random.shuffle * bpo-30308: Code coverage for argument in random.shuffle * bpo-30308: Code coverage for argument in random.shuffle
* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097)INADA Naoki2017-05-112-1/+24
| | | | | | | | | | | | when there are no more `await` or `yield (from)` before return in coroutine, cancel was ignored. example: async def coro(): asyncio.Task.current_task().cancel() return 42 ... res = await coro() # should raise CancelledError
* #30190: fix invalid escape sequence warnings (#1534)Giampaolo Rodola2017-05-101-3/+3
|
* bpo-30298: Weaken the condition of deprecation warnings for inline ↵Serhiy Storchaka2017-05-102-21/+50
| | | | | | | | modifiers. (#1490) Now allowed several subsequential inline modifiers at the start of the pattern (e.g. '(?i)(?s)...'). In verbose mode whitespaces and comments now are allowed before and between inline modifiers (e.g. '(?x) (?i) (?s)...').
* bpo-30320: test_eintr now uses pthread_sigmask() (#1523)Victor Stinner2017-05-101-35/+26
| | | | | | | | | | | | Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using pthread_sigmask() to fix a race condition between the child and the parent process. Remove the pipe which was used as a weak workaround against the race condition. sigtimedwait() is now tested with a child process sending a signal instead of testing the timeout feature which is more unstable (especially regarding to clock resolution depending on the platform).
* bpo-30285: Optimize case-insensitive matching and searching (#1482)Serhiy Storchaka2017-05-092-69/+111
| | | | of regular expressions.
* bpo-30024: Circular imports involving absolute imports with binding (#1264)Serhiy Storchaka2017-05-093-0/+8
| | | a submodule to a name are now supported.
* bpo-30273: update distutils.sysconfig for venv's created from Python (#1515)Jeremy Kloth2017-05-091-5/+2
| | | compiled out-of-tree (builddir != srcdir). (see also bpo-15366)
* bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)Victor Stinner2017-05-092-1/+3
| | | | | | If the child process exited with a non-zero code, don't strip the last line of stdout anymore. Add also a sanity check in accumulate_result().
* bpo-29990: Fix range checking in GB18030 decoder (#1495)Xiang Zhang2017-05-091-0/+6
| | | When decoding a 4-byte GB18030 sequence, the first and third byte cannot exceed 0xFE.
* bpo-29979: Rewrite cgi.parse_multipart to make it consistent with ↵Pierre Quentel2017-05-082-93/+16
| | | | FieldStorage (#991)
* Revert bpo-26293 for zipfile breakage. See also bpo-29094. (#1484)Serhiy Storchaka2017-05-061-14/+13
|
* bpo-30218: support path-like objects in shutil.unpack_archive() (GH-1367)Jelle Zijlstra2017-05-052-4/+20
| | | Thanks to Jelle Zijlstra for the patch.
* bpo-30264: ExpatParser closes the source on error (#1451)Victor Stinner2017-05-052-17/+40
| | | | | | | | ExpatParser.parse() of xml.sax.xmlreader now always closes the source: close the file object or the urllib object if source is a string (not an open file-like object). The change fixes a ResourceWarning on parsing error. Add test_parse_close_source() unit test.
* bpo-30277: Replace _sre.getlower() with _sre.ascii_tolower() and ↵Serhiy Storchaka2017-05-052-23/+26
| | | | _sre.unicode_tolower(). (#1468)
* bpo-30215: Make re.compile() locale agnostic. (#1361)Serhiy Storchaka2017-05-054-20/+58
| | | | | | Compiled regular expression objects with the re.LOCALE flag no longer depend on the locale at compile time. Only the locale at matching time affects the result of matching.
* bpo-30273: Update sysconfig (#1464)Victor Stinner2017-05-041-1/+1
| | | | | | | | | | The AST_H_DIR variable was removed from Makefile.pre.in by the commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b (bpo-23404). AST_H_DIR was hardcoded to "Include", so replace the removed variable by its content. Remove also ASDLGEN variable from sysconfig example since this variable was also removed.
* bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (#1319)Antoine Pitrou2017-05-041-6/+14
| | | | | | * bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver * Tweak comment
* bpo-30263: regrtest: log system load (#1452)Victor Stinner2017-05-043-25/+39
| | | | | | | | * bpo-30263: regrtest: log system load * regrtest: log the number of CPUs Log the number of CPUs in the header. --verbose now imply --header.
* bpo-30166: Import command-line parsing modules only when needed. (#1293)Serhiy Storchaka2017-05-047-12/+20
|
* bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (#1316)Serhiy Storchaka2017-05-031-18/+41
|
* bpo-30103: Allow Uuencode in Python using backtick as zero instead of space ↵Xiang Zhang2017-05-033-51/+81
| | | | | | (#1326)