Commit d951625f authored by Robert Collins's avatar Robert Collins

Merge 2.7 heads.

parents 11ac1a82 14462d48
......@@ -600,21 +600,29 @@ Element Objects
.. attribute:: text
tail
The *text* attribute can be used to hold additional data associated with
the element. As the name implies this attribute is usually a string but
may be any application-specific object. If the element is created from
an XML file the attribute will contain any text found between the element
tags.
These attributes can be used to hold additional data associated with
the element. Their values are usually strings but may be any
application-specific object. If the element is created from
an XML file, the *text* attribute holds either the text between
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 element. This attribute is usually a string but may be any
application-specific object. If the element is created from an XML file
the attribute will contain any text found after the element's end tag and
before the next tag.
the *a* element has ``None`` for both *text* and *tail* attributes,
the *b* element has *text* ``"1"`` and *tail* ``"4"``,
the *c* element has *text* ``"2"`` and *tail* ``None``,
and the *d* element has *text* ``None`` and *tail* ``"3"``.
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
......
......@@ -152,7 +152,29 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short);
* doesn't support NaNs.
*/
#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
/* Py_OVERFLOWED(X)
......
......@@ -426,7 +426,7 @@ class MSVCCompiler(CCompiler) :
self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
if self.__version >= 7:
self.ldflags_shared_debug = [
'/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None'
'/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG'
]
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?
=========================
*Release data: 2015-05-23*
*Release date: 2015-05-23*
- Issue #23583: Fixed writing unicode to standard output stream in IDLE.
......@@ -20,7 +42,7 @@ What's New in IDLE 2.7.10?
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
information.
......
......@@ -71,7 +71,7 @@ class ScriptBinding:
try:
tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
except tokenize.TokenError as msg:
msgtxt, (lineno, start) = msg
msgtxt, (lineno, start) = msg.args
self.editwin.gotoline(lineno)
self.errorbox("Tabnanny Tokenizing Error",
"Token Error: %s" % msgtxt)
......
......@@ -10,8 +10,7 @@ from idlelib.PyShell import PyShellFileList
def StackBrowser(root, flist=None, tb=None, top=None):
if top is None:
from Tkinter import Toplevel
top = Toplevel(root)
top = tk.Toplevel(root)
sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
sc.frame.pack(expand=1, fill="both")
item = StackTreeItem(flist, tb)
......@@ -108,12 +107,9 @@ class VariablesTreeItem(ObjectTreeItem):
def IsExpandable(self):
return len(self.object) > 0
def keys(self):
return self.object.keys()
def GetSubList(self):
sublist = []
for key in self.keys():
for key in self.object.keys():
try:
value = self.object[key]
except KeyError:
......@@ -124,7 +120,7 @@ class VariablesTreeItem(ObjectTreeItem):
sublist.append(item)
return sublist
def _stack_viewer(parent):
def _stack_viewer(parent): # htest #
root = tk.Tk()
root.title("Test StackViewer")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
......
......@@ -623,8 +623,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
print "10 slowest tests:"
for time, test in test_times[:10]:
print "%s: %.1fs" % (test, time)
if bad:
bad = set(bad) - set(environment_changed)
if bad:
print count(len(bad), "test"), "failed:"
printlist(bad)
......
......@@ -441,10 +441,14 @@ def _netbios_getnode():
_uuid_generate_random = _uuid_generate_time = _UuidCreate = None
try:
import ctypes, ctypes.util
import sys
# The uuid_generate_* routines are provided by libuuid on at least
# 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:
lib = ctypes.CDLL(ctypes.util.find_library(libname))
except:
......@@ -455,6 +459,7 @@ try:
_uuid_generate_time = lib.uuid_generate_time
if _uuid_generate_random is not None:
break # found everything we were looking for
del _libnames
# The uuid_generate_* functions are broken on MacOS X 10.5, as noted
# in issue #8621 the function generates the same sequence of values
......@@ -463,7 +468,6 @@ try:
#
# Assume that the uuid_generate functions are broken from 10.5 onward,
# the test can be adjusted when a later version is fixed.
import sys
if sys.platform == 'darwin':
import os
if int(os.uname()[2].split('.')[0]) >= 9:
......
......@@ -573,6 +573,7 @@ Gregor Hoffleit
Chris Hoffman
Stefan Hoffmeister
Albert Hofkamp
Chris Hogan
Tomas Hoger
Jonathan Hogg
Kamilla Holanda
......@@ -1139,6 +1140,7 @@ Vlad Riscutia
Wes Rishel
Daniel Riti
Juan M. Bello Rivas
Mohd Sanad Zaki Rizvi
Davide Rizzo
Anthony Roach
Carl Robben
......
......@@ -10,6 +10,9 @@ What's New in Python 2.7.11?
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
object now always allocates place for trailing null byte and it's buffer now
is always null-terminated.
......@@ -37,6 +40,8 @@ Library
- Issue #22812: Fix unittest discovery examples.
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
libc headers from the Linux Standard Base, which do not include some
EPOLL macros. Initial patch by Matt Frank.
......@@ -139,6 +144,19 @@ Build
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
decoding unicode literals.
......@@ -1597,7 +1615,7 @@ Library
- Issue #19131: The aifc module now correctly reads and writes sampwidth of
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.
- Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.
......@@ -7744,7 +7762,7 @@ IDLE
wasn't working with file paths containing spaces.
- 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
simultaneously. Thanks to David Scherer for suggesting the use of an
......@@ -11201,3 +11219,4 @@ Mac
----
**(For information about older versions, consult the HISTORY file.)**
......@@ -235,7 +235,10 @@ get_coding_spec(const char *s, Py_ssize_t size)
if (begin < t) {
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) {
PyMem_FREE(r);
r = new_string(q, strlen(q));
......
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