Fred Drake [Wed, 7 Sep 2005 05:18:06 +0000 (05:18 +0000)]
note that the return and yield statements cannot be used at the top level in
exec statements; people coming from certain other languages seem to be
confused by this on a regular basis
(backported from trunk revision 1.77)
Walter Dörwald [Thu, 1 Sep 2005 12:03:14 +0000 (12:03 +0000)]
Backport checkin:
SF bug #1235646: codecs.StreamRecoder.next() now reencodes the data it reads
from the input stream, so that the output is a byte string in the correct
encoding instead of a unicode string.
Georg Brandl [Thu, 1 Sep 2005 06:26:03 +0000 (06:26 +0000)]
Reverting previous checkin. This breaks too much of HTMLParser to be applied
without thought. Anyway, such malformed HTML is better handled by something
like BeautifulSoup.
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: Lib/HTMLParser.py
CVS: ----------------------------------------------------------------------
Walter Dörwald [Tue, 30 Aug 2005 10:46:06 +0000 (10:46 +0000)]
Backport checkin:
SF bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain
about illegal code points. The codec now supports PEP 293 style error handlers.
(This is a variant of the patch by Nik Haldimann that detects truncated data)
Martin v. Löwis [Wed, 24 Aug 2005 07:38:36 +0000 (07:38 +0000)]
Return complete lines from codec stream readers
even if there is an exception in later lines, resulting in
correct line numbers for decoding errors in source code. Fixes #1178484.
Kurt B. Kaiser [Tue, 23 Aug 2005 17:38:56 +0000 (17:38 +0000)]
- Mac line endings were incorrect when pasting code from some browsers
when using X11 and the Fink distribution. Python Bug 1263656.
Modified Files:
Tag: release24-maint
NEWS.txt ScriptBinding.py
Fred Drake [Tue, 23 Aug 2005 04:35:22 +0000 (04:35 +0000)]
ord() documentation update; this is what remains applicable from
SF patch #1057588; other changes make the rest of the patch out of date
or otherwise unnecessary
(backported from trunk revision 1.188)
SF bug #1242657: list(obj) can swallow KeyboardInterrupt
Fix over-aggressive PyErr_Clear(). The same code fragment appears in
various guises in list.extend(), map(), filter(), zip(), and internally
in PySequence_Tuple().
Barry Warsaw [Mon, 15 Aug 2005 17:32:56 +0000 (17:32 +0000)]
Fix for SF bug # 900092, hotshot.stats.load assertion failure. This patch
restores the tracing of a 'return' event for exceptions that cause a function
to exit. Also, update the unit test.
* SF bug #1257731: Fix logic in set.__contains__(), set.remove(),
and set.discard for handling keys that both inherite from set and
define their own __hash__() function.
* Fixed O(n) performance issue with set.pop() which should have been
an O(1) process.
(Backport)
Fix a problem in Tkinter introduced by SF patch #869468 (checked in as
1.179): delete bogus __hasattr__ and __delattr__ methods on class Tk
that were breaking Tkdnd.
Walter Dörwald [Wed, 20 Jul 2005 22:52:09 +0000 (22:52 +0000)]
Backport checkin:
Make attributes and local variables in the StreamReader str objects instead
of unicode objects, so that codecs that do a str->str decoding won't promote
the result to unicode. This fixes SF bug #1241507.
Fred Drake [Wed, 20 Jul 2005 04:33:49 +0000 (04:33 +0000)]
add information about alternate implementations, noting that documentation
for the implementation should be consulted
(thanks to Evelyn Mitchell for suggesting this; backported from trunk rev 1.16)
Walter Dörwald [Tue, 12 Jul 2005 21:58:38 +0000 (21:58 +0000)]
Backport checkin:
Apply SF patch #1101726: Fix buffer overrun in tokenizer.c when a source file
with a PEP 263 encoding declaration results in long decoded line.