summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32072: Fix issues with binary plists. (#4455)Serhiy Storchaka2017-11-302-36/+106
| | | | | | | * 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-301-0/+10
| | | | | | | 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-301-2/+63
| | | | with the persistent_id() and persistent_load() methods.
* Skip test_socket.test_sha256() on linux < 4.5 (#4643)Victor Stinner2017-11-301-0/+3
| | | bpo-31705.
* bpo-32101: Add PYTHONDEVMODE environment variable (#4624)Victor Stinner2017-11-303-9/+42
| | | | | | * 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-294-18/+46
| | | | | | | | (#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-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-295-23/+96
| | | | | | | | | | | | | | | | | | | | * 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-292-28/+16
| | | | 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-291-498/+0
|
* 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-282-5/+21
| | | | | 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-282-25/+72
| | | | | | | | ``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-281-3/+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-282-8/+5
| | | | | | | | | | 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
|
* bpo-32154: Remove asyncio.windows_utils.socketpair (#4609)Victor Stinner2017-11-284-111/+7
|
* bpo-32071: Fix regression and add What's New entry (#4589)Jonas Haag2017-11-282-2/+26
| | | | | | * 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-282-6/+5
|
* bpo-32155: Bugfixes found by flake8 F841 warnings (#4608)Victor Stinner2017-11-282-3/+3
| | | | | | | | | | | * 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-289-23/+8
| | | | | | | | | | | | * 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-272-89/+28
| | | This reverts commit 9522a218f7dff95c490ff359cc60e8c2af35f5c8.
* bpo-32136: Separate embedding tests from C API tests (GH-4567)Nick Coghlan2017-11-272-186/+204
| | | | | | | | | 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.
* bpo-32107 - Better merge of #4494 (#4576)Barry Warsaw2017-11-272-28/+89
| | | | | | | | | | | | | | | | 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-272-1/+1
| | | | | | | 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-272-18/+5
| | | | | In development and debug mode, use the "default" action, rather than the "always" action, for ResourceWarning in the default warnings filters.
* bpo-23033: Improve SSL Certificate handling (GH-937)Mandeep Singh2017-11-262-8/+14
| | | | Wildcard is now supported in hostname when it is one and only character in the leftmost segment.
* bpo-32126: Skip asyncio test when sem_open() is not functional (GH-4559)xdegaye2017-11-261-0/+4
|
* bpo-26856: Skip test_pwd on Android until issue 32033 is fixed (GH-4561)xdegaye2017-11-251-20/+7
|
* bpo-24641: Improved error message for JSON unserializible keys. (#4364)Serhiy Storchaka2017-11-253-11/+16
| | | | | Also updated an example for default() in the module docstring. Removed quotes around type name in other error messages.
* bpo-32071: Add unittest -k option (#4496)Jonas Haag2017-11-254-14/+90
| | | | * bpo-32071: Add unittest -k option
* bpo-28334: netrc() now uses expanduser() to find .netrc file (GH-4537)Berker Peksag2017-11-252-7/+41
| | | | | Previously, netrc.netrc() was raised an exception if $HOME is not set. Authored-By: Dimitri Merejkowsky <dimitri.merejkowsky@tanker.io>
* bpo-32128: Skip test_nntplib.test_article_head_body() (#4552)Victor Stinner2017-11-251-0/+1
| | | | | The NNTP server currently has troubles with SSL, whereas we don't have the control on this server. This test blocks all CIs, so disable it until a fix can be found.
* bpo-28684: Remove useless import added by the previous commit (GH-4547)xdegaye2017-11-241-1/+0
|
* bpo-28684: asyncio tests handle PermissionError raised on binding unix ↵xdegaye2017-11-244-11/+40
| | | | | | | | | sockets (GH-4503) The test.support.skip_unless_bind_unix_socket() decorator is used to skip asyncio tests that fail because the platform lacks a functional bind() function for unix domain sockets (as it is the case for non root users on the recent Android versions that run now SELinux in enforcing mode).
* bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)Berker Peksag2017-11-241-0/+7
| | | | | | | The previous behavior was to raise an exception NotImplementedError: result of type 0 when the value of the property is VT_EMPTY.
* bpo-32096: Remove obj and mem from _PyRuntime (#4532)Victor Stinner2017-11-241-0/+10
| | | | | | | | | | | | | | | | | bpo-32096, bpo-30860: Partially revert the commit 2ebc5ce42a8a9e047e790aefbf9a94811569b2b6: * Move structures back from Include/internal/mem.h to Objects/obmalloc.c * Remove _PyObject_Initialize() and _PyMem_Initialize() * Remove Include/internal/pymalloc.h * Add test_capi.test_pre_initialization_api(): Make sure that it's possible to call Py_DecodeLocale(), and then call Py_SetProgramName() with the decoded string, before Py_Initialize(). PyMem_RawMalloc() and Py_DecodeLocale() can be called again before _PyRuntimeState_Init(). Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
* bpo-12382: Make OpenDatabase() raise better exception messages (GH-4528)Berker Peksag2017-11-241-0/+12
| | | | | | | | | | | Previously, 'msilib.OpenDatabase()' function raised a cryptical exception message when it couldn't open or create an MSI file. For example: Traceback (most recent call last): File "<stdin>", line 1, in <module> _msi.MSIError: unknown error 6e
* bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (#4529)Berker Peksag2017-11-232-8/+10
|
* bpo-19610: setup() now raises TypeError for invalid types (GH-4519)Berker Peksag2017-11-232-0/+70
| | | | | | The Distribution class now explicitly raises an exception when 'classifiers', 'keywords' and 'platforms' fields are not specified as a list.
* bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)Berker Peksag2017-11-231-1/+40
|
* bpo-10049: Add a "no-op" (null) context manager to contextlib (GH-4464)Jesse-Bakker2017-11-232-1/+32
| | | | | Adds a simpler and faster alternative to ExitStack for handling single optional context managers without having to change the lexical structure of your code.