Commit Graph

11516 Commits

Author SHA1 Message Date
Hye-Shik Chang b788346573 Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.  (Submitted by Ray Chason)
2006-10-08 13:48:34 +00:00
Armin Rigo 615842fba6 A very minor bug fix: this code looks like it is designed to accept
any hue value and do the modulo itself, except it doesn't quite do
it in all cases.  At least, the "cannot get here" comment was wrong.
2006-10-06 16:33:22 +00:00
Andrew M. Kuchling 9d57e53e4e [Bug #1545341] Allow 'classifier' parameter to be a tuple as well as a list. Will backport. 2006-10-06 13:18:26 +00:00
Martin v. Löwis 8b274265f0 Add MSVC8 project files to create wininst-8.exe. 2006-10-04 15:25:28 +00:00
Armin Rigo 7ccbca93a2 Forward-port of r52136,52138: a review of overflow-detecting code.
* unified the way intobject, longobject and mystrtoul handle
  values around -sys.maxint-1.

* in general, trying to entierely avoid overflows in any computation
  involving signed ints or longs is extremely involved.  Fixed a few
  simple cases where a compiler might be too clever (but that's all
  guesswork).

* more overflow checks against bad data in marshal.c.

* 2.5 specific: fixed a number of places that were still confusing int
  and Py_ssize_t.  Some of them could potentially have caused
  "real-world" breakage.

* list.pop(x): fixing overflow issues on x was messy.  I just reverted
  to PyArg_ParseTuple("n"), which does the right thing.  (An obscure
  test was trying to give a Decimal to list.pop()... doesn't make
  sense any more IMHO)

* trying to write a few tests...
2006-10-04 12:17:45 +00:00
Martin v. Löwis 820d6ac9d7 Fix integer negation and absolute value to not rely
on undefined behaviour of the C compiler anymore.
Will backport to 2.5 and 2.4.
2006-10-04 05:47:34 +00:00
Jeremy Hylton 82271f13e7 Fix for SF bug 1569998: break permitted inside try.
The compiler was checking that there was something on the fblock
stack, but not that there was a loop on the stack.  Fixed that and
added a test for the specific syntax error.

Bug fix candidate.
2006-10-04 02:24:52 +00:00
Barry Warsaw 1e3c3b15df decode_rfc2231(): As Christian Robottom Reis points out, it makes no sense to
test for parts > 3 when we use .split(..., 2).
2006-10-04 02:06:36 +00:00
Brett Cannon 373d90b365 Convert test_imp over to unittest. 2006-10-03 23:23:14 +00:00
Vinay Sajip 2c050af28b Modified LogRecord.__init__ to make the func parameter optional. (See SF #1569622). 2006-10-03 18:21:56 +00:00
Kurt B. Kaiser e0b673573b Add comment explaining that error msgs may be due to user code when
running w/o subprocess.
2006-10-01 21:54:37 +00:00
Kurt B. Kaiser c426ffcdfc Some syntax errors were being caught by tokenize during the tabnanny
check, resulting in obscure error messages.  Do the syntax check
first.  Bug 1562716, 1562719
2006-10-01 21:16:45 +00:00
Georg Brandl 54c3db55a2 Convert test_import to unittest. 2006-09-30 12:16:03 +00:00
Georg Brandl a92979a1db Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
2006-09-30 11:22:28 +00:00
Georg Brandl 4ddfcd3b60 Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
2006-09-30 11:17:34 +00:00
Georg Brandl 154324a8c3 Bug #1560617: in pyclbr, return full module name not only for classes,
but also for functions.
2006-09-30 11:06:47 +00:00
Georg Brandl 05b3c450a8 Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes
keep_blank_values and strict_parsing keyword arguments.
2006-09-30 10:58:01 +00:00
Georg Brandl 8d1e5bffc1 Bug #1566602: correct failure of posixpath unittest when $HOME ends
with a slash.
2006-09-30 09:13:21 +00:00
Georg Brandl 3267d28f9d Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
2006-09-30 09:03:42 +00:00
Georg Brandl 5d59c09834 Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
2006-09-30 08:43:30 +00:00
Georg Brandl 8c6674511b Bug #1565661: in webbrowser, split() the command for the default
GNOME browser in case it is a command with args.
2006-09-30 07:31:57 +00:00
Brett Cannon 11b3535280 Make the error message for when the time data and format do not match clearer. 2006-09-26 23:38:24 +00:00
Armin Rigo c839c2f226 Another crasher. 2006-09-25 15:16:26 +00:00
Georg Brandl c7986cee76 Fix a bug in traceback.format_exception_only() that led to an error
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
2006-09-24 12:50:24 +00:00
Georg Brandl a10d3afed2 Fix a bug in the parser's future statement handling that led to "with"
not being recognized as a keyword after, e.g., this statement:
from __future__ import division, with_statement
2006-09-24 12:35:36 +00:00
Georg Brandl 2c94bf7d41 Fix webbrowser.BackgroundBrowser on Windows. 2006-09-24 10:36:01 +00:00
Brett Cannon e042601251 Make output on test_strptime() be more verbose in face of failure. This is in
hopes that more information will help debug the failing test on HPPA Ubuntu.
2006-09-23 19:53:20 +00:00
Neal Norwitz 3a23017bb2 Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
These tests should be improved.  Hopefully this fixes variations when
flipping back and forth between fpdef and fplist.

Backport candidate.
2006-09-22 08:18:10 +00:00
Jack Diederich 36234e8f66 * regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t
which breaks negative counts
* added test for negative numbers
will backport to 2.5.1
2006-09-21 17:50:26 +00:00
Neal Norwitz 361b46be24 Add a "crasher" taken from the sgml bug report referenced in the comment 2006-09-11 04:32:57 +00:00
Neal Norwitz bcc119a22c Forward port of 51850 from release25-maint branch.
As mentioned on python-dev, reverting patch #1504333 because it introduced
an infinite loop in rev 47154.

This patch also adds a test to prevent the regression.
2006-09-11 04:24:09 +00:00
Brett Cannon ca2ca79d23 Remove the __unicode__ method from exceptions. Allows unicode() to be called
on exception classes.  Would require introducing a tp_unicode slot to make it
work otherwise.

Fixes bug #1551432 and will be backported.
2006-09-09 07:11:46 +00:00
Thomas Heller 2244af596a The cast function did not accept c_char_p or c_wchar_p instances
as first argument, and failed with a 'bad argument to internal function'
error message.
2006-09-07 19:09:54 +00:00
Thomas Heller fdb62f0e5f Anonymous structure fields that have a bit-width specified did not work,
and they gave a strange error message from PyArg_ParseTuple:
    function takes exactly 2 arguments (3 given).

With tests.
2006-09-07 18:56:28 +00:00
Nick Coghlan c495c66ea9 Fix the speed regression in inspect.py by adding another cache to speed up getmodule(). Patch #1553314 2006-09-07 10:50:34 +00:00
Gustavo Niemeyer c36bede6ff Fixed subprocess bug #1531862 again, after removing tests
offending buildbot
2006-09-07 00:48:33 +00:00
Georg Brandl 4e933137af Fix missing import of the types module in logging.config. 2006-09-06 20:05:58 +00:00
Georg Brandl 38f6237dfe Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
Also make sure that every exception class has __module__ set to
'exceptions'.
2006-09-06 06:50:05 +00:00
Neal Norwitz ca460d9722 with and as are now keywords. There are some generated files I can't recreate. 2006-09-06 06:28:06 +00:00
Neal Norwitz 314bef9fff Revert 51758 because it broke all the buildbots 2006-09-06 03:58:34 +00:00
Gustavo Niemeyer 8cb64eaaf3 Fixing #1531862: Do not close standard file descriptors in the
subprocess module.
2006-09-06 01:58:52 +00:00
Andrew M. Kuchling e6728252a3 [Bug #1526834] Fix crash in pdb when you do 'b f(';
the function name was placed into a regex pattern and the unbalanced paren
caused re.compile() to report an error
2006-09-05 13:19:18 +00:00
Andrew M. Kuchling a5453c48d5 [Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info(). Reported by Russell Warren 2006-09-05 13:15:41 +00:00
Hye-Shik Chang 199f1db1fa Fix a few bugs on cjkcodecs found by Oren Tirosh:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
  codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2
  codepoints now.
2006-09-05 12:07:09 +00:00
Neal Norwitz dac090d3e6 Bug #1520864 (again): unpacking singleton tuples in list comprehensions and
generator expressions (x for x, in ... ) works again.

Sigh, I only fixed for loops the first time, not list comps and genexprs too.
I couldn't find any more unpacking cases where there is a similar bug lurking.

This code should be refactored to eliminate the duplication.  I'm sure
the listcomp/genexpr code can be refactored.  I'm not sure if the for loop
can re-use any of the same code though.

Will backport to 2.5 (the only place it matters).
2006-09-05 03:53:08 +00:00
Neal Norwitz 4bc2c0919b Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34]. 2006-09-05 02:57:01 +00:00
Neal Norwitz 919d5cc163 This was found by Guido AFAIK on p3yk (sic) branch. 2006-09-05 02:35:08 +00:00
Neal Norwitz a22975fb35 Fix SF bug #1546288, crash in dict_equal. 2006-09-05 02:24:03 +00:00
Tim Peters c4a70fbb78 Add missing svn:eol-style property to text files. 2006-09-05 02:22:17 +00:00
Tim Peters dd5e7b9ae3 Whitespace normalization. 2006-09-05 02:21:19 +00:00