summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-10544: Deprecate "yield" in comprehensions and generator expressions. ↵Serhiy Storchaka2017-12-016-20/+134
| | | | | | | | | | | | | | (GH-4579) The current behaviour of yield expressions inside comprehensions and generator expressions is essentially an accident of implementation - it arises implicitly from the way the compiler handles yield expressions inside nested functions and generators. Since the current behaviour wasn't deliberately designed, and is inherently confusing, we're deprecating it, with no current plans to reintroduce it. Instead, our advice will be to use a named nested generator definition for cases where this behaviour is desired.
* bpo-32186: Release the GIL during lseek and fstat (#4652)Nir Soffer2017-12-012-1/+8
| | | | | | In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called without releasing the GIL. This can cause all threads to hang for unlimited time when calling FileIO.read() and the NFS server is not accessible.
* Fix CID-1420310: cast PY_TIMEOUT_MAX to _Py_time_t (#4646)Victor Stinner2017-11-301-1/+1
| | | | | | | | | | | | | Fix the following false-alarm Coverity warning: Result is not floating-point (UNINTENDED_INTEGER_DIVISION)integer_division: Dividing integer expressions 9223372036854775807LL and 1000LL, and then converting the integer quotient to type double. Any remainder, or fractional part of the quotient, is ignored. To compute and use a non-integer quotient, change or cast either operand to type double. If integer division is intended, consider indicating that by casting the result to type long long .
* make tags: index also Modules/_ctypes/ (#4648)Victor Stinner2017-11-301-4/+3
| | | Avoid also "cd $(srcdir)" to not change the current directory.
* bpo-32072: Fix issues with binary plists. (#4455)Serhiy Storchaka2017-11-303-36/+112
| | | | | | | * Fixed saving bytearrays. * Identical objects will be saved only once. * Equal references will be load as identical objects. * Added support for saving and loading recursive data structures.
* bpo-20891: Fix PyGILState_Ensure() (#4650)Victor Stinner2017-11-305-8/+83
| | | | | | | When PyGILState_Ensure() is called in a non-Python thread before PyEval_InitThreads(), only call PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. Add an unit test in test_embed.
* bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (#4080)Serhiy Storchaka2017-11-303-40/+164
| | | | with the persistent_id() and persistent_load() methods.
* bpo-32030: Fix _Py_InitializeEx_Private() (#4649)Victor Stinner2017-11-301-6/+13
| | | | | _Py_InitializeEx_Private() now calls _PyMainInterpreterConfig_ReadEnv() to read environment variables PYTHONHOME and PYTHONPATH, and set the program name.
* Fix CID-1414686: PyInit_readline() handles errors (#4647)Victor Stinner2017-11-301-4/+18
| | | | | | | | | | | | Handle PyModule_AddIntConstant() and PyModule_AddStringConstant() failures. Add also constants before calling setup_readline(), since setup_readline() registers callbacks which uses a reference to the module, whereas the module is destroyed if adding constants fails. Fix Coverity warning: CID 1414686: Unchecked return value (CHECKED_RETURN) 2. check_return: Calling PyModule_AddStringConstant without checking return value (as is done elsewhere 45 out of 55 times).
* Skip test_socket.test_sha256() on linux < 4.5 (#4643)Victor Stinner2017-11-302-0/+6
| | | bpo-31705.
* bpo-32101: Add PYTHONDEVMODE environment variable (#4624)Victor Stinner2017-11-3010-16/+78
| | | | | | * bpo-32101: Add sys.flags.dev_mode flag Rename also the "Developer mode" to the "Development mode". * bpo-32101: Add PYTHONDEVMODE environment variable Mention it in the development chapiter.
* bpo-32121: Add most_recent_first parameter to tracemalloc.Traceback.format ↵Jesse-Bakker2017-11-297-24/+68
| | | | | | | | (#4534) * Add most_recent_first parameter to tracemalloc.Traceback.format to allow reversing the order of the frames in the output * Reversed default sorting of tracemalloc.Traceback frames * Allowed negative limit, truncating from the other side.
* bpo-32159: Revert Misc/svnmap.txt (#4639)Victor Stinner2017-11-292-0/+72548
| | | | Partially revert the commit fe2d5babba5d26de2093b6518316b268488187be. Clarify the usage of this file in Misc/README.
* bpo-32166: Drop Python 3.4 code from asyncio (#4612)Andrew Svetlov2017-11-293-131/+25
| | | | | | | | | | | | | | | | | | | | | | * Drop Python 3.4 code from asyncio * Fix notes * Add missing imports * Restore comment * Resort imports * Drop Python 3.4-3.5 specific code * Drop redunant check * Fix tests * Restore _COROUTINE_TYPES order * Remove useless code
* bpo-32030: Rework memory allocators (#4625)Victor Stinner2017-11-2914-169/+403
| | | | | | | | | | | | | | | | | | | | * Fix _PyMem_SetupAllocators("debug"): always restore allocators to the defaults, rather than only caling _PyMem_SetupDebugHooks(). * Add _PyMem_SetDefaultAllocator() helper to set the "default" allocator. * Add _PyMem_GetAllocatorsName(): get the name of the allocators * main() now uses debug hooks on memory allocators if Py_DEBUG is defined, rather than calling directly malloc() * Document default memory allocators in C API documentation * _Py_InitializeCore() now fails with a fatal user error if PYTHONMALLOC value is an unknown memory allocator, instead of failing with a fatal internal error. * Add new tests on the PYTHONMALLOC environment variable * Add support.with_pymalloc() * Add the _testcapi.WITH_PYMALLOC constant and expose it as support.with_pymalloc(). * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so replace it with support.with_pymalloc(). * pythoninfo: add _testcapi collector for pymem
* test_socket: socket.socketpair() is always available (#4634)Victor Stinner2017-11-291-2/+0
|
* bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV (GH-4604)xdegaye2017-11-293-28/+18
| | | | Remove the test.support.requires_android_level decorator.
* bpo-32139: test_strftime does not anymore modify the locale (GH-4569)xdegaye2017-11-291-2/+4
|
* bpo-32164: Delete unused file idlelib/tabbedpages.py (#4628)Terry Jan Reedy2017-11-292-498/+2
|
* bpo-30781: Remove unused imports in idlelib.configdialog. (#4627)Terry Jan Reedy2017-11-291-4/+3
|
* bpo-32100: Delete unneeded import in idlelib.pathbrowser. (#4626)Terry Jan Reedy2017-11-291-1/+0
|
* bpo-32110: codecs.StreamReader.read(n) now returns not more than n (#4499)Serhiy Storchaka2017-11-283-5/+24
| | | | | characters/bytes for non-negative n. This makes it compatible with read() methods of other file-like objects.
* bpo-32107 - Improve MAC address calculation and fix test_uuid.py (#4600)Barry Warsaw2017-11-284-29/+89
| | | | | | | | ``uuid.getnode()`` now preferentially returns universally administered MAC addresses if available, over locally administered MAC addresses. This makes a better guarantee for global uniqueness of UUIDs returned from ``uuid.uuid1()``. If only locally administered MAC addresses are available, the first such one found is returned. Also improve internal code style by being explicit about ``return None`` rather than falling off the end of the function. Improve the test robustness.
* bpo-32155: Revert distutils.config change (#4618)Victor Stinner2017-11-282-4/+2
| | | | | Revert distutils changes of the commit 696b501cd11dc429a0f661adeb598bfaf89e4112 and remove the realm variable.
* bpo-32159: Remove tools for CVS and Subversion (#4615)Victor Stinner2017-11-288-72881/+8
| | | | | | | | | | CPython migrated from CVS to Subversion, to Mercurial, and then to Git. CVS and Subversion are not more used to develop CPython. * platform module: drop support for sys.subversion. The sys.subversion attribute has been removed in Python 3.3. * Remove Misc/svnmap.txt * Remove Tools/scripts/svneol.py * Remove Tools/scripts/treesync.py
* bpo-32157: Removed explicit quotes around %r and {!r}. (#4582)Serhiy Storchaka2017-11-284-6/+6
|
* Use raw strings in the re module examples. (#4616)Serhiy Storchaka2017-11-281-4/+4
|
* bpo-32154: Remove asyncio.windows_utils.socketpair (#4609)Victor Stinner2017-11-289-123/+21
|
* bpo-32071: Fix regression and add What's New entry (#4589)Jonas Haag2017-11-283-2/+35
| | | | | | * bpo-32071: Fix an undocumented behaviour regression * bpo-32071: Add 3.7 release note entry for unittest -k
* bpo-32046: Update 2to3 when converts operator.isCallable(obj). (#4417)Dong-hee Na2017-11-284-7/+8
|
* bpo-32150: Expand tabs to spaces in C files. (#4583)Serhiy Storchaka2017-11-2827-213/+213
|
* bpo-31440: Changed default module search path for windowsgauravbackback2017-11-281-2/+2
|
* bpo-32155: Bugfixes found by flake8 F841 warnings (#4608)Victor Stinner2017-11-284-4/+5
| | | | | | | | | | | * distutils.config: Use the PyPIRCCommand.realm attribute if set * turtledemo: wait until macOS osascript command completes to not create a zombie process * Tools/scripts/treesync.py: declare 'default_answer' and 'create_files' as globals to modify them with the command line arguments. Previously, -y, -n, -f and -a options had no effect. flake8 warning: "F841 local variable 'p' is assigned to but never used".
* bpo-32154: Remove asyncio.selectors (#4605)Victor Stinner2017-11-2810-23/+13
| | | | | | | | | | | | * Remove asyncio.selectors and asyncio._overlapped symbols from the namespace of the asyncio module * Replace "from asyncio import selectors" with "import selectors" * Replace "from asyncio import _overlapped" with "import _overlapped" asyncio.selectors was added to support Python 3.3, which doesn't have selectors in its standard library, and Python 3.4 in the same code base. Same rationale for asyncio._overlapped. Python 3.3 reached its end of life, and asyncio is no more maintained as a third party module on PyPI.
* asyncio: Remove asyncio/compat.py (#4606)Victor Stinner2017-11-287-60/+37
| | | | | | | | | | The asyncio/compat.py file was written to support Python < 3.5 and Python < 3.5.2. But Python 3.5 doesn't accept bugfixes anymore, only security fixes. There is no more need to backport bugfixes to Python 3.5, and so no need to have a single code base for Python 3.5, 3.6 and 3.7. Say hello (again) to "async" and "await", who became real keywords in Python 3.7 ;-)
* asyncio: use directly socket.socketpair() (#4597)Victor Stinner2017-11-287-36/+9
| | | | | Since Python 3.5, socket.socketpair() is also available on Windows, and so can be used directly, rather than using asyncio.windows_utils.socketpair().
* asyncio: Fix BaseSelectorEventLoopTests (#4595)Victor Stinner2017-11-271-0/+2
| | | | Currently, two tests fail with PYTHONASYNCIODEBUG=1 (or using -X dev).
* asyncio: Remove unused Future._tb_logger attribute (#4596)Victor Stinner2017-11-271-8/+1
| | | | It was only used on Python 3.3, now only Future._log_traceback is used.
* bpo-31245: asyncio: Fix typo, isistance => isinstance (#4594)Victor Stinner2017-11-271-1/+1
|
* Revert "bpo-32107 - Better merge of #4494 (#4576)" (#4593)Victor Stinner2017-11-273-93/+28
| | | This reverts commit 9522a218f7dff95c490ff359cc60e8c2af35f5c8.
* bpo-32136: Separate embedding tests from C API tests (GH-4567)Nick Coghlan2017-11-273-186/+207
| | | | | | | | | Some parts of the C API are only relevant to larger applications embedding CPython as a runtime engine. The helpers to test those APIs are already separated out into Programs/_testembed.c, this update moves the associated test cases out into their own dedicated test file.
* Revert "bpo-30487: automatically create a venv and install Sphinx when ↵Ned Deily2017-11-273-31/+22
| | | | | | running make (GH-4346)" (#4592) Fix breakage documented in bpo-32149. This reverts commit d8d6b9122134f040cd5a4f15f40f6c9e3386db4d.
* bpo-32107 - Better merge of #4494 (#4576)Barry Warsaw2017-11-273-28/+93
| | | | | | | | | | | | | | | | Improve UUID1 MAC address calculation and related tests. There are two bits in the MAC address that are relevant to UUID1. The first is the locally administered vs. universally administered bit (second least significant of the first octet). Physical network interfaces such as ethernet ports and wireless adapters will always be universally administered, but some interfaces --such as the interface that MacBook Pros communicate with their Touch Bars-- are locally administered. The former are guaranteed to be globally unique, while the latter are demonstrably *not* globally unique and are in fact the same on every MBP with a Touch Bar. With this bit is set, the MAC is locally administered; with it unset it is universally administered. The other bit is the multicast bit (least significant bit of the first octet). When no other MAC address can be found, RFC 4122 mandates that a random 48-bit number be generated. This randomly generated number *must* have the multicast bit set. The improvements in uuid.py include: * Preferentially return a universally administered MAC address, falling back to a locally administered address if none of the former can be found. * Improve several coding style issues, such as adding explicit returns of None, using a more readable bitmask pattern, and assuming that the ultimate fallback, random MAC generation will not fail (and propagating any exception there instead of swallowing them). Improvements in test_uuid.py include: * Always testing the calculated MAC for universal administration, unless explicitly disabled (i.e. for the random case), or implicitly disabled due to running in the Travis environment. Travis test machines have *no* universally administered MAC address at the time of this writing.
* bpo-27535: Fix memory leak with warnings ignore (#4489)Victor Stinner2017-11-274-5/+14
| | | | | | | The warnings module doesn't leak memory anymore in the hidden warnings registry for the "ignore" action of warnings filters. The warn_explicit() function doesn't add the warning key to the registry anymore for the "ignore" action.
* bpo-32089: Use default action for ResourceWarning (#4584)Victor Stinner2017-11-274-21/+10
| | | | | In development and debug mode, use the "default" action, rather than the "always" action, for ResourceWarning in the default warnings filters.
* bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469)Jason Yang2017-11-271-2/+2
|
* bpo-23033: Improve SSL Certificate handling (GH-937)Mandeep Singh2017-11-265-8/+22
| | | | Wildcard is now supported in hostname when it is one and only character in the leftmost segment.
* bpo-29879: Update typing documentation. (GH-4573)Ivan Levkivskyi2017-11-262-1/+13
| | | | - Add "version added: 3.5.2" note where it was missing. - Remove the mention that Reversible is new in 3.5.2
* bpo-30487: automatically create a venv and install Sphinx when running make ↵Caleb Hattingh2017-11-263-22/+31
| | | | (GH-4346)
* bpo-32126: Skip asyncio test when sem_open() is not functional (GH-4559)xdegaye2017-11-262-0/+6
|