summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is ↵Oren Milman2017-09-171-0/+3
| | | | defined only outside _fields_. (#3615)
* bpo-31493: Fix code context update and font update timers. (#3622)Terry Jan Reedy2017-09-171-0/+3
| | | | Canceling timers prevents a warning message when test_idle completes. (This is the minimum fix needed before upcoming releases.)
* bpo-31488: IDLE - update former extensions when options change. (#3612)Terry Jan Reedy2017-09-161-0/+4
| | | | | When apply changes, call .reload on each class with non-key options. Change ParenMatch so that updates affect current instances.
* bpo-28411: Support other mappings in PyInterpreterState.modules. (#3593)Eric Snow2017-09-151-0/+4
| | | | | The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls. We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
* bpo-31431: SSLContext.check_hostname auto-sets CERT_REQUIRED (#3531)Christian Heimes2017-09-151-0/+2
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER (#3058)Christian Heimes2017-09-151-0/+1
| | | | | | Replaces PROTOCOL_TLSv* and PROTOCOL_SSLv23 with PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31386: Custom wrap_bio and wrap_socket type (#3426)Christian Heimes2017-09-151-0/+2
| | | | | | | | | SSLSocket.wrap_bio() and SSLSocket.wrap_socket() hard-code SSLObject and SSLSocket as return types. In the light of future deprecation of ssl.wrap_socket() module function and direct instantiation of SSLSocket, it is desirable to make the return type of SSLSocket.wrap_bio() and SSLSocket.wrap_socket() customizable. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-314777: IDLE - improve rstrip entry in doc (#3602)Terry Jan Reedy2017-09-151-0/+2
| | | | | | | 'Strip trailing whitespace' is not limited to spaces. Wording caters to beginners who do know know the meaning of 'whitespace'. Multiline string literals are not skipped. * News blurb.
* bpo-31338 (#3374)Barry Warsaw2017-09-151-0/+3
| | | | | | | * Add Py_UNREACHABLE() as an alias to abort(). * Use Py_UNREACHABLE() instead of assert(0) * Convert more unreachable code to use Py_UNREACHABLE() * Document Py_UNREACHABLE() and a few other macros.
* bpo-31480: IDLE - fix tests to pass with zzdummy extension disabled. (#3590)Terry Jan Reedy2017-09-141-0/+1
| | | Enabled by default was a temporary expedient. The fix is to add a user override to enable.
* bpo-31128: Allow pydoc to bind to arbitrary hostnames (#3011)Feanil Patel2017-09-142-0/+2
| | | | New -n flag allow overriding localhost with custom value, for example to run from containers.
* bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). (#3545)scoder2017-09-141-0/+2
| | | | | | * Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set. * Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
* bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case ↵Oren Milman2017-09-141-0/+2
| | | | env has a bad keys() method. (#3580)
* bpo-28556: typing.get_type_hints: better globalns for classes and modules ↵Łukasz Langa2017-09-141-0/+2
| | | | | | | | | | | | | | | (#3582) This makes the default behavior (without specifying `globalns` manually) more predictable for users, finds the right globalns automatically. Implementation for classes assumes has a `__module__` attribute and that module is present in `sys.modules`. It does this recursively for all bases in the MRO. For modules, the implementation just uses their `__dict__` directly. This is backwards compatible, will just raise fewer exceptions in naive user code. Originally implemented and reviewed at https://github.com/python/typing/pull/470.
* bpo-28411: Isolate PyInterpreterState.modules (#3575)Eric Snow2017-09-141-0/+3
| | | | | A bunch of code currently uses PyInterpreterState.modules directly instead of PyImport_GetModuleDict(). This complicates efforts to make changes relative to sys.modules. This patch switches to using PyImport_GetModuleDict() uniformly. Also, a number of related uses of sys.modules are updated for uniformity for the same reason. Note that this code was already reviewed and merged as part of #1638. I reverted that and am now splitting it up into more focused parts.
* bpo-31457: Allow for nested LoggerAdapter objects (#3551)Łukasz Langa2017-09-141-0/+1
| | | | | | Some of the proxied methods use internal Logger state which isn't proxied, causing failures if an adapter is applied to another adapter. This commit fixes the issue, adds a new test for the use case.
* bpo-31404: Revert "remove modules from Py_InterpreterState (#1638)" (#3565)Eric Snow2017-09-141-4/+0
| | | PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
* bpo-28556: Minor updates to typing module (#3550)Ivan Levkivskyi2017-09-131-0/+2
| | | | * Copy changes to typing from upstream repo * Add NEWS entry
* bpo-31418: Fix an assertion failure in PyErr_WriteUnraisable() in case of an ↵Oren Milman2017-09-131-0/+2
| | | | exception with a bad __module__ attribute. (#3539)
* bpo-31234, socket.create_connection(): Fix ref cycle (#3546)Victor Stinner2017-09-131-0/+2
|
* bpo-31233: socketserver.ThreadingMixIn.server_close() (#3523)Victor Stinner2017-09-131-0/+2
| | | | | | | | | socketserver.ThreadingMixIn now keeps a list of non-daemonic threads to wait until all these threads complete in server_close(). Reenable test_logging skipped tests. Fix SocketHandlerTest.tearDown(): close the socket handler before stopping the server, so the server can join threads.
* bpo-31421: Document how IDLE runs tkinter programs. (#3513)Terry Jan Reedy2017-09-121-0/+4
| | | | IDLE calls tcl/tk update in the background in order to make live interaction and experimentatin with tkinter applications much easier.
* bpo-31416: Fix assertion failures in case of a bad warnings.filters or ↵Oren Milman2017-09-111-0/+2
| | | | | warnings.defaultaction. (#3496) Patch by Oren Milman.
* bpo-31414: IDLE -- fix tk entry box tests by deleting first. (#3501)Terry Jan Reedy2017-09-111-0/+2
| | | | | Adding to an int entry is not the same as deleting and inserting because int('') will fail.
* bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is ↵Oren Milman2017-09-111-0/+2
| | | | not a dictionary. (#3485)
* bpo-27099: IDLE - Convert built-in extensions to regular features (#2494)wohlganger2017-09-101-0/+20
| | | | | | | | | | | | | | | | | | | | | About 10 IDLE features were implemented as supposedly optional extensions. Their different behavior could be confusing or worse for users and not good for maintenance. Hence the conversion. The main difference for users is that user configurable key bindings for builtin features are now handled uniformly. Now, editing a binding in a keyset only affects its value in the keyset. All bindings are defined together in the system-specific default keysets in config- extensions.def. All custom keysets are saved as a whole in config- extension.cfg. All take effect as soon as one clicks Apply or Ok. The affected events are '<<force-open-completions>>', '<<expand-word>>', '<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>', '<<run-module>>', '<<check-module>>', and '<<zoom-height>>'. Any (global) customizations made before 3.6.3 will not affect their keyset- specific customization after 3.6.3. and vice versa. Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
* bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() ↵Raymond Hettinger2017-09-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#3454) * Working draft without _source * Re-use itemgetter() instances * Speed-up calls to __new__() with a pre-bound tuple.__new__() * Add note regarding string interning * Remove unnecessary create function wrappers * Minor sync-ups with PR-2736. Mostly formatting and f-strings * Bring-in qualname/__module fix-ups from PR-2736 * Formally remove the verbose flag and _source attribute * Restore a test of potentially problematic field names * Restore kwonly_args test but without the verbose option * Adopt Inada's idea to reuse the docstrings for the itemgetters * Neaten-up a bit * Add news blurb * Serhiy pointed-out the need for interning * Jelle noticed as missing f on an f-string * Add whatsnew entry for feature removal * Accede to request for dict literals instead keyword arguments * Leave the method.__module__ attribute pointing the actual location of the code * Improve variable names and add a micro-optimization for an non-public helper function * Simplify by in-lining reuse_itemgetter() * Arrange steps in more logical order * Save docstring in local cache instead of interning
* bpo-31392: Update SSL build for 1.1.0 (#3448)Steve Dower2017-09-091-0/+1
|
* bpo-29639: change test.support.HOST to "localhost"Gregory P. Smith2017-09-091-0/+2
| | | | | | | | | | test.support.HOST should be "localhost" as it was in the past. See the bpo-29639. Tests that need the IP address should use HOSTv4 (added) or the existing HOSTv6 constant. This changes the definition and fixes tests that needed updating to deal with HOST being the hostname rather than the hardcoded IP address. This is only the first step in addressing https://bugs.python.org/issue29639.
* bpo-31400: Improve SSL error handling on Windows (#3463)Steve Dower2017-09-081-0/+1
| | | | | | * bpo-31392: Improve SSL error handling on Windows * Remove unnecessary Windows mention in NEWS
* bpo-31354: Let configure --with-lto work on all buildsoctaviansoldea2017-09-081-0/+1
| | | | | | | | | | Allow configure --with-lto to apply to all builds, not just profile-opt builds. Whether this is actually useful or not must be determined by the person building CPython using their own toolchain. My own quick test on x86_64 Debian 9 (gcc 6.3, binutils 2.28) seemed to suggest that it wasn't, but I expect better toolchains can or will exist at some point. The point is to allow it at all.
* bpo-28182: Expose OpenSSL verification results (#3412)Christian Heimes2017-09-081-0/+3
| | | | | | | | | The SSL module now raises SSLCertVerificationError when OpenSSL fails to verify the peer's certificate. The exception contains more information about the error. Original patch by Chi Hsuan Yen Signed-off-by: Christian Heimes <christian@python.org>
* bpo-30860: Consolidate stateful runtime globals. (#3397)Eric Snow2017-09-081-0/+2
| | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (#1363)Christian Heimes2017-09-081-0/+1
| | | | | | | | | | | | | | | | * bpo-29136: Add TLS 1.3 support TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3 cipher suites don't overlap with cipher suites from TLS 1.2 and earlier. Since Python sets its own set of permitted ciphers, TLS 1.3 handshake will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common AES-GCM and ChaCha20 suites. Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3 now. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31344: Per-frame control of trace events (GH-3417)Nick Coghlan2017-09-081-0/+5
| | | | | | | | | f_trace_lines: enable/disable line trace events f_trace_opcodes: enable/disable opcode trace events These are intended primarily for testing of the interpreter itself, as they make it much easier to emulate signals arriving at unfortunate times.
* bpo-27340: Use memoryview in SSLSocket.sendall() (#3384)Christian Heimes2017-09-071-0/+3
| | | | | | | | | | | | | | * bpo-27340: Use memoryview in SSLSocket.sendall() SSLSocket.sendall() now uses memoryview to create slices of data. This fix support for all bytes-like object. It is also more efficient and avoids costly copies. Signed-off-by: Christian Heimes <christian@python.org> * Cast view to bytes, fix typo Signed-off-by: Christian Heimes <christian@python.org>
* bpo-28958: Improve SSLContext error reporting. (#3414)Christian Heimes2017-09-071-0/+2
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (#3229)Pablo Galindo2017-09-072-0/+3
| | | | | | | | * Fix ZeroMQSocketListener and ZeroMQSocketHandler examples * Use send_json and recv_json to simplify pyzmq interfacing * Add News entry
* bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632)Steve Dower2017-09-071-0/+1
|
* bpo-31373: fix undefined floating-point demotions (#3396)Benjamin Peterson2017-09-071-0/+2
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-0/+5
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-31358: Pull zlib out of the repository (GH-3375)Zachary Ware2017-09-071-0/+2
| | | Also enable building externals by default on Windows, use PCbuild\build.bat's -E option to disable it.
* bpo-30465: Fix lineno and col_offset in fstring AST nodes (#1800)Łukasz Langa2017-09-071-0/+3
| | | For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly.
* bpo-14191 Add parse_intermixed_args. (#3319)R. David Murray2017-09-071-0/+3
| | | This adds support for parsing a command line where options and positionals are intermixed as is common in many unix commands. This is paul.j3's patch with a few tweaks.
* bpo-21649: Add RFC 7525 and Mozilla server side TLS (#3387)Christian Heimes2017-09-061-0/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-27584: New addition of vSockets to the python socket module (#2489)caavery2017-09-062-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-27584: New addition of vSockets to the python socket module Support for AF_VSOCK on Linux only * bpo-27584: Fixes for V2 Fixed syntax and naming problems. Fixed #ifdef AF_VSOCK checking Restored original aclocal.m4 * bpo-27584: Fixes for V3 Added checking for fcntl and thread modules. * bpo-27584: Fixes for V4 Fixed white space error * bpo-27584: Fixes for V5 Added back comma in (CID, port). * bpo-27584: Fixes for V6 Added news file. socket.rst now reflects first Linux introduction of AF_VSOCK. Fixed get_cid in test_socket.py. Replaced PyLong_FromLong with PyLong_FromUnsignedLong in socketmodule.c Got rid of extra AF_VSOCK #define. Added sockaddr_vm to sock_addr. * bpo-27584: Fixes for V7 Minor cleanup. * bpo-27584: Fixes for V8 Put back #undef AF_VSOCK as it is necessary when vm_sockets.h is not installed.
* bpo-29505: Add fuzz tests for float(str), int(str), unicode(str) (#2878)Devin Jeanpierre2017-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add basic fuzz tests for a few common builtin functions. This is an easy place to start, and these functions are probably safe. We'll want to add more fuzz tests later. Lets bootstrap using these. While the fuzz tests are included in CPython and compiled / tested on a very basic level inside CPython itself, the actual fuzzing happens as part of oss-fuzz (https://github.com/google/oss-fuzz). The reason to include the tests in CPython is to make sure that they're maintained as part of the CPython project, especially when (as some eventually will) they use internal implementation details in the test. (This will be necessary sometimes because e.g. the fuzz test should never enter Python's interpreter loop, whereas some APIs only expose themselves publicly as Python functions.) This particular set of changes is part of testing Python's builtins, tracked internally at Google by b/37562550. The _xxtestfuzz module that this change adds need not be shipped with binary distributions of Python.
* bpo-31340: Change to building with MSVC v141 (included with Visual Studio ↵Steve Dower2017-09-061-0/+1
| | | | 2017) (#3311)
* bpo-31178: Avoid concatenating bytes with str in subprocess error (#3066)Ammar Askar2017-09-061-0/+1
| | | Avoid concatenating bytes with str in the typically rare subprocess error path (exec failed). Includes a mock based unittest to exercise the codepath.
* bpo-29781: Fix SSLObject.version before handshake (#3364)Christian Heimes2017-09-061-0/+2
| | | | | | SSLObject.version() now correctly returns None when handshake over BIO has not been performed yet. Signed-off-by: Christian Heimes <christian@python.org>