summaryrefslogtreecommitdiff
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
...
* compileall tests: Use shorter name for long_path test (GH-16419)Petr Viktorin2019-09-261-2/+6
| | | | Apparently, the path needs to be limited to 260 characters on (some versions of) Windows.
* bpo-38223: Reorganize test_shutil. (GH-16281)Serhiy Storchaka2019-09-261-487/+478
| | | | | | * Group tests for specific functions and groups of related functions into separate classes. * Clean up creating and cleaning up temporary directories. * Simplify and make more robust monkey patching of shutil.open.
* bpo-38112: compileall: Skip long path path on Windows if the path can't be ↵Petr Viktorin2019-09-261-12/+51
| | | | | | | | | | | | created (GH-16414) This avoids the buildbot failure on Windows: ``` FileNotFoundError: [WinError 206] The filename or extension is too long: 'd:\\temp\\tmp5r3z438t\\long\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\21\\22\\23\\24\\25\\26\\27\\28\\29\\30\\31\\32\\33\\34\\35\\36\\37\\38\\39\\40\\41\\42\\43\\44\\45\\46\\47\\48\\49\\50\\51\\52\\53\\54\\55\\56\\57\\58\\59\\60\\61\\62\\63\\64\\65\\66\\67\\68\\69\\70\\71\\72\\73\\74\\75\\76\\77\\78' ``` Creates a path that's long but avoids OS restrictions. https://bugs.python.org/issue38112
* bpo-38112: Compileall improvements (GH-16012)Lumír 'Frenzy' Balhar2019-09-261-0/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Raise the limit of maximum path depth to actual recursion limit * Add posibilities to adjust a path compiled in .pyc file. Now, you can: - Strip a part of path from a beggining of path into compiled file example "-s /test /test/build/real/test.py" → "build/real/test.py" - Append some new path to a beggining of path into compiled file example "-p /boo real/test.py" → "/boo/real/test.py" You can also use both options in the same time. In that case, striping is done before appending. * Add a possibility to specify multiple optimization levels Each optimization level then leads to separated compiled file. Use `action='append'` instead of `nargs='+'` for the -o option. Instead of `-o 0 1 2`, specify `-o 0 -o 1 -o 2`. It's more to type, but much more explicit. * Add a symlinks limitation feature This feature allows us to limit byte-compilation of symbolic links if they are pointing outside specified dir (build root for example).
* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)Victor Stinner2019-09-261-7/+6
| | | | | | | | | Explicitly preinitializes with a Python preconfiguration to avoid Py_SetPath() implicit preinitialization with a compat preconfiguration. Fix also test_init_setpath() and test_init_setpythonhome() on macOS: use self.test_exe as the executable (and base_executable), rather than shutil.which('python3').
* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)Victor Stinner2019-09-261-8/+51
| | | | | | | | | | | | * Add test_embed.test_init_setpath_config(): test Py_SetPath() with PyConfig. * test_init_setpath() and test_init_setpythonhome() no longer call Py_SetProgramName(), but use the default program name. * _PyPathConfig: isolated, site_import and base_executable fields are now only available on Windows. * If executable is set explicitly in the configuration, ignore calculated base_executable: _PyConfig_InitPathConfig() copies executable to base_executable. * Complete path config documentation.
* bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant (#16071)Christian Heimes2019-09-251-10/+0
| | | | * Updated _hashopenssl.c to be PEP 384 compliant * Remove refleak test from test_hashlib. The updated type no longer accepts random arguments to __init__.
* bpo-38271: encrypt private key test files with AES256 (GH-16385)Christian Heimes2019-09-253-86/+87
| | | | | | | | | | | | | | | | The private keys for test_ssl were encrypted with 3DES in traditional PKCS#5 format. 3DES and the digest algorithm of PKCS#5 are blocked by some strict crypto policies. Use PKCS#8 format with AES256 encryption instead. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38271 Automerge-Triggered-By: @tiran
* bpo-38005: Remove support of string argument in InterpreterID(). (GH-16227)Serhiy Storchaka2019-09-251-9/+6
| | | Make negative interpreter id to raise ValueError instead of RuntimeError.
* bpo-38234: Fix test_embed pathconfig tests (GH-16390)Victor Stinner2019-09-251-0/+5
| | | | | bpo-38234: On macOS and FreeBSD, the temporary directory can be symbolic link. For example, /tmp can be a symbolic link to /var/tmp. Call realpath() to resolve all symbolic links.
* bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382)Christian Heimes2019-09-257-45/+115
| | | | | | | | | | | Make it easier to run and test Python on systems with restrict crypto policies: * add requires_hashdigest to test.support to check if a hash digest algorithm is available and working * avoid MD5 in test_hmac * replace MD5 with SHA256 in test_tarfile * mark network tests that require MD5 for MD5-based digest auth or CRAM-MD5 https://bugs.python.org/issue38270
* bpo-36046: posix_spawn() doesn't support uid/gid (GH-16384)Victor Stinner2019-09-251-33/+38
| | | | | * subprocess.Popen now longer uses posix_spawn() if uid, gid or gids are set. * test_subprocess: add "nobody" and "nfsnobody" group names for test_group(). * test_subprocess: test_user() and test_group() are now also tested with close_fds=False.
* bpo-37064: Add option -a to pathfix.py tool (GH-15717)PatrikKopkan2019-09-251-17/+56
| | | Add option -a to Tools/Scripts/pathfix.py script: add flags.
* bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330)Yury Selivanov2019-09-251-0/+4
|
* bpo-38234: Cleanup getpath.c (GH-16367)Victor Stinner2019-09-251-0/+7
| | | | | | | | | * search_for_prefix() directly calls reduce() if found is greater than 0. * Add calculate_pybuilddir() subfunction. * search_for_prefix(): add path string buffer for readability. * Fix some error handling code paths: release resources on error. * calculate_read_pyenv(): rename tmpbuffer to filename. * test.pythoninfo now also logs windows.dll_path
* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)Victor Stinner2019-09-251-15/+165
| | | | | | | Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed to test pyvenv.cfg and pybuilddir.txt configuration files. Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8 encoding, not ASCII.
* bpo-38234: Add tests for Python init path config (GH-16358)Victor Stinner2019-09-241-11/+78
|
* bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)Victor Stinner2019-09-241-5/+6
| | | | | | | | Multiprocessing test test_mymanager() now also expects -SIGTERM, not only exitcode 0. bpo-30356: BaseManager._finalize_manager() sends SIGTERM to the manager process if it takes longer than 1 second to stop, which happens on slow buildbots.
* bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348)Victor Stinner2019-09-241-2/+1
| | | | Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds.
* Updated incorrect level-setting code to use setLevel(). (GH-16325)Vinay Sajip2019-09-221-1/+1
|
* bpo-38237: Make pow's arguments have more descriptive names and be keyword ↵Ammar Askar2019-09-201-0/+13
| | | | | | | | | | | | passable (GH-16302) Edit: `math.pow` changes removed on Mark's request. https://bugs.python.org/issue38237 Automerge-Triggered-By: @rhettinger
* bpo-33694: Remove test_asyncio ProactorDatagramTransportTests (GH-16288)Victor Stinner2019-09-201-253/+0
| | | | ProactorDatagramTransportTests tests are too close to the implementation.
* bpo-38140: Make dict and weakref offsets opaque for C heap types (#16076)Eddie Elizondo2019-09-191-0/+27
| | | | | | * Make dict and weakref offsets opaque for C heap types * Add news
* bpo-34037: test_asyncio uses shutdown_default_executor() (GH-16284)Victor Stinner2019-09-193-3/+13
|
* bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on all ↵Victor Stinner2019-09-191-2/+1
| | | | platforms (GH-16282)
* bpo-38155: Add __all__ to datetime module (GH-16203)t k2019-09-191-0/+6
| | | https://bugs.python.org/issue38155
* bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249)Victor Stinner2019-09-184-19/+6
| | | | dump_traceback_later() and cancel_dump_traceback_later() functions of the faulthandler module are always available since Python 3.7.
* bpo-38203: regrtest: put a 2 min timeout on Python exit (GH-16250)Victor Stinner2019-09-181-10/+24
|
* bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on Windows ↵Victor Stinner2019-09-181-0/+2
| | | | | (GH-16247) It is a known and tracked bug: disable the test until it's fixed.
* bpo-38070: Py_FatalError() logs runtime state (GH-16246)Victor Stinner2019-09-182-6/+14
|
* bpo-38191: Turn warnings into errors in NamedTuple() and TypedDict(). (GH-16238)Serhiy Storchaka2019-09-171-19/+8
|
* bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). ↵Serhiy Storchaka2019-09-171-0/+60
| | | | | | | | (GH-16222) This includes such names as "cls", "self", "typename", "_typename", "fields" and "_fields". Passing positional arguments by keyword is deprecated.
* bpo-38187: Fix reference leak in test_tools (GH-16233)Pablo Galindo2019-09-171-0/+3
|
* bpo-38013: make async_generator_athrow object tolerant to throwing ↵Andrew Svetlov2019-09-171-0/+22
| | | | | | | | | | | | exceptions (GH-16070) Even when the helper is not started yet. This behavior follows conventional generator one. There is no reason for `async_generator_athrow` to handle `gen.throw()` differently. https://bugs.python.org/issue38013
* bpo-37531: regrtest main process uses shorter timeout (GH-16220)Victor Stinner2019-09-171-6/+6
| | | | | | When using multiprocesss (-jN), the main process now uses a timeout of 60 seconds instead of the double of the --timeout value. The buildbot server stops a job which does not produce any output in 1200 seconds.
* bpo-37206: Unrepresentable default values no longer represented as None. ↵Serhiy Storchaka2019-09-142-7/+7
| | | | | | | (GH-13933) In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
* bpo-37953: Fix deprecation warnings in test_typing (GH-16133)Zackery Spytz2019-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | self.assertEquals() is deprecated. ``` ./python -We -m test test_typing Run tests sequentially 0:00:00 load avg: 0.23 [1/1] test_typing test test_typing failed -- Traceback (most recent call last): File "/home/lubuntu2/cpython/Lib/test/test_typing.py", line 2382, in test_forward_equality_gth self.assertEquals(Union[c1, c1_gth], Union[c1]) File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 1390, in deprecated_func warnings.warn( DeprecationWarning: Please use assertEqual instead. test_typing failed == Tests result: FAILURE == 1 test failed: test_typing Total duration: 140 ms Tests result: FAILURE ``` https://bugs.python.org/issue37953
* bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID. ↵Serhiy Storchaka2019-09-131-39/+38
| | | | | | | | | | | | | (GH-15652) * Fix a crash in comparing with float (and maybe other crashes). * They are now never equal to strings and non-integer numbers. * Comparison with a large number no longer raises OverflowError. * Arbitrary exceptions no longer silenced in constructors and comparisons. * TypeError raised in the constructor contains now the name of the type. * Accept only ChannelID and int-like objects in channel functions. * Accept only InterpreterId, int-like objects and str in the InterpreterId constructor. * Accept int-like objects, not just int in interpreter related functions.
* bpo-37953: Fix ForwardRef hash and equality checks (GH-15400)plokmijnuhby2019-09-131-0/+116
| | | | | Ideally if we stick a ForwardRef in a dictionary we would like to reliably be able to get it out again. https://bugs.python.org/issue37953
* Fix typo in test_api.py. (GH-16119)Benjamin Peterson2019-09-131-1/+1
|
* bpo-34706: Preserve subclassing in inspect.Signature.from_callable (GH-16108)Gregory P. Smith2019-09-131-2/+9
| | | | | | | | https://bugs.python.org/issue34706 Specifically in the case of a class that does not override its constructor signature inherited from object. These are Buck Evan @bukzor's changes cherrypicked from GH-9344.
* bpo-37199: Replace the early returns added in c2cda63. (GH-14535)Zackery Spytz2019-09-131-37/+34
|
* bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489)Zackery Spytz2019-09-131-15/+16
|
* bpo-36046: Fix buildbot failures (GH-16091)Gregory P. Smith2019-09-131-3/+17
| | | | Varying user/group/permission check needs on platforms.
* bpo-38153: Normalize hashlib algorithm names (GH-16083)Christian Heimes2019-09-131-0/+12
| | | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-38148: Add slots to asyncio transports (GH-16077)Andrew Svetlov2019-09-131-4/+9
| | | | | | | | * bpo-38148: Add slots to asyncio transports * Update Misc/NEWS.d/next/Library/2019-09-13-08-55-43.bpo-38148.Lnww6D.rst Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* bpo-12707: deprecate info(), geturl(), getcode() methods in favor of ↵Ashwin Ramaswami2019-09-132-0/+13
| | | | | headers, url, and status properties for HTTPResponse and addinfourl (GH-11447) Co-Authored-By: epicfaace <aramaswamis@gmail.com>
* bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies ↵Xtreak2019-09-131-0/+9
| | | | | | | | | | | | | | (GH-13921) Handle time comparison for cookies with `expires` attribute when `CookieJar.make_cookies` is called. Co-authored-by: Demian Brecht <demianbrecht@gmail.com> https://bugs.python.org/issue12144 Automerge-Triggered-By: @asvetlov
* bpo-8538: Add support for boolean actions to argparse (GH-11478)Rémi Lapeyre2019-09-131-11/+45
| | | Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-121-0/+9
| | | | | The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes. Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it. Contributed and Signed-off-by: Christian Heimes christian@python.org