Commit Graph

200 Commits

Author SHA1 Message Date
Łukasz Langa a785c87d6e DTrace support: function calls, GC activity, line execution
Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc.

Largely based by an initial patch by Jesús Cea Avión, with some
influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's
unification patch.

Things deliberately left out for simplicity:
- ustack helpers, I have no way of testing them at this point since
they are Solaris-specific
- PyFrameObject * in function__entry/function__return, this is
SystemTap-specific
- SPARC support
- dynamic tracing
- sys module dtrace facility introspection

All of those might be added later.
2016-09-09 17:37:37 -07:00
Zachary Ware 935043d1ac Closes #27976: Deprecate bundled full copy of libffi
Builds on non-OSX UNIX now default to using the system libffi, and warn if the
bundled copy is used.
2016-09-09 17:01:21 -07:00
R David Murray 06ed218ed0 #20476: add a message_factory policy attribute to email. 2016-09-09 18:39:18 -04:00
Steve Dower 3cdd7f57a2 Add links from whatsnew to Windows docs. 2016-09-09 15:22:13 -07:00
Serhiy Storchaka 142aee3a8e Merge heads 2016-09-10 01:14:38 +03:00
Steve Dower d8fdffedaa Adds search path changes to whatsnew/3.6.rst 2016-09-09 15:09:30 -07:00
Serhiy Storchaka be9a4e5c85 Issue #433028: Added support of modifier spans in regular expressions. 2016-09-10 00:57:55 +03:00
Brett Cannon a721abac29 Issue #26331: Implement the parsing part of PEP 515.
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Zachary Ware ba41c8152f Add tix deprecation to whatsnew 2016-09-09 13:25:44 -07:00
Eric Snow 68f4dd8b01 Doc updates for PEPs 520 and 468. 2016-09-09 11:22:14 -07:00
Brett Cannon 6760c69022 Mention how requiring ordered dicts breaks backwards-compatibility. 2016-09-09 11:18:21 -07:00
Brett Cannon feea6e7bcf Mention that the order-preserving aspect of the new dict
implementation is an implementation detail (and why that is so).
2016-09-09 11:11:45 -07:00
Guido van Rossum 52a7e37555 Add a few big-ticket items to What's new in 3.6. 2016-09-09 09:59:34 -07:00
Benjamin Peterson f7e9dfbee2 credit Raymond 2016-09-09 09:33:23 -07:00
R David Murray 301edfa579 Add policy keyword to email.generator.DecodedGenerator. 2016-09-08 17:57:06 -04:00
Steve Dower 3929499914 Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
Closes #17602: Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
Victor Stinner 3b6a6b4215 Add a new private version to the builtin dict type
Issue #26058: Add a new private version to the builtin dict type, incremented
at each dictionary creation and at each dictionary change.

Implementation of the PEP 509.
2016-09-08 12:51:24 -07:00
R David Murray 110b6fecbb #27364: Deprecate invalid escape strings in str/byutes.
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
2016-09-08 15:34:08 -04:00
Benjamin Peterson b6e363463a make some peps high level sections 2016-09-08 11:58:40 -07:00
Zachary Ware 20737cc91e Issue #28027: Remove Lib/plat-* files 2016-09-08 11:38:46 -07:00
Benjamin Peterson b1a95888de fix pep role 2016-09-08 11:03:55 -07:00
Steve Dower cc16be85c0 Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529) 2016-09-08 10:35:16 -07:00
Benjamin Peterson cfbd48bc56 add a note about c99 2016-09-08 10:27:20 -07:00
Benjamin Peterson e5e3edb920 improve compact dict changelog 2016-09-08 10:13:42 -07:00
Victor Stinner 742da040db Implement compact dict
Issue #27350: `dict` implementation is changed like PyPy. It is more compact
and preserves insertion order.

_PyDict_Dummy() function has been removed.

Disable test_gdb: python-gdb.py is not updated yet to the new structure of
compact dictionaries (issue #28023).

Patch written by INADA Naoki.
2016-09-07 17:40:12 -07:00
Brett Cannon 035a100382 Issue #26667: Add path-like object support to importlib.util. 2016-09-07 18:39:18 -07:00
R David Murray 8e7cdb2586 #24277: What's New and news entries for previous commit. 2016-09-07 21:21:58 -04:00
Eric Snow 46f97b85a8 Issue #15767: Use ModuleNotFoundError. 2016-09-07 16:56:15 -07:00
R David Murray 56b1f1b4d5 #27331: add policy keyword argument to all MIME subclasses.
Patch by Berker Peksag.
2016-09-07 16:48:35 -04:00
Brett Cannon 5c4de2863b Add the co_extra field and accompanying APIs to code objects.
This completes PEP 523.
2016-09-07 11:16:41 -07:00
Serhiy Storchaka 680cb152c5 Issue #26032: Optimized globbing in pathlib by using os.scandir(); it is now
about 1.5--4 times faster.
2016-09-07 10:58:05 +03:00
Steve Dower 19ab0fd456 Issue #27731: Opt-out of MAX_PATH on Windows 10 2016-09-06 20:40:11 -07:00
Steve Dower 050acaed99 Issue #6135: Adds encoding and errors parameters to subprocess 2016-09-06 20:16:17 -07:00
Steve Dower 6cebd48425 Issue #27959: Updates NEWS and whatsnew 2016-09-06 19:55:55 -07:00
Brett Cannon a571120410 Issue #27182: Add support for path-like objects to PyUnicode_FSDecoder(). 2016-09-06 19:36:01 -07:00
Brett Cannon 63d98bcd4c Issue #26359: Add the --with-optimizations configure flag.
The flag will activate LTO and PGO build support when available.
Thanks to Alecsandur Patrascu of Intel for the original patch.
2016-09-06 17:12:40 -07:00
Victor Stinner e66987e626 os.urandom() now blocks on Linux
Issue #27776: The os.urandom() function does now block on Linux 3.17 and newer
until the system urandom entropy pool is initialized to increase the security.

This change is part of the PEP 524.
2016-09-06 16:33:52 -07:00
Victor Stinner 9b1f474df6 Add os.getrandom()
Issue #27778: Expose the Linux getrandom() syscall as a new os.getrandom()
function.

This change is part of the PEP 524.
2016-09-06 16:18:52 -07:00
Berker Peksag b84fd04f39 Remove redundant bullet point in 3.6.rst 2016-09-07 01:07:06 +03:00
Zachary Ware c401881d68 Closes #27982: Allow keyword arguments to winsound functions 2016-09-06 16:32:43 -05:00
Serhiy Storchaka 28ab634fa6 Issue #25596: Optimized glob() and iglob() functions in the
glob module; they are now about 3--6 times faster.
2016-09-06 22:33:41 +03:00
Brett Cannon 3cebf93872 Implement the frame evaluation API aspect of PEP 523. 2016-09-05 15:33:46 -07:00
Eric Snow 92a6c170e6 Issue #24254: Preserve class attribute definition order. 2016-09-05 14:50:11 -07:00
Jason R. Coombs 5c071c1ff4 Issue #27919: Deprecate extra_path option in distutils. 2016-09-01 13:55:33 -04:00
Martin Panter ef91bb2660 Issue #12319: Always send file request bodies using chunked encoding
The previous attempt to determine the file’s Content-Length gave a false
positive for pipes on Windows.

Also, drop the special case for sending zero-length iterable bodies.
2016-08-27 01:39:26 +00:00
Brett Cannon 68ed978f56 Add a What's New entry for PEP 519 2016-08-26 14:45:15 -07:00
Martin Panter 3c0d0baf2b Issue #12319: Support for chunked encoding of HTTP request bodies
When the body object is a file, its size is no longer determined with
fstat(), since that can report the wrong result (e.g. reading from a pipe).
Instead, determine the size using seek(), or fall back to chunked encoding
for unseekable files.

Also, change the logic for detecting text files to check for TextIOBase
inheritance, rather than inspecting the “mode” attribute, which may not
exist (e.g. BytesIO and StringIO).  The Content-Length for text files is no
longer determined ahead of time, because the original logic could have been
wrong depending on the codec and newline translation settings.

Patch by Demian Brecht and Rolf Krahl, with a few tweaks by me.
2016-08-24 06:33:33 +00:00
R David Murray bdfa0ebff7 #26907: add some missing getsockopt constants.
Patch by Christian Heimes, reviewed by Martin Panter.
2016-08-23 21:12:40 -04:00
Jason R. Coombs c758d51aa8 Issue #27819: Add more detail in What's New in 3.6. 2016-08-21 16:09:27 -04:00
Nick Coghlan 02d03dfab1 Issue #26823: fix traceback abbreviation docs
- be clear builtin traceback display was also updated
- show example output in What's New
- fix versionadded markup
2016-08-16 10:58:14 +10:00
Nick Coghlan d00342347e Issue #26823: Abbreviate recursive tracebacks
Large sections of repeated lines in tracebacks are now abbreviated as
"[Previous line repeated {count} more times]" by both the traceback
module and the builtin traceback rendering.

Patch by Emanuel Barry.
2016-08-15 13:11:34 +10:00
Serhiy Storchaka 9171a8b4ce Issue #27574: Decreased an overhead of parsing keyword arguments in functions
implemented with using Argument Clinic.
2016-08-14 10:52:18 +03:00
Serhiy Storchaka febc332056 Issue #26754: Undocumented support of general bytes-like objects
as path in compile() and similar functions is now deprecated.
2016-08-06 23:29:29 +03:00
Serhiy Storchaka d73c31899e Issue #26800: Undocumented support of general bytes-like objects
as paths in os functions is now deprecated.
2016-08-06 23:22:08 +03:00
Vinay Sajip fd0f84bd8f Closes #22829: Added --prompt option to venv. 2016-08-06 10:43:44 +01:00
Nick Coghlan 607e1c4c44 Issue 27366: PEP 487 docs updates
- Porting note for type keyword arg handling
- __init_subclass__ note regarding  metaclass hint
2016-07-31 12:42:49 +10:00
Nick Coghlan d78448e912 Issue #27366: Implement PEP 487
- __init_subclass__ called when new subclasses defined
- __set_name__ called when descriptors are part of a
  class definition
2016-07-30 16:26:03 +10:00
Serhiy Storchaka 0122ae9ac8 Issue #21708: Deprecated dbm.dumb behavior that differs from common dbm
behavior: creating a database in 'r' and 'w' modes and modifying a database
in 'r' mode.
2016-07-06 12:21:58 +03:00
Serhiy Storchaka 7e160ce356 Issue #23034: The output of a special Python build with defined COUNT_ALLOCS,
SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by  default.  It can
be re-enabled using the "-X showalloccount" option.  It now outputs to stderr
instead of stdout.
2016-07-03 21:03:53 +03:00
Berker Peksag e807e892ed Fix typo in whatsnew/3.6.rst 2016-07-01 12:12:19 +03:00
Martin Panter 34eeed4290 Issue #26721: Change StreamRequestHandler.wfile to BufferedIOBase 2016-06-29 10:12:22 +00:00
Serhiy Storchaka 8122174af1 Issue #22115: Added methods trace_add, trace_remove and trace_info in the
tkinter.Variable class.  They replace old methods trace_variable, trace,
trace_vdelete and trace_vinfo that use obsolete Tcl commands and might
not work in future versions of Tcl.
2016-06-26 09:46:57 +03:00
Brett Cannon 696c35e86b Issue #26186: Remove the restriction that built-in and extension
modules  can't be lazily loaded.

Thanks to Python 3.6 allowing for types.ModuleType to have its
__class__ mutated, the restriction can be lifted by calling
create_module() on the wrapped loader.
2016-06-25 10:58:17 -07:00
Serhiy Storchaka aacd53f6cb Issue #18726: All optional parameters of the dump(), dumps(),
load() and loads() functions and JSONEncoder and JSONDecoder class
constructors in the json module are now keyword-only.
2016-06-22 00:03:20 +03:00
Martin Panter df1d31c2cd Fix “allow(s) to” 2016-06-20 08:00:45 +00:00
Steve Dower ea93ac013d Issue #26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by Daniel Stokes. 2016-06-17 12:52:18 -07:00
Berker Peksag e0b70cd8a9 Issue #16864: Cursor.lastrowid now supports REPLACE statement
Initial patch by Alex LordThorsen.
2016-06-14 15:25:36 +03:00
Terry Jan Reedy dffd42f130 Whitespace 2016-06-13 00:42:42 -04:00
Terry Jan Reedy d9792a0f18 Issue #27163: Add idlelib/IDLE entry to What's New in 3.6. 2016-06-13 00:41:53 -04:00
Serhiy Storchaka e670be2273 Issue #27029: Removed deprecated support of universal newlines mode from ZipFile.open(). 2016-06-11 19:32:44 +03:00
Serhiy Storchaka f41b82fb19 Issue #26282: PyArg_ParseTupleAndKeywords() and Argument Clinic now support
positional-only and keyword parameters in the same function.
2016-06-09 16:30:29 +03:00
Martin Panter 0d3535a6ab Issue #23883: News updates for __all__ attributes 2016-06-06 02:09:08 +00:00
Serhiy Storchaka 8c740c4d19 Improved docs for issue27033. Based on comments by R. David Murray. 2016-05-29 23:43:24 +03:00
Steve Dower 4d4bc42c8b Closes #23026: Documentation improvements and code formatting 2016-05-25 11:26:07 -07:00
Steve Dower 80ac11d01e Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. (Patch by hakril) 2016-05-24 15:42:04 -07:00
Paul Moore 835416cf7c Issue #27064: The py.exe launcher now defaults to Python 3.
The Windows launcher ``py.exe`` no longer prefers an installed
Python 2 version over Python 3 by default when used interactively.
2016-05-22 12:28:41 +01:00
Victor Stinner 5a48e21ff1 subprocess now emits a ResourceWarning warning
Issue #26741: subprocess.Popen destructor now emits a ResourceWarning warning
if the child process is still running.
2016-05-20 12:11:15 +02:00
Victor Stinner 19ed27ec2b Optimize pickle.load() and pickle.loads()
Issue #27056: Optimize pickle.load() and pickle.loads(), up to 10% faster to
deserialize a lot of small objects.
2016-05-20 11:42:37 +02:00
Yury Selivanov b4a0d52a3f docs: Update whatsnew/3.6 with asyncio changes 2016-05-16 16:25:16 -04:00
Serhiy Storchaka 2e208b7d62 Issue #27031: Removed dummy methods in Tkinter widget classes: tk_menuBar()
and tk_bindForTraversal().
2016-05-16 22:35:46 +03:00
Martin Panter f0dbf7a6ab Issue #26870: Add readline.set_auto_history(), originally by Tyler Crompton 2016-05-15 01:26:25 +00:00
Serhiy Storchaka 18ee29d0b8 Issue #26039: zipfile.ZipFile.open() can now be used to write data into a ZIP
file, as well as for extracting data.  Patch by Thomas Kluyver.
2016-05-13 13:52:49 +03:00
Serhiy Storchaka b275210a3b Issue #25788: fileinput.hook_encoded() now supports an "errors" argument
for passing to open.  Original patch by Joseph Hackman.
2016-04-27 23:13:46 +03:00
Victor Stinner 8153ac8f00 Issue #26249: Mention PyMem_Malloc() change in What's New in Python 3.6 in the
Optimizations section.
2016-04-24 22:33:26 +02:00
Victor Stinner f5c4b99034 PyMem_Malloc() now uses the fast pymalloc allocator
Issue #26249: PyMem_Malloc() allocator family now uses the pymalloc allocator
rather than system malloc(). Applications calling PyMem_Malloc() without
holding the GIL can now crash: use PYTHONMALLOC=debug environment variable to
validate the usage of memory allocators in your application.
2016-04-22 16:26:23 +02:00
Serhiy Storchaka b6a9c9761c Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error
messages.
2016-04-17 09:39:28 +03:00
Martin Panter 528619b6c3 Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows 2016-04-16 23:42:37 +00:00
Martin Panter 0cab9c1eba Issue #26404: Add context manager to socketserver, by Aviv Palivoda 2016-04-13 00:36:52 +00:00
Martin Panter 50ab1a3694 Issue #26685: Raise OSError if closing a socket fails 2016-04-11 00:38:12 +00:00
Martin Panter 3872d62133 Issue #25609: Double back-ticks to avoid “make check” buildbot failure 2016-04-10 02:41:25 +00:00
Brett Cannon 5f0507d8ab Issue #26587: Allow .pth files to specify file paths as well as
directories.

Thanks to Wolfgang Langner for the bug report and initial version of
the patch.
2016-04-08 15:04:28 -07:00
Brett Cannon 9e080e0e74 Issue #25609: Introduce contextlib.AbstractContextManager and
typing.ContextManager.
2016-04-08 12:15:27 -07:00
Martin Panter dcfebb32e2 Issue #26676: Add missing XMLPullParser to ElementTree.__all__ 2016-04-01 06:55:55 +00:00
Victor Stinner 404cdc5a92 faulthandler: add Windows exception handler
Issue #23848: On Windows, faulthandler.enable() now also installs an exception
handler to dump the traceback of all Python threads on any Windows exception,
not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
2016-03-23 10:39:17 +01:00
Victor Stinner fac395681f Optimize bytes.replace(b'', b'.')
Issue #26574: Optimize bytes.replace(b'', b'.') and
bytearray.replace(b'', b'.'): up to 80% faster. Patch written by Josh Snider.
2016-03-21 10:38:58 +01:00
Berker Peksag 3c3d7f4b99 Issue #18787: spwd.getspnam() now raises a PermissionError if the user
doesn't have privileges.
2016-03-19 11:44:17 +02:00
Victor Stinner ee803a8d2c Issue #26567: enhance ResourceWarning example 2016-03-19 10:33:25 +01:00
Victor Stinner 914cde89d4 On ResourceWarning, log traceback where the object was allocated
Issue #26567:

* Add a new function PyErr_ResourceWarning() function to pass the destroyed
  object
* Add a source attribute to warnings.WarningMessage
* Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where
  source object was allocated.
2016-03-19 01:03:51 +01:00
Victor Stinner 9b46a57302 Doc: fix typos, patch written by Stefan Behnel 2016-03-18 15:10:43 +01:00
Victor Stinner c2fc56836f Enhance documentation on malloc debug hooks
Issue #26564, #26516, #26563.
2016-03-18 11:04:31 +01:00