summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.5] bpo-30775: Fix refleaks in test_multiprocessing (GH-2467) (#2469)Antoine Pitrou2017-06-281-2/+17
| | | | Forgetting to call Process.join() can keep some resources alive. (cherry picked from commit a79f8faccf5e26f55e8b9496ad49d2071b5e299c)
* [3.5] bpo-13617: Reject embedded null characters in wchar* strings. ↵Serhiy Storchaka2017-06-2821-25/+119
| | | | | | | | | | (GH-2302) (#2463) Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters.. (cherry picked from commit f7eae0adfcd4c50034281b2c69f461b43b68db84)
* Clarification to the `break` statement (GH-2453) (GH-2458)regexaurus2017-06-271-1/+1
| | | | Clarify that the break statement breaks out of the innermost enclosing for or while loop. (cherry picked from commit 36fc896740319d2c03aa2054a90a999c162517ef)
* [3.5] bpo-30708: Add private C API function _PyUnicode_AsWideCharString(). ↵Serhiy Storchaka2017-06-2710-10/+47
| | | | | | | | | | (GH-2285) (GH-2443) (#2448) And use it instead of PyUnicode_AsWideCharString() if appropriate. _PyUnicode_AsWideCharString(unicode) is like PyUnicode_AsWideCharString(unicode, NULL), but raises a ValueError if the wchar_t* string contains null characters. (cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a). (cherry picked from commit 0edffa3073b551ffeca34952529e7b292f1bd350)
* [3.5] bpo-30769: Fix reference leak introduced in 7770394 (GH-2416) (#2447)Emily Morehouse2017-06-271-0/+2
|
* [3.5] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2442)Victor Stinner2017-06-273-31/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-30523: regrtest --list-cases --match (#2401) * regrtest --list-cases now supports --match and --match-file options. Example: ./python -m test --list-cases -m FileTests test_os * --list-cases now also sets support.verbose to False to prevent messages to stdout when loading test modules. * Add support._match_test() private function. (cherry picked from commit ace56d583664f855d89d1219ece7c21c2fddcf30) * bpo-30764: regrtest: add --fail-env-changed option (#2402) * bpo-30764: regrtest: change exit code on failure * Exit code 2 if failed tests ("bad") * Exit code 3 if interrupted * bpo-30764: regrtest: add --fail-env-changed option If the option is set, mark a test as failed if it alters the environment, for example if it creates a file without removing it. (cherry picked from commit 63f54c68936d648c70ca411661e4208329edcf26) * bpo-30776: reduce regrtest -R false positives (#2422) * Change the regrtest --huntrleaks checker to decide if a test file leaks or not. Require that each run leaks at least 1 reference. * Warmup runs are now completely ignored: ignored in the checker test and not used anymore to compute the sum. * Add an unit test for a reference leak. Example of reference differences previously considered a failure (leak) and now considered as success (success, no leak): [3, 0, 0] [0, 1, 0] [8, -8, 1] (cherry picked from commit 48b5c422ffb03affb00c184b9a99e5537be92732)
* bpo-30383: Add NEWS entry for backported regrtest (#2438)Victor Stinner2017-06-271-0/+14
|
* [3.5] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to ↵Antoine Pitrou2017-06-262-45/+52
| | | | | | | | | | | | | (GH-2403) (#2419) * bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to lock This is especially important if PyThread_acquire_lock() is called reentrantly (for example from a signal handler). * Update 2017-06-26-14-29-50.bpo-30765.Q5iBmf.rst * Avoid core logic when taking the mutex failed. (cherry picked from commit f84ac420c2af98339678744953869cad3c253281)
* bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2411)Victor Stinner2017-06-261-26/+25
| | | | | | bpo-30764, bpo-29335: test_child_terminated_in_stopped_state() of test_subprocess now uses support.SuppressCrashReport() to prevent the creation of a core dump on FreeBSD. (cherry picked from commit cdee3f14f7f4c995e7eedb0bf6a67e260c739f7d)
* [3.5] bpo-30746: Prohibited the '=' character in environment variable names ↵Serhiy Storchaka2017-06-254-6/+117
| | | | | | | (GH-2382) (#2392) in `os.putenv()` and `os.spawn*()`.. (cherry picked from commit 77703942c5997dff00c48f10df1b29b11645624c)
* [3.5] Check the whitespace of pull requests on Travis (GH-2367) (GH-2387)Brett Cannon2017-06-242-2/+37
| | | (cherry picked from commit 70cb1875bb5343e31d7268f4b2d231a5fecdf989)
* [3.5] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) ↵Serhiy Storchaka2017-06-241-2/+1
| | | | | (#2379) (cherry picked from commit 0ee32c1)
* [3.5] Fix a typo in a comment in coroutines.py (GH-2267) (GH-2371)Mariatta2017-06-231-1/+1
| | | | defiend -> defined (cherry picked from commit cab469245d7635447c5e04fa6ed860b067dfc26b)
* [3.5] bpo-30645: don't append to an inner loop path in imp.load_package() ↵Brett Cannon2017-06-233-2/+8
| | | | | | | | (GH-2268) (GH-2365) Bug didn't manifest itself when importing a module with source as .py files are always the first on the search path. The issue only showed up in bytecode-only packages where the calculated file path would be ``__init__.py/__init__.pyc``. Patch by Alexandru Ardelean. (cherry picked from commit c38e32a10061a7c6d54e7e53ffabf7af7998f045)
* [3.5] bpo-30730: Prevent environment variables injection in subprocess on ↵Serhiy Storchaka2017-06-235-9/+72
| | | | | | Windows. (GH-2325) (#2361) Prevent passing other invalid environment variables and command arguments.. (cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700)
* [3.5] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2350)Victor Stinner2017-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses a winconfig.h configuration file which already defines: * XML_NS * XML_DTD * BYTEORDER=1234 * XML_CONTEXT_BYTES=1024 * HAVE_MEMMOVE Remove these defines from PCbuild/_elementtree.vcxproj to prevent compiler warnings. Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com> (cherry picked from commit c8fb58bd7917151e63398587a7fc2126db7c26de) * bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319) * bpo-30726: Fix elementtree warnings on Windows Caused by usage of `getenv` which should be safe. And a few integer truncations which should also be ok. * bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream (cherry picked from commit 87c65550730a8f85ce339ba197bce4fb7e836619)
* [3.5] bpo-30727: Fix a race condition in test_threading. (GH-2334) (#2352)Serhiy Storchaka2017-06-231-5/+14
| | | (cherry picked from commit 32cb968)
* [3.5] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) ↵Mariatta2017-06-221-3/+3
| | | | | (GH-2341) (cherry picked from commit b066edfb1b268e90ea11f45dd1827f46d7ceec88)
* [3.5] bpo-30619: Clarify typing.Union documentation (GH-2326) (GH-2338)Mariatta2017-06-221-1/+1
| | | | When a class and its subclass are present, the latter is skipped. (cherry picked from commit 6580c19bbbe7bc9bc0884699afd69184f523b32e)
* Add "Misc/NEWS.d" directory tree for "blurb". GH-2330larryhastings2017-06-2211-0/+11
| | | | | | | | | | CPython workflow is changing! We're going to start using "blurb" to manage Misc/NEWS entries: https://github.com/python/core-workflow (This will be a big win for release managers, honest.) This checkin simply populates the "Misc/NEWS.d" subdirectory tree so that people can start putting their news entries in there. No other changes (yet).
* bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2314)Victor Stinner2017-06-219-158/+887
| | | | New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132313eb651107b179d20218dfe5d4e47f13)
* [3.5] bpo-29755: Fixed the lgettext() family of functions in the gettext ↵Serhiy Storchaka2017-06-204-107/+229
| | | | | | | | module. (GH-2266) (#2298) They now always return bytes. Updated the gettext documentation. (cherry picked from commit 26cb465)
* bpo-30500: Fix the NEWS entry (#2295)Victor Stinner2017-06-201-1/+1
| | | splithost() expects an URL starting with "//" not with "http://".
* bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2290)Victor Stinner2017-06-204-13/+46
| | | | | | | | | The current regex based splitting produces a wrong result. For example:: http://abc#@def Web browsers parse that URL as ``http://abc/#@def``, that is, the host is ``abc``, the path is ``/``, and the fragment is ``#@def``. (cherry picked from commit 90e01e50ef8a9e6c91f30d965563c378a4ad26de)
* [3.5] bpo-29887: Test normalization now fails if download fails (GH-905) (#2272)Mariatta2017-06-201-4/+12
| | | | | | | | | | | | | | | | | | | | | | | * [3.5] bpo-29887: Test normalization now fails if download fails (GH-905) * test_normalization fails if download fails bpo-29887. The test is still skipped if "-u urlfetch" option is not passed to regrtest (python3 -m test -u urlfetch test_normalization). * Fix ResourceWarning in test_normalization bpo-29887: Fix ResourceWarning in test_normalization if tests are interrupted by CTRL+c. (cherry picked from commit 722a3af092b94983aa26f5e591fb1b45e2c2a0ff) * bpo-29887: test_normalization handles PermissionError (#1196) Skip test_normalization.test_main() if download raises a permission error. (cherry picked from commit d13d54748d3a7db023d9db37223ea7d40bb8f8e3) * no f-strings :(
* bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on ↵Steve Dower2017-06-1910-95/+135
| | | | | | vcvarsall.bat (#2252) (#2281) * Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat Also fixes bdist_wininst.vcxproj to use correct version in generated name.
* [3.5] bpo-30383: Backport regrtest and test_regrtest enhancements from ↵Victor Stinner2017-06-192-44/+636
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master to 3.5 (#2279) * bpo-30383: regrtest: prepend testdir to sys.path * bpo-30383: Backport test_regrtest * regrtest: rename --slow option to --slowest The old --slow syntax is still accepted. * regrtest: add a single oneliner summary Example: "Tests result: SUCCESS" * test_regrtest: add test_coverage() regrtest now also displays the number of successful tests when coverage is used. * test_regrtest: add test_crashed() Handle correctly crashing test: account the crash has a failed test, but continue to run other tests. * regrtest: backport --list-tests feature * regrtest: backport --fromfile enhancements * regrtest: backport displaying progress enhancements * test_regrtest: backport test_randseed() * regrtest: Fix --coverage on Windows Don't ignore any directory anymore. Change backported from master.
* bpo-30176: Add missing curses cell attributes constants (#2277)Xiang Zhang2017-06-192-9/+47
|
* [3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to ↵Victor Stinner2017-06-163-34/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | regrtest (#2250) * bpo-30540: regrtest: add --matchfile option * Add a new option taking a filename to get a list of test names to filter tests. * support.match_tests becomes a list. * Modify run_unittest() to accept to match the whole test identifier, not just a part of a test identifier. For example, the following command only runs test_access() of the FileTests class of test_os: $ ./python -m test -v -m test.test_os.FileTests.test_access test_os * bpo-30523: regrtest: Add --list-cases option * Add --list-cases option to regrtest * Add get_abs_module() function, use it in list_cases() * Add ns mandatory positional argument to runtest() and runtest_inner() * Add file optional parameter to printlist() Co-Authored-By: Louie Lu <git@louie.lu>
* Revert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2226)" (#2247)Victor Stinner2017-06-161-11/+2
| | | This reverts commit ab4ea09604ea7754a80e4fc36280f5772bf4a8b2.
* [email] bpo-29478: Fix passing max_line_length=None from Compat32 policy ↵Mariatta2017-06-154-2/+17
| | | | | | | (GH-595) (GH-2234) If max_line_length=None is specified while using the Compat32 policy, it is no longer ignored.. (cherry picked from commit b459f7482612d340b88b62edc024628595ec6337)
* bpo-30656: Fix Python C API Module Objects documentation (GH-2170) (GH-2231)Mariatta2017-06-151-1/+1
| | | | `PyModule_New()` now refers to `PyModule_NewObject()` (cherry picked from commit 2d0afef82a07afdb666f2ca0c533aac5d39155cd)
* Fix ref cycles in TestCase.assertRaises() (#193) (#2228)Victor Stinner2017-06-163-22/+46
| | | | | bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference cycle to not keep objects alive longer than expected. (cherry picked from commit bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5)
* bpo-30673: test.bat: add -t option (timeout) (#2211) (#2226)Victor Stinner2017-06-161-2/+11
| | | (cherry picked from commit 258bfc462b1e58689b43f662a10e44ece3a10bef)
* bpo-30675: Fix multiprocessing code in regrtest (#2220)Victor Stinner2017-06-161-47/+63
| | | | | | | | | | | | | | * Rewrite code to pass slaveargs from the master process to worker processes: reuse the same code of the Python master branch * Move code to initialize tests in a new setup_tests() function, similar change was done in the master branch * In a worker process, call setup_tests() with the namespace built from slaveargs to initialize correctly tests Before this change, warm_caches() was not called in worker processes because the setup was done before rebuilding the namespace from slaveargs. As a consequence, the huntrleaks feature was unstable. For example, test_zipfile reported randomly false positive on reference leaks.
* [3.5] bpo-30626: Fix error handling in PyImport_Import(). (GH-2103) (#2222)Serhiy Storchaka2017-06-151-2/+6
| | | | | In rare circumstances PyImport_Import() could return NULL without raising an error. (cherry picked from commit 145541c)
* bpo-30149: Fix partialmethod without explicit self parameter (#1308) (#1663)Dong-hee Na2017-06-153-4/+48
|
* [3.5] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and ↵Serhiy Storchaka2017-06-153-10/+36
| | | | | | | | | | v6. (GH-879) (#2218) the original logic was just comparing the network address but this is wrong because if the network address is equal then we need to compare the ip address for breaking the tie add more ip_interface comparison tests. (cherry picked from commit 7bd8d3e794782582a4ad1c9749424fff86802c3e)
* [3.5] bpo-30650: Fixed a syntax error: missed right parentheses (GH-2154) ↵Serhiy Storchaka2017-06-151-1/+1
| | | | | (#2216) (cherry picked from commit 0d32218)
* bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2201)Victor Stinner2017-06-1514-476/+527
| | | | | | | | | | | | | | | | | | | | | | * bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)
* bpo-30231: Remove skipped test_imaplib tests (#1419) (#2193)Victor Stinner2017-06-141-17/+0
| | | | | The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept TLS connection using our self-signed x509 certificate. Remove the two tests which are already skipped.
* bpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) ↵Mariatta2017-06-141-1/+1
| | | | | (GH-2197) (cherry picked from commit 184bd82ba8106785ba22f0d2477dbd08bef821fb)
* Fix trivial typo in Python Setup documentation (GH-2185) (GH-2189)csabella2017-06-141-1/+1
| | | | Replace platform with platforms. (cherry picked from commit 4ebf03d109f827c91a23256a447c1d74a203dfee)
* [3.5] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) ↵Antoine Pitrou2017-06-133-13/+86
| | | | | | | | | | | | | (#2167) * bpo-24484: Avoid race condition in multiprocessing cleanup The finalizer registry can be mutated while inspected by multiprocessing at process exit. * Use test.support.start_threads() * Add Misc/NEWS. (cherry picked from commit 1eb6c0074d17f4fd425cacfdda893d65f5f77f0a)
* [3.5] bpo-29514: Check magic number for bugfix releases (#2158)Nick Coghlan2017-06-131-0/+44
| | | | | | | | | | | | Add a test to check the current MAGIC_NUMBER against the expected number for the release if the current release is at candidate or final level. On test failure, describe to the developer the procedure for changing the magic number. This ensures that pre-merge CI will automatically pick up on magic number changes in maintenance releases (and explain why those are problematic), rather than relying on all core developers to be aware of the implications of such changes.
* [3.5] Mention how to disable signal fd wakeup (GH-2140) (#2150)Antoine Pitrou2017-06-131-2/+4
| | | (cherry picked from commit d79c1d4a9406384f10a37f26a7515ce79f9fdd78)
* bpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2146)Mariatta2017-06-121-21/+29
| | | | Move up the discussion about 'with' keyword, so it appears earlier in the document. (cherry picked from commit bd4e9e0ca96dabf33605d9b1fd1e0562ece8ae18)
* bpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2138)Marco Buttu2017-06-121-0/+2
| | | (cherry picked from commit dc980dfbcfce4695ccde056c3983160ba97b5a36)
* [3.5] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) ↵Serhiy Storchaka2017-06-123-1/+14
| | | | | | (#2122) The traceback no longer displayed for SystemExit raised in a callback registered by atexit. (cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)
* bpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2119)Mariatta2017-06-111-0/+1
| | | | import json before using json module (cherry picked from commit 1dbce04d0e3e93b715eb0d8024da396361759d16)