Commit d951625f authored by Robert Collins's avatar Robert Collins

Merge 2.7 heads.

parents 11ac1a82 14462d48
...@@ -600,21 +600,29 @@ Element Objects ...@@ -600,21 +600,29 @@ Element Objects
.. attribute:: text .. attribute:: text
tail
The *text* attribute can be used to hold additional data associated with These attributes can be used to hold additional data associated with
the element. As the name implies this attribute is usually a string but the element. Their values are usually strings but may be any
may be any application-specific object. If the element is created from application-specific object. If the element is created from
an XML file the attribute will contain any text found between the element an XML file, the *text* attribute holds either the text between
tags. the element's start tag and its first child or end tag, or ``None``, and
the *tail* attribute holds either the text between the element's
end tag and the next tag, or ``None``. For the XML data
.. code-block:: xml
.. attribute:: tail <a><b>1<c>2<d/>3</c></b>4</a>
The *tail* attribute can be used to hold additional data associated with the *a* element has ``None`` for both *text* and *tail* attributes,
the element. This attribute is usually a string but may be any the *b* element has *text* ``"1"`` and *tail* ``"4"``,
application-specific object. If the element is created from an XML file the *c* element has *text* ``"2"`` and *tail* ``None``,
the attribute will contain any text found after the element's end tag and and the *d* element has *text* ``None`` and *tail* ``"3"``.
before the next tag.
To collect the inner text of an element, see :meth:`itertext`, for
example ``"".join(element.itertext())``.
Applications may store arbitrary objects in these attributes.
.. attribute:: attrib .. attribute:: attrib
......
...@@ -152,7 +152,29 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short); ...@@ -152,7 +152,29 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short);
* doesn't support NaNs. * doesn't support NaNs.
*/ */
#if !defined(Py_NAN) && !defined(Py_NO_NAN) #if !defined(Py_NAN) && !defined(Py_NO_NAN)
#define Py_NAN (Py_HUGE_VAL * 0.) #if !defined(__INTEL_COMPILER)
#define Py_NAN (Py_HUGE_VAL * 0.)
#else /* __INTEL_COMPILER */
#if defined(ICC_NAN_STRICT)
#pragma float_control(push)
#pragma float_control(precise, on)
#pragma float_control(except, on)
#if defined(_MSC_VER)
__declspec(noinline)
#else /* Linux */
__attribute__((noinline))
#endif /* _MSC_VER */
static double __icc_nan()
{
return sqrt(-1.0);
}
#pragma float_control (pop)
#define Py_NAN __icc_nan()
#else /* ICC_NAN_RELAXED as default for Intel Compiler */
static union { unsigned char buf[8]; double __icc_nan; } __nan_store = {0,0,0,0,0,0,0xf8,0x7f};
#define Py_NAN (__nan_store.__icc_nan)
#endif /* ICC_NAN_STRICT */
#endif /* __INTEL_COMPILER */
#endif #endif
/* Py_OVERFLOWED(X) /* Py_OVERFLOWED(X)
......
...@@ -426,7 +426,7 @@ class MSVCCompiler(CCompiler) : ...@@ -426,7 +426,7 @@ class MSVCCompiler(CCompiler) :
self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
if self.__version >= 7: if self.__version >= 7:
self.ldflags_shared_debug = [ self.ldflags_shared_debug = [
'/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG'
] ]
self.ldflags_static = [ '/nologo'] self.ldflags_static = [ '/nologo']
......
What's New in IDLE 2.7.11?
=========================
*Release date:
- Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi.
- Issue 24745: Idle editor default font. Switch from Courier to
platform-sensitive TkFixedFont. This should not affect current customized
font selections. If there is a problem, edit $HOME/.idlerc/config-main.cfg
and remove 'fontxxx' entries from [Editor Window]. Patch by Mark Roseman.
- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
Do not print false prompts. Original patch by Adnan Umer.
- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
- Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
decoding unicode literals.
What's New in IDLE 2.7.10? What's New in IDLE 2.7.10?
========================= =========================
*Release data: 2015-05-23* *Release date: 2015-05-23*
- Issue #23583: Fixed writing unicode to standard output stream in IDLE. - Issue #23583: Fixed writing unicode to standard output stream in IDLE.
...@@ -20,7 +42,7 @@ What's New in IDLE 2.7.10? ...@@ -20,7 +42,7 @@ What's New in IDLE 2.7.10?
What's New in IDLE 2.7.9? What's New in IDLE 2.7.9?
========================= =========================
*Release data: 2014-12-10* *Release date: 2014-12-10*
- Issue #16893: Update Idle doc chapter to match current Idle and add new - Issue #16893: Update Idle doc chapter to match current Idle and add new
information. information.
......
...@@ -71,7 +71,7 @@ class ScriptBinding: ...@@ -71,7 +71,7 @@ class ScriptBinding:
try: try:
tabnanny.process_tokens(tokenize.generate_tokens(f.readline)) tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
except tokenize.TokenError as msg: except tokenize.TokenError as msg:
msgtxt, (lineno, start) = msg msgtxt, (lineno, start) = msg.args
self.editwin.gotoline(lineno) self.editwin.gotoline(lineno)
self.errorbox("Tabnanny Tokenizing Error", self.errorbox("Tabnanny Tokenizing Error",
"Token Error: %s" % msgtxt) "Token Error: %s" % msgtxt)
......
...@@ -10,8 +10,7 @@ from idlelib.PyShell import PyShellFileList ...@@ -10,8 +10,7 @@ from idlelib.PyShell import PyShellFileList
def StackBrowser(root, flist=None, tb=None, top=None): def StackBrowser(root, flist=None, tb=None, top=None):
if top is None: if top is None:
from Tkinter import Toplevel top = tk.Toplevel(root)
top = Toplevel(root)
sc = ScrolledCanvas(top, bg="white", highlightthickness=0) sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
sc.frame.pack(expand=1, fill="both") sc.frame.pack(expand=1, fill="both")
item = StackTreeItem(flist, tb) item = StackTreeItem(flist, tb)
...@@ -108,12 +107,9 @@ class VariablesTreeItem(ObjectTreeItem): ...@@ -108,12 +107,9 @@ class VariablesTreeItem(ObjectTreeItem):
def IsExpandable(self): def IsExpandable(self):
return len(self.object) > 0 return len(self.object) > 0
def keys(self):
return self.object.keys()
def GetSubList(self): def GetSubList(self):
sublist = [] sublist = []
for key in self.keys(): for key in self.object.keys():
try: try:
value = self.object[key] value = self.object[key]
except KeyError: except KeyError:
...@@ -124,7 +120,7 @@ class VariablesTreeItem(ObjectTreeItem): ...@@ -124,7 +120,7 @@ class VariablesTreeItem(ObjectTreeItem):
sublist.append(item) sublist.append(item)
return sublist return sublist
def _stack_viewer(parent): def _stack_viewer(parent): # htest #
root = tk.Tk() root = tk.Tk()
root.title("Test StackViewer") root.title("Test StackViewer")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry()))) width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
......
...@@ -624,14 +624,12 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -624,14 +624,12 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
for time, test in test_times[:10]: for time, test in test_times[:10]:
print "%s: %.1fs" % (test, time) print "%s: %.1fs" % (test, time)
if bad: if bad:
bad = set(bad) - set(environment_changed) print count(len(bad), "test"), "failed:"
if bad: printlist(bad)
print count(len(bad), "test"), "failed:" if environment_changed:
printlist(bad) print "{} altered the execution environment:".format(
if environment_changed: count(len(environment_changed), "test"))
print "{} altered the execution environment:".format( printlist(environment_changed)
count(len(environment_changed), "test"))
printlist(environment_changed)
if skipped and not quiet: if skipped and not quiet:
print count(len(skipped), "test"), "skipped:" print count(len(skipped), "test"), "skipped:"
printlist(skipped) printlist(skipped)
......
...@@ -441,10 +441,14 @@ def _netbios_getnode(): ...@@ -441,10 +441,14 @@ def _netbios_getnode():
_uuid_generate_random = _uuid_generate_time = _UuidCreate = None _uuid_generate_random = _uuid_generate_time = _UuidCreate = None
try: try:
import ctypes, ctypes.util import ctypes, ctypes.util
import sys
# The uuid_generate_* routines are provided by libuuid on at least # The uuid_generate_* routines are provided by libuuid on at least
# Linux and FreeBSD, and provided by libc on Mac OS X. # Linux and FreeBSD, and provided by libc on Mac OS X.
for libname in ['uuid', 'c']: _libnames = ['uuid']
if not sys.platform.startswith('win'):
_libnames.append('c')
for libname in _libnames:
try: try:
lib = ctypes.CDLL(ctypes.util.find_library(libname)) lib = ctypes.CDLL(ctypes.util.find_library(libname))
except: except:
...@@ -455,6 +459,7 @@ try: ...@@ -455,6 +459,7 @@ try:
_uuid_generate_time = lib.uuid_generate_time _uuid_generate_time = lib.uuid_generate_time
if _uuid_generate_random is not None: if _uuid_generate_random is not None:
break # found everything we were looking for break # found everything we were looking for
del _libnames
# The uuid_generate_* functions are broken on MacOS X 10.5, as noted # The uuid_generate_* functions are broken on MacOS X 10.5, as noted
# in issue #8621 the function generates the same sequence of values # in issue #8621 the function generates the same sequence of values
...@@ -463,7 +468,6 @@ try: ...@@ -463,7 +468,6 @@ try:
# #
# Assume that the uuid_generate functions are broken from 10.5 onward, # Assume that the uuid_generate functions are broken from 10.5 onward,
# the test can be adjusted when a later version is fixed. # the test can be adjusted when a later version is fixed.
import sys
if sys.platform == 'darwin': if sys.platform == 'darwin':
import os import os
if int(os.uname()[2].split('.')[0]) >= 9: if int(os.uname()[2].split('.')[0]) >= 9:
......
...@@ -573,6 +573,7 @@ Gregor Hoffleit ...@@ -573,6 +573,7 @@ Gregor Hoffleit
Chris Hoffman Chris Hoffman
Stefan Hoffmeister Stefan Hoffmeister
Albert Hofkamp Albert Hofkamp
Chris Hogan
Tomas Hoger Tomas Hoger
Jonathan Hogg Jonathan Hogg
Kamilla Holanda Kamilla Holanda
...@@ -1139,6 +1140,7 @@ Vlad Riscutia ...@@ -1139,6 +1140,7 @@ Vlad Riscutia
Wes Rishel Wes Rishel
Daniel Riti Daniel Riti
Juan M. Bello Rivas Juan M. Bello Rivas
Mohd Sanad Zaki Rizvi
Davide Rizzo Davide Rizzo
Anthony Roach Anthony Roach
Carl Robben Carl Robben
......
...@@ -10,6 +10,9 @@ What's New in Python 2.7.11? ...@@ -10,6 +10,9 @@ What's New in Python 2.7.11?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray - Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
object now always allocates place for trailing null byte and it's buffer now object now always allocates place for trailing null byte and it's buffer now
is always null-terminated. is always null-terminated.
...@@ -37,6 +40,8 @@ Library ...@@ -37,6 +40,8 @@ Library
- Issue #22812: Fix unittest discovery examples. - Issue #22812: Fix unittest discovery examples.
Patch from Pam McA'Nulty. Patch from Pam McA'Nulty.
- Issue #24634: Importing uuid should not try to load libc on Windows
- Issue #23652: Make it possible to compile the select module against the - Issue #23652: Make it possible to compile the select module against the
libc headers from the Linux Standard Base, which do not include some libc headers from the Linux Standard Base, which do not include some
EPOLL macros. Initial patch by Matt Frank. EPOLL macros. Initial patch by Matt Frank.
...@@ -100,7 +105,7 @@ Library ...@@ -100,7 +105,7 @@ Library
- Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked - Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
cursor type. cursor type.
- Issue #24286: Dict view were not registered with the MappingView abstract - Issue #24286: Dict view were not registered with the MappingView abstract
base classes. This caused key and item views in OrderedDict to not be equal base classes. This caused key and item views in OrderedDict to not be equal
to their regular dict counterparts. to their regular dict counterparts.
...@@ -139,6 +144,19 @@ Build ...@@ -139,6 +144,19 @@ Build
IDLE IDLE
---- ----
- Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi.
- Issue 24745: Idle editor default font. Switch from Courier to
platform-sensitive TkFixedFont. This should not affect current customized
font selections. If there is a problem, edit $HOME/.idlerc/config-main.cfg
and remove 'fontxxx' entries from [Editor Window]. Patch by Mark Roseman.
- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
Do not print false prompts. Original patch by Adnan Umer.
- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
- Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for - Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
decoding unicode literals. decoding unicode literals.
...@@ -179,9 +197,9 @@ What's New in Python 2.7.10 release candidate 1? ...@@ -179,9 +197,9 @@ What's New in Python 2.7.10 release candidate 1?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #23971: Fix underestimated presizing in dict.fromkeys(). - Issue #23971: Fix underestimated presizing in dict.fromkeys().
- Issue #23757: PySequence_Tuple() incorrectly called the concrete list API - Issue #23757: PySequence_Tuple() incorrectly called the concrete list API
when the data was a list subclass. when the data was a list subclass.
- Issue #23629: Fix the default __sizeof__ implementation for variable-sized - Issue #23629: Fix the default __sizeof__ implementation for variable-sized
...@@ -772,7 +790,7 @@ IDLE ...@@ -772,7 +790,7 @@ IDLE
- Issue #16233: A module browser (File : Class Browser, Alt+C) requires a - Issue #16233: A module browser (File : Class Browser, Alt+C) requires a
editor window with a filename. When Class Browser is requested otherwise, editor window with a filename. When Class Browser is requested otherwise,
from a shell, output window, or 'Untitled' editor, Idle no longer displays from a shell, output window, or 'Untitled' editor, Idle no longer displays
an error box. It now pops up an Open Module box (Alt+M). If a valid name an error box. It now pops up an Open Module box (Alt+M). If a valid name
is entered and a module is opened, a corresponding browser is also opened. is entered and a module is opened, a corresponding browser is also opened.
- Issue #4832: Save As to type Python files automatically adds .py to the - Issue #4832: Save As to type Python files automatically adds .py to the
...@@ -910,18 +928,18 @@ Library ...@@ -910,18 +928,18 @@ Library
- Issue #21672: Fix the behavior of ntpath.join on UNC-style paths. - Issue #21672: Fix the behavior of ntpath.join on UNC-style paths.
- Issue #19145: The times argument for itertools.repeat now handles - Issue #19145: The times argument for itertools.repeat now handles
negative values the same way for keyword arguments as it does for negative values the same way for keyword arguments as it does for
positional arguments. positional arguments.
- Issue #21832: Require named tuple inputs to be exact strings. - Issue #21832: Require named tuple inputs to be exact strings.
- Issue #8343: Named group error messages in the re module did not show - Issue #8343: Named group error messages in the re module did not show
the name of the erroneous group. the name of the erroneous group.
- Issue #21491: SocketServer: Fix a race condition in child processes reaping. - Issue #21491: SocketServer: Fix a race condition in child processes reaping.
- Issue #21635: The difflib SequenceMatcher.get_matching_blocks() method - Issue #21635: The difflib SequenceMatcher.get_matching_blocks() method
cache didn't match the actual result. The former was a list of tuples cache didn't match the actual result. The former was a list of tuples
and the latter was a list of named tuples. and the latter was a list of named tuples.
...@@ -958,7 +976,7 @@ Library ...@@ -958,7 +976,7 @@ Library
- Issue #8743: Fix interoperability between set objects and the - Issue #8743: Fix interoperability between set objects and the
collections.Set() abstract base class. collections.Set() abstract base class.
- Issue #21481: Argparse equality and inequality tests now return - Issue #21481: Argparse equality and inequality tests now return
NotImplemented when comparing to an unknown type. NotImplemented when comparing to an unknown type.
IDLE IDLE
...@@ -1100,7 +1118,7 @@ Library ...@@ -1100,7 +1118,7 @@ Library
- Issue #21470: Do a better job seeding the random number generator by - Issue #21470: Do a better job seeding the random number generator by
using enough bytes to span the full state space of the Mersenne Twister. using enough bytes to span the full state space of the Mersenne Twister.
- Issue #21469: Reduced the risk of false positives in robotparser by - Issue #21469: Reduced the risk of false positives in robotparser by
checking to make sure that robots.txt has been read or does not exist checking to make sure that robots.txt has been read or does not exist
prior to returning True in can_fetch(). prior to returning True in can_fetch().
...@@ -1597,7 +1615,7 @@ Library ...@@ -1597,7 +1615,7 @@ Library
- Issue #19131: The aifc module now correctly reads and writes sampwidth of - Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams. compressed streams.
- Issue #19158: a rare race in BoundedSemaphore could allow .release() too - Issue #19158: A rare race in BoundedSemaphore could allow .release() too
often. often.
- Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. - Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.
...@@ -3598,7 +3616,7 @@ Library ...@@ -3598,7 +3616,7 @@ Library
greater or equal to the default value, the value with which the interpreter greater or equal to the default value, the value with which the interpreter
was built. was built.
- Issue #11802: The cache in filecmp now has a maximum size of 100 so that - Issue #11802: The cache in filecmp now has a maximum size of 100 so that
it won't grow without bound. it won't grow without bound.
- Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira - Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
...@@ -3984,7 +4002,7 @@ Library ...@@ -3984,7 +4002,7 @@ Library
- Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get - Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get
around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso. around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
- Issue #10761: Fix tarfile.extractall failure when symlinked files are - Issue #10761: Fix tarfile.extractall failure when symlinked files are
present. Initial patch by Scott Leerssen. present. Initial patch by Scott Leerssen.
- Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the - Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the
...@@ -4495,7 +4513,7 @@ Core and Builtins ...@@ -4495,7 +4513,7 @@ Core and Builtins
- Issue #8530: Prevent stringlib fastsearch from reading beyond the front - Issue #8530: Prevent stringlib fastsearch from reading beyond the front
of an array. of an array.
- Issue #83755: Implicit set-to-frozenset conversion was not thread-safe. - Issue #83755: Implicit set-to-frozenset conversion was not thread-safe.
- Issue #9416: Fix some issues with complex formatting where the - Issue #9416: Fix some issues with complex formatting where the
output with no type specifier failed to match the str output: output with no type specifier failed to match the str output:
...@@ -4892,7 +4910,7 @@ Extension Modules ...@@ -4892,7 +4910,7 @@ Extension Modules
os.getgroups() can now return more than 16 groups on MacOSX. os.getgroups() can now return more than 16 groups on MacOSX.
- Issue #9277: Fix bug in struct.pack for bools in standard mode - Issue #9277: Fix bug in struct.pack for bools in standard mode
(e.g., struct.pack('>?')): if conversion to bool raised an exception (e.g., struct.pack('>?')): if conversion to bool raised an exception
then that exception wasn't properly propagated on machines where then that exception wasn't properly propagated on machines where
char is unsigned. char is unsigned.
...@@ -4940,7 +4958,7 @@ Build ...@@ -4940,7 +4958,7 @@ Build
- Issue #9275: The OSX installer once again installs links to binaries in - Issue #9275: The OSX installer once again installs links to binaries in
``/usr/local/bin``. ``/usr/local/bin``.
- Issue #9392: A framework build on OSX will once again use a versioned name - Issue #9392: A framework build on OSX will once again use a versioned name
of the ``2to3`` tool, that is you can use ``2to3-2.7`` to select the Python of the ``2to3`` tool, that is you can use ``2to3-2.7`` to select the Python
2.7 edition of 2to3. 2.7 edition of 2to3.
...@@ -6899,7 +6917,7 @@ Library ...@@ -6899,7 +6917,7 @@ Library
- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6
- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now
always result in NULL. always result in NULL.
- Issue #5042: ctypes Structure sub-subclass does now initialize correctly with - Issue #5042: ctypes Structure sub-subclass does now initialize correctly with
...@@ -7744,7 +7762,7 @@ IDLE ...@@ -7744,7 +7762,7 @@ IDLE
wasn't working with file paths containing spaces. wasn't working with file paths containing spaces.
- Issue #5783: Windows: Version string for the .chm help file changed, - Issue #5783: Windows: Version string for the .chm help file changed,
file not being accessed Patch by Guilherme Polo/ file not being accessed. Patch by Guilherme Polo/
- Issue #1529142: Allow multiple IDLE GUI/subprocess pairs to exist - Issue #1529142: Allow multiple IDLE GUI/subprocess pairs to exist
simultaneously. Thanks to David Scherer for suggesting the use of an simultaneously. Thanks to David Scherer for suggesting the use of an
...@@ -8440,7 +8458,7 @@ Library ...@@ -8440,7 +8458,7 @@ Library
- Issue #3437: Bug fix in robotparser parsing of Allow: lines. - Issue #3437: Bug fix in robotparser parsing of Allow: lines.
- Issue #1592: Improve error reporting when operations are attempted - Issue #1592: Improve error reporting when operations are attempted
on a closed shelf. on a closed shelf.
- Deprecate the "ast" parser function aliases. - Deprecate the "ast" parser function aliases.
...@@ -8662,7 +8680,7 @@ Core and Builtins ...@@ -8662,7 +8680,7 @@ Core and Builtins
- Add future_builtins.ascii(). - Add future_builtins.ascii().
- Several set methods now accept multiple arguments: update(), union(), - Several set methods now accept multiple arguments: update(), union(),
intersection(), intersection_update(), difference(), and difference_update(). intersection(), intersection_update(), difference(), and difference_update().
- Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes. - Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.
...@@ -8698,7 +8716,7 @@ Extension Modules ...@@ -8698,7 +8716,7 @@ Extension Modules
----------------- -----------------
- Issue #1179: [CVE-2007-4965] Integer overflow in imageop module. - Issue #1179: [CVE-2007-4965] Integer overflow in imageop module.
- Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb. - Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb.
- Issue #2138: Add factorial() to the math module. - Issue #2138: Add factorial() to the math module.
...@@ -9680,9 +9698,9 @@ Core and builtins ...@@ -9680,9 +9698,9 @@ Core and builtins
- When __slots__ are set to a unicode string, make it work the same as - When __slots__ are set to a unicode string, make it work the same as
setting a plain string, ie don't expand to single letter identifiers. setting a plain string, ie don't expand to single letter identifiers.
- Request #1191699: Slices can now be pickled. - Request #1191699: Slices can now be pickled.
- Request #1193128: str.translate() now allows a None argument for - Request #1193128: str.translate() now allows a None argument for
translations that only remove characters without re-mapping the translations that only remove characters without re-mapping the
remaining characters. remaining characters.
...@@ -11201,3 +11219,4 @@ Mac ...@@ -11201,3 +11219,4 @@ Mac
---- ----
**(For information about older versions, consult the HISTORY file.)** **(For information about older versions, consult the HISTORY file.)**
...@@ -235,7 +235,10 @@ get_coding_spec(const char *s, Py_ssize_t size) ...@@ -235,7 +235,10 @@ get_coding_spec(const char *s, Py_ssize_t size)
if (begin < t) { if (begin < t) {
char* r = new_string(begin, t - begin); char* r = new_string(begin, t - begin);
char* q = get_normal_name(r); char* q;
if (!r)
return NULL;
q = get_normal_name(r);
if (r != q) { if (r != q) {
PyMem_FREE(r); PyMem_FREE(r);
r = new_string(q, strlen(q)); r = new_string(q, strlen(q));
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment