Commit Graph

1895 Commits

Author SHA1 Message Date
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
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
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
Neal Norwitz 4a8fbdb1b2 Fix %zd string formatting on Mac OS X so it prints negative numbers.
In addition to testing positive numbers, verify negative numbers work in configure.
In order to avoid compiler warnings on OS X 10.4, also change the order of the check
for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format
for Py_ssize_t.  This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't
defined at configure time.  Need to verify the buildbot results.

Backport candidate (if everyone thinks this patch can't be improved).
2006-09-22 08:16:26 +00:00
Jack Diederich d10a0f7766 added itertools.count(-n) fix 2006-09-21 20:34:49 +00:00
Brett Cannon c8939d23fe Make python.vim output more deterministic. 2006-09-20 19:28:35 +00:00
Brett Cannon f6aa86e33b Allow exceptions to be directly sliced again
(e.g., ``BaseException(1,2,3)[0:2]``).

Discovered in Python 2.5.0 by Thomas Heller and reported to python-dev.  This
should be backported to 2.5 .
2006-09-20 18:43:13 +00:00
Brett Cannon 9adeab7b96 Accidentally didn't commit Misc/NEWS entry on when __unicode__() was removed
from exceptions.
2006-09-20 18:34:28 +00:00
Gregory P. Smith 2fa067982c Fixes a bug with bsddb.DB.stat where the flags and txn keyword
arguments are transposed.  (reported by Louis Zechtzer)
..already committed to release24-maint
..needs committing to release25-maint
2006-09-19 17:35:04 +00:00
Martin v. Löwis 43fd99c8f8 Patch #1557515: Add RLIMIT_SBSIZE. 2006-09-16 17:36:37 +00:00
Georg Brandl ec6c2dfb63 Forward-port of rev. 51857:
Building with HP's cc on HP-UX turned up a couple of problems.
_PyGILState_NoteThreadState was declared as static inconsistently.
Make it static as it's not necessary outside of this module.

Some tests failed because errno was reset to 0. (I think the tests
that failed were at least: test_fcntl and test_mailbox).
Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS.
This only affected debug builds.
2006-09-11 09:38:35 +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
Nick Coghlan b3c18f87e4 Add missing NEWS entry for rev 51803 2006-09-08 10:04:38 +00:00
Gustavo Niemeyer c36bede6ff Fixed subprocess bug #1531862 again, after removing tests
offending buildbot
2006-09-07 00:48:33 +00:00
Marc-André Lemburg 9614868ece Add news item for bug fix of SF bug report #1546372. 2006-09-06 20:40:22 +00:00
Georg Brandl 4e933137af Fix missing import of the types module in logging.config. 2006-09-06 20:05:58 +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
Georg Brandl 98775dfebc Bug #1550983: emit better error messages for erroneous relative
imports (if not in package and if beyond toplevel package).
2006-09-06 06:09:31 +00:00
Georg Brandl 74bb783c2f Bug #1551427: fix a wrong NULL pointer check in the win32 version
of os.urandom().
2006-09-06 06:03:59 +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
Hye-Shik Chang 2cad3e9299 Fix a typo: 2013 -> 0213 2006-09-05 12:14:57 +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 d34e4272e0 Add a NEWS entry for str.rpartition() change 2006-09-05 02:36:20 +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 c10c9d0d6b "Conceptual" merge of rev 51711 from the 2.5 branch.
i_divmod():  As discussed on Python-Dev, changed the overflow
checking to live happily with recent gcc optimizations that
assume signed integer arithmetic never overflows.

This differs from the corresponding change on the 2.5 and 2.4
branches, using a less obscure approach, but one that /may/
tickle platform idiocies in their definitions of LONG_MIN.
The 2.4 + 2.5 change avoided introducing a dependence on
LONG_MIN, at the cost of substantially goofier code.
2006-09-05 02:18:09 +00:00
Nick Coghlan bb0996ccc5 NEWS entry on trunk for decimal module changes 2006-09-03 01:20:46 +00:00
Neal Norwitz 69e8897505 Bug #1550714: fix SystemError from itertools.tee on negative value for n.
Needs backport to 2.5.1 and earlier.
2006-09-02 02:58:13 +00:00
Neal Norwitz 6aefa916a9 Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier. 2006-09-02 02:50:35 +00:00
Neal Norwitz 4f096d9487 Patch #1542451: disallow continue anywhere under a finally
I'm undecided if this should be backported to 2.5 or 2.5.1.
Armin suggested to wait (I'm of the same opinion).  Thomas W thinks
it's fine to go in 2.5.
2006-08-21 19:47:08 +00:00
Georg Brandl 8c036ccf93 Patch #1542948: fix urllib2 header casing issue. With new test. 2006-08-20 13:15:39 +00:00
Neal Norwitz 8a26706d75 SF #1542693: Remove semi-colon at end of PyImport_ImportModuleEx macro 2006-08-19 04:25:29 +00:00
Georg Brandl 648c110671 Bug #1541682: Fix example in the "Refcount details" API docs.
Additionally, remove a faulty example showing PySequence_SetItem applied
to a newly created list object and add notes that this isn't a good idea.
2006-08-18 07:27:59 +00:00
Neal Norwitz 92422fb33b Add template for 2.6 on HEAD 2006-08-18 03:57:54 +00:00
Martin v. Löwis 2eb8c4f292 Bug #1541863: uuid.uuid1 failed to generate unique identifiers
on systems with low clock resolution.
2006-08-18 03:47:18 +00:00
Neil Schemenauer 4c6b0d5bec Fix a bug in the ``compiler`` package that caused invalid code to be
generated for generator expressions.
2006-08-16 23:38:05 +00:00
Andrew M. Kuchling c13324e313 Grammar fix 2006-08-16 17:11:18 +00:00
Marc-André Lemburg 574cfea993 Add NEWS item mentioning the reverted distutils version number patch. 2006-08-16 16:11:01 +00:00
Thomas Heller b4a0cf17c4 Remove the special casing of Py_None when converting the return value
of the Python part of a callback function to C.  If it cannot be
converted, call PyErr_WriteUnraisable with the exception we got.
Before, arbitrary data has been passed to the calling C code in this
case.

(I'm not really sure the NEWS entry is understandable, but I cannot
find better words)
2006-08-16 15:10:12 +00:00
Andrew M. Kuchling f9b5b8e9f8 Wording/typo fixes 2006-08-16 14:21:14 +00:00
Thomas Heller b0aa98fd4f The __repr__ method of a NULL py_object does no longer raise an
exception.  Remove a stray '?' character from the exception text
when the value is retrieved of such an object.

Includes tests.
2006-08-16 14:07:44 +00:00
Anthony Baxter 581795902d news entry for 51307 2006-08-16 13:08:25 +00:00
Martin v. Löwis a09fd6efdd Build _hashlib on Windows. Build OpenSSL with masm assembler code.
Fixes #1535502.
2006-08-16 12:55:10 +00:00
Kurt B. Kaiser d112bc7958 Patch #1540892: site.py Quitter() class attempts to close sys.stdin
before raising SystemExit, allowing IDLE to honor quit() and exit().

M    Lib/site.py
M    Lib/idlelib/PyShell.py
M    Lib/idlelib/CREDITS.txt
M    Lib/idlelib/NEWS.txt
M    Misc/NEWS
2006-08-16 05:01:42 +00:00
Anthony Baxter b409666e8c preparing for 2.5c1 2006-08-16 03:42:26 +00:00