summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-38187: Fix a refleak in Tools/c-analyzer. (gh-16304)Eric Snow2019-09-2713-89/+208
| | | | | The "Slot" helper (descriptor) is leaking references due to its caching mechanism. The change includes a partial fix to Slot, but also adds Variable.storage to replace the problematic use of Slot. https://bugs.python.org/issue38187
* bpo-38270: More fixes for strict crypto policy (GH-16418)Christian Heimes2019-09-274-12/+36
| | | | | | | | | | | | | | | test_hmac and test_hashlib test built-in hashing implementations and OpenSSL-based hashing implementations. Add more checks to skip OpenSSL implementations when a strict crypto policy is active. Use EVP_DigestInit_ex() instead of EVP_DigestInit() to initialize the EVP context. The EVP_DigestInit() function clears alls flags and breaks usedforsecurity flag again. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38270
* bpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)Ammar Askar2019-09-272-5/+22
| | | | | | | | | | | | | | As mentioned in the bpo ticket, this mistake came up on two reviews: - https://github.com/python/cpython/pull/16127#pullrequestreview-288312751 - https://github.com/python/cpython/pull/16071#pullrequestreview-287819525 Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry. https://bugs.python.org/issue38206 Automerge-Triggered-By: @encukou
* cleanup ababstractproperty in typing.py (GH-16432)HongWeipeng2019-09-271-8/+15
|
* bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX (GH-8672)Michael Felt2019-09-263-93/+177
|
* bpo-38275: Fix test_ssl issue caused by GH-16386 (#16428)Christian Heimes2019-09-261-0/+2
| | | | | | Check presence of SSLContext.minimum_version to make tests pass with old versions of OpenSSL. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-38275: Skip ssl tests for disabled versions (GH-16386)Christian Heimes2019-09-262-51/+147
| | | | | | | | | | | test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto policy and run-time settings are recognized and tests for disabled versions are skipped. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38275
* bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422)Victor Stinner2019-09-262-2/+10
|
* bpo-38234: Py_Initialize() sets global path configuration (GH-16421)Victor Stinner2019-09-264-10/+63
| | | | | | * Py_InitializeFromConfig() now writes PyConfig path configuration to the global path configuration (_Py_path_config). * Add test_embed.test_get_pathconfig(). * Fix typo in _PyWideStringList_Join().
* 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-38244: [Documentation] Fix unreliable link to sever in ftplib.rst (#16319)Prateek Nayak2019-09-261-1/+1
|
* bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016)Mohammad Dehghan2019-09-261-1/+1
| | | | Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
* Doc: Several fixes and improvements for 3.9 whatsnew (GH-16375)Kyle Stanley2019-09-261-26/+26
|
* Doc: Use the `with` statement in the first example of the ftplib doc. (GH-16271)Stéphane Wirtel2019-09-261-1/+2
|
* bpo-38112: Compileall improvements (GH-16012)Lumír 'Frenzy' Balhar2019-09-264-39/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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).
* closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16346)Benjamin Peterson2019-09-2624-4844/+3975
| | | Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes.
* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)Victor Stinner2019-09-262-8/+17
| | | | | | | | | 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: Complete init config documentation (GH-16404)Victor Stinner2019-09-261-23/+37
|
* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)Victor Stinner2019-09-266-52/+132
| | | | | | | | | | | | * 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-253-64/+69
| | | | * 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-22273: Removed temporary test skipping on PPC platforms. (GH-16399)Vinay Sajip2019-09-251-2/+3
|
* bpo-38271: encrypt private key test files with AES256 (GH-16385)Christian Heimes2019-09-254-86/+91
| | | | | | | | | | | | | | | | 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-252-59/+37
| | | Make negative interpreter id to raise ValueError instead of RuntimeError.
* bpo-38255: super() can search attributes as well as methods (GH-16368)Raymond Hettinger2019-09-251-0/+4
| | | Improvement suggested by Géry Ogam.
* 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-258-45/+119
| | | | | | | | | | | 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-22273: Re-enabled ctypes test on ARM machines. (GH-16388)Vinay Sajip2019-09-251-1/+1
|
* bpo-36046: posix_spawn() doesn't support uid/gid (GH-16384)Victor Stinner2019-09-252-34/+42
| | | | | * 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-253-23/+88
| | | Add option -a to Tools/Scripts/pathfix.py script: add flags.
* bpo-38140: Document offsets in PyMemberDef (GH-16354)Petr Viktorin2019-09-252-1/+17
| | | | | | bpo-38140: Document offsets in PyMemberDef Co-Authored-By: Ammar Askar <ammar_askar@hotmail.com>
* bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330)Yury Selivanov2019-09-254-8/+14
|
* Changed conditions for ctypes array-in-struct handling. (GH-16381)Vinay Sajip2019-09-252-8/+5
|
* bpo-38260: Add Docs on asyncio.run (GH-16337)Emmanuel Arias2019-09-252-0/+16
| | | | | | | | | | | | | Add docs about return and raise exception on asyncio.run https://bugs.python.org/issue38260 Automerge-Triggered-By: @asvetlov
* bpo-22273: Disabled tests while investigating buildbot failures on ↵Vinay Sajip2019-09-252-1/+6
| | | | ARM7L/PPC64. (GH-16377)
* bpo-38219: Optimize dict creating and updating by a dict. (GH-16268)Serhiy Storchaka2019-09-252-8/+15
|
* bpo-38265: Update os.pread to accept the length type as Py_ssize_t. (GH-16359)Dong-hee Na2019-09-253-10/+19
|
* bpo-22273: Update ctypes to correctly handle arrays in small structur… ↵Vinay Sajip2019-09-253-0/+187
| | | | (GH-15839)
* bpo-38234: Cleanup getpath.c (GH-16367)Victor Stinner2019-09-253-88/+138
| | | | | | | | | * 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-252-16/+166
| | | | | | | 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-36871: Avoid duplicated 'Actual:' in assertion message (GH-16361)Samuel Freilich2019-09-243-18/+32
| | | | | Fixes an issue caught after merge of PR 16005. Tightened test assertions to check the entire assertion message.
* bpo-36871: Handle spec errors in assert_has_calls (GH-16005)Samuel Freilich2019-09-244-5/+64
| | | | | | | | | | | | The fix in PR 13261 handled the underlying issue about the spec for specific methods not being applied correctly, but it didn't fix the issue that was causing the misleading error message. The code currently grabs a list of responses from _call_matcher (which may include exceptions). But it doesn't reach inside the list when checking if the result is an exception. This results in a misleading error message when one of the provided calls does not match the spec. https://bugs.python.org/issue36871 Automerge-Triggered-By: @gpshead
* bpo-38234: Add tests for Python init path config (GH-16358)Victor Stinner2019-09-243-24/+176
|
* bpo-38234: Py_SetPath() uses the program full path (GH-16357)Victor Stinner2019-09-244-6/+21
| | | | | | | Py_SetPath() now sets sys.executable to the program full path (Py_GetProgramFullPath()), rather than to the program name (Py_GetProgramName()). Fix also memory leaks in pathconfig_set_from_config().
* bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)Victor Stinner2019-09-242-5/+10
| | | | | | | | 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-242-2/+3
| | | | Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds.
* bpo-38136: Updates await_count and call_count to be different things (GH-16192)Lisa Roach2019-09-245-42/+207
|
* closes bpo-16637: libpython: construct integer object directly from gdbvalue ↵Marc Hartmayer2019-09-241-1/+1
| | | | | | | | (GH-15232) This fixes the exception '`ValueError: invalid literal for int() with base 10` if `str(gdbval)` returns a hexadecimal value (e.g. '0xa0'). This is the case if the output-radix is set to 16 in gdb. See https://sourceware.org/gdb/onlinedocs/gdb/Numbers.html for more information.
* closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230)Hai Shi2019-09-241-1/+1
|