From: Antoine Pitrou Date: Thu, 6 Oct 2011 17:04:12 +0000 (+0200) Subject: Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or... X-Git-Tag: v3.3.0a1~1281 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c61c8d7a5e2884238494a678ecd22c812b062280;p=thirdparty%2FPython%2Fcpython.git Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or lists. This introduces a small private API for this common pattern. The issue has been discovered thanks to Martin's huge-mem buildbot. --- c61c8d7a5e2884238494a678ecd22c812b062280 diff --cc Makefile.pre.in index 52743e434ab3,cde3af0c420e..51da7a55af65 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@@ -659,8 -662,10 +660,9 @@@ $(srcdir)/Objects/typeslots.inc: $(srcd # Header files PYTHON_HEADERS= \ - Include/Python-ast.h \ Include/Python.h \ Include/abstract.h \ + Include/accu.h \ Include/asdl.h \ Include/ast.h \ Include/bltinmodule.h \ diff --cc Misc/NEWS index 9564891fc13e,67227b118c27..af31f9f67dd0 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -10,13 -10,9 +10,16 @@@ What's New in Python 3.3 Alpha 1 Core and Builtins ----------------- + - Issue #12911: Fix memory consumption when calculating the repr() of huge + tuples or lists. + +- PEP 393: flexible string representation. Thanks to Torsten Becker for the + initial implementation, and Victor Stinner for various bug fixes. + +- Issue #13012: The 'keepends' parameter to str.splitlines may now be passed + as a keyword argument: "my_string.splitlines(keepends=True)". The same + change also applies to bytes.splitlines and bytearray.splitlines. + - Issue #7732: Don't open a directory as a file anymore while importing a module. Ignore the direcotry if its name matchs the module name (e.g. "__init__.py") and raise a ImportError instead.