summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31324: Optimize support._match_test() (#4421)Victor Stinner2017-11-214-15/+111
| | | | | | | | | | | * Rename support._match_test() to support.match_test(): make it public * Remove support.match_tests global variable. It is replaced with a new support.set_match_tests() function, so match_test() doesn't have to check each time if patterns were modified. * Rewrite match_test(): use different code paths depending on the kind of patterns for best performances. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
* bpo-32089: Fix warnings filters in dev mode (#4482)Victor Stinner2017-11-211-6/+46
| | | | | | | | | | The developer mode (-X dev) now creates all default warnings filters to order filters in the correct order to always show ResourceWarning and make BytesWarning depend on the -b option. Write a functional test to make sure that ResourceWarning is logged twice at the same location in the developer mode. Add a new 'dev_mode' field to _PyCoreConfig.
* bpo-32094: Update subprocess for -X dev (#4480)Victor Stinner2017-11-201-1/+57
| | | | | | | | Modify subprocess._args_from_interpreter_flags() to handle -X dev option. Add also unit tests for test.support.args_from_interpreter_flags() and test.support.optim_args_from_interpreter_flags().
* bpo-32066: Support pathlib.Path in create_unix_connection; sock arg should ↵Yury Selivanov2017-11-201-2/+10
| | | | be optional (#4447)
* bpo-32088: Display Deprecation in debug mode (#4474)Victor Stinner2017-11-201-2/+5
| | | | | | | | When Python is build is debug mode (Py_DEBUG), DeprecationWarning, PendingDeprecationWarning and ImportWarning warnings are now displayed by default. test_venv: run "-m pip" and "-m ensurepip._uninstall" with -W ignore::DeprecationWarning since pip code is not part of Python.
* bpo-32047: -X dev enables asyncio debug mode (#4418)Victor Stinner2017-11-202-0/+8
| | | | The new -X dev command line option now also enables asyncio debug mode.
* Remove duplicated import from datetime tests (#4444)Riccardo Magliocchetti2017-11-201-2/+0
|
* bpo-32031: Fix pydoc `test_mixed_case_module_names_are_lower_cased` (GH-4441)xdegaye2017-11-181-1/+1
| | | When there is a symlink in the directory path of the standard library.
* bpo-29184: Skip test_socketserver tests on PermissionError raised by Android ↵xdegaye2017-11-181-5/+14
| | | | (GH-4387)
* bpo-32069: Drop legacy SSL transport (#4451)Andrew Svetlov2017-11-182-431/+0
| | | | | | | | | | * Drop legacy SSL transport * Drop unused import * Fix Windows tests * Drop never executed on Python 3.4+ code
* bpo-31702: Allow to specify rounds for SHA-2 hashing in crypt.mksalt(). (#4110)Serhiy Storchaka2017-11-161-15/+32
| | | | The log_rounds parameter for Blowfish has been replaced with the rounds parameter.
* bpo-32043: New "developer mode": "-X dev" option (#4413)Victor Stinner2017-11-161-14/+55
| | | | | | | | | | | | | Add a new "developer mode": new "-X dev" command line option to enable debug checks at runtime. Changes: * Add unit tests for -X dev * test_cmd_line: replace test.support with support. * Fix _PyRuntimeState_Fini(): Use the same memory allocator than _PyRuntimeState_Init(). * Fix _PyMem_GetDefaultRawAllocator()
* bpo-30349: Raise FutureWarning for nested sets and set operations (#1553)Serhiy Storchaka2017-11-161-1/+46
| | | | in regular expressions.
* bpo-32037: Use the INT opcode for 32-bit integers in protocol 0 pickles. (#4407)Serhiy Storchaka2017-11-161-3/+3
|
* bpo-32030: Enhance Py_Main() (#4412)Victor Stinner2017-11-161-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse more env vars in Py_Main(): * Add more options to _PyCoreConfig: * faulthandler * tracemalloc * importtime * Move code to parse environment variables from _Py_InitializeCore() to Py_Main(). This change fixes a regression from Python 3.6: PYTHONUNBUFFERED is now read before calling pymain_init_stdio(). * _PyFaulthandler_Init() and _PyTraceMalloc_Init() now take an argument to decide if the module has to be enabled at startup. * tracemalloc_start() is now responsible to check the maximum number of frames. Other changes: * Cleanup Py_Main(): * Rename some pymain_xxx() subfunctions * Add pymain_run_python() subfunction * Cleanup Py_NewInterpreter() * _PyInterpreterState_Enable() now reports failure * init_hash_secret() now considers pyurandom() failure as an "user error": don't fail with abort(). * pymain_optlist_append() and pymain_strdup() now sets err on memory allocation failure.
* bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable #4409Yury Selivanov2017-11-151-0/+18
|
* bpo-32025: Add time.thread_time() (#4410)Antoine Pitrou2017-11-151-0/+57
| | | | | | | | | | | | | | * bpo-32025: Add time.thread_time() * Add missing #endif * Add NEWS blurb * Add docs and whatsnew * Address review comments * Review comments
* bpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408)Dong-hee Na2017-11-152-3/+3
|
* bpo-30399: Get rid of trailing comma in the repr of BaseException. (#1650)Serhiy Storchaka2017-11-153-11/+11
|
* bpo-32011: Revert "Issue #15480: Remove the deprecated and unused TYPE_INT64 ↵Serhiy Storchaka2017-11-151-0/+23
| | | | | | | code from marshal." (#4381) Simplify the reverted code. This reverts commit e9bbe8b87ba2874efba0474af5cc7d5941dbf742.
* bpo-32023: Disallow genexprs without parenthesis in class definitions. (#4400)Serhiy Storchaka2017-11-151-0/+4
|
* bpo-31949: Fixed several issues in printing tracebacks ↵Serhiy Storchaka2017-11-151-0/+33
| | | | | | | | | | | | (PyTraceBack_Print()). (#4289) * Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks. * Setting sys.tracebacklimit to None now causes using the default limit. * Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using the limit LONG_MAX rather than the default limit. * Fixed integer overflows in the case of more than 2**31 traceback items on Windows. * Fixed output errors handling.
* bpo-32032: Test both implementations of module-level pickle API. (#4401)Serhiy Storchaka2017-11-153-18/+25
|
* bpo-32012: Disallow trailing comma after genexpr without parenthesis. (#4382)Serhiy Storchaka2017-11-151-3/+18
|
* bpo-32015: Asyncio looping during simultaneously socket read/write an… (#4386)Andrey Egorov2017-11-141-19/+59
| | | | | | | | | | | | * bpo-32015: Asyncio cycling during simultaneously socket read/write and reconnection * Tests fix * Tests fix * News add * Add new unit tests
* bpo-31979: Simplify transforming decimals to ASCII (#4336)Serhiy Storchaka2017-11-132-6/+9
| | | | | in int(), float() and complex() parsers. This also speeds up parsing non-ASCII numbers by around 20%.
* bpo-28369: Enhance transport socket check in add_reader/writer (#4365)Yury Selivanov2017-11-131-0/+70
|
* bpo-29181: Skip test_tarfile tests on PermissionError raised by Android ↵xdegaye2017-11-121-2/+8
| | | | (GH-4375)
* bpo-29180: Skip test_os tests on PermissionError raised by Android (GH-4374)xdegaye2017-11-121-3/+10
|
* bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)xdegaye2017-11-127-34/+50
| | | | | | Access to mkfifo(), mknod() and hard link creation is controled by SELinux on Android. Also remove test.support.android_not_root.
* bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160)xdegaye2017-11-121-0/+62
|
* bpo-28180: Fix the implementation of PEP 538 on Android (GH-4334)xdegaye2017-11-121-3/+18
|
* bpo-31976: Fix race condition when flushing a file is slow. (#4331)benfogle2017-11-101-1/+30
|
* Rewrite asyncio test to be more meaningful (#4363)Yury Selivanov2017-11-101-11/+16
|
* bpo-31985: Deprecate openfp in aifc, sunau, and wave (#4344)Brian Curtin2017-11-105-2/+25
| | | | | | | | | | The openfp functions of aifp, sunau, and wave had pointed to the open function of each module since 1993 as a matter of backwards compatibility. In the case of aifc.openfp, it was both undocumented and untested. This change begins the formal deprecation of those openfp functions, with their removal coming in 3.9. This additionally adds a TODO in test_pyclbr around using aifc.openfp, though it shouldn't be changed until removal in 3.9.
* bpo-31999: Fix test_venv in case the zlib module is not available. (#4359)Serhiy Storchaka2017-11-101-1/+2
|
* bpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)Serhiy Storchaka2017-11-101-0/+2
|
* bpo-31222: Make (datetime|date|time).replace return subclass type in Pure ↵Paul Ganssle2017-11-091-0/+14
| | | | Python (#4176)
* Silence error output in test_concurrent_futures (bpo-21423) (#4347)Antoine Pitrou2017-11-091-22/+47
| | | | * Silence error output in test_concurrent_futures (bpo-21423)
* Replace KB unit with KiB (#4293)Victor Stinner2017-11-0814-27/+27
| | | | | | | | | | | kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB.
* bpo-21862: Add -m option to cProfile for profiling modules (#4297)Sanyam Khurana2017-11-081-0/+14
| | | | * bpo-21862: Add -m option to cProfile for profiling modules
* bpo-31620: have asyncio/queues not leak memory when you've exceptions during ↵Suren Nihalani2017-11-071-0/+17
| | | | waiting (#3813)
* bpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)Antoine Pitrou2017-11-071-1/+1
| | | | * bpo-31970: Reduce performance overhead of asyncio debug mode.
* Fix the sizeof test for dicts with shared keys. (#4311)Serhiy Storchaka2017-11-071-5/+10
| | | | By accident the size of the empty dict keys object matched the size of values array.
* Add asyncio.Handle.cancelled() method (#2388)Marat Sharafutdinov2017-11-071-4/+4
|
* bpo-31945: Configurable blocksize in HTTP(S)Connection (#4279)Nir Soffer2017-11-061-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blocksize was hardcoded to 8192, preventing efficient upload when using file-like body. Add blocksize argument to __init__, so users can configure the blocksize to fit their needs. I tested this uploading data from /dev/zero to a web server dropping the received data, to test the overhead of the HTTPConnection.send() with a file-like object. Here is an example 10g upload with the default buffer size (8192): $ time ~/src/cpython/release/python upload-httplib.py 10 https://localhost:8000/ Uploaded 10.00g in 17.53 seconds (584.00m/s) real 0m17.574s user 0m8.887s sys 0m5.971s Same with 512k blocksize: $ time ~/src/cpython/release/python upload-httplib.py 10 https://localhost:8000/ Uploaded 10.00g in 6.60 seconds (1551.15m/s) real 0m6.641s user 0m3.426s sys 0m2.162s In real world usage the difference will be smaller, depending on the local and remote storage and the network. See https://github.com/nirs/http-bench for more info.
* Fix miscellaneous typos (#4275)luzpaz2017-11-0512-16/+16
|
* bpo-28564: Use os.scandir() in shutil.rmtree(). (#4085)Serhiy Storchaka2017-11-041-1/+1
| | | | This speeds up it to 20-40%.
* bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor (#4241)Antoine Pitrou2017-11-041-65/+119
| | | | | | * bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor * Fix docstring
* bpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)Jack O'Connor2017-11-031-0/+36
| | | | | | | | | | | | All Blake2 params have to be encoded in little-endian byte order. For the two multi-byte integer params, leaf_length and node_offset, that means that assigning a native-endian integer to them appears to work on little-endian platforms, but gives the wrong result on big-endian. The current libb2 API doesn't make that very clear, and @sneves is working on new API functions in the GH issue above. In the meantime, we can work around the problem by explicitly assigning little-endian values to the parameter block. See https://github.com/BLAKE2/libb2/issues/12.