Commit Graph

35800 Commits

Author SHA1 Message Date
Kristján Valur Jónsson 2c8851e614 Backport the .sln and .vcproj files for PCBuild8 from the python trunk to the 2.5 maintainance branch. This fixes build problems with visual studio 2005, and cleans up profile guided optimization. 2006-10-07 14:56:30 +00:00
Georg Brandl f6d7371ec7 Fix name. 2006-10-06 12:46:33 +00:00
Andrew M. Kuchling d8a61bae8b Case fixes 2006-10-06 10:39:51 +00:00
Fred Drake 1d26f36897 - update links
- remove Sleepycat name now that they have been bought
2006-10-06 00:03:17 +00:00
Andrew M. Kuchling d79524a4cc [Backport to 2-5maint of r52147 | andrew.kuchling ; the buildbots seem OK
with this change.]

Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
2006-10-05 17:26:33 +00:00
Armin Rigo 4b63c21d6f Forward-port of r52136: 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 11:44:06 +00:00
Armin Rigo c6f2f884b4 Compilation problem caused by conflicting typedefs for uint32_t
(unsigned long vs. unsigned int).
2006-10-04 10:23:57 +00:00
Martin v. Löwis 10525ad313 Fix integer negation and absolute value to not rely
on undefined behaviour of the C compiler anymore.
2006-10-04 05:47:47 +00:00
Barry Warsaw a027bac30a 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 01:28:43 +00:00
Martin v. Löwis 33bb6102ec Guard uintptr_t test with HAVE_STDINT_H, test for
stdint.h.
2006-10-02 15:24:01 +00:00
Martin v. Löwis da70fd1599 Fix test for uintptr_t. Fixes #1568842. 2006-10-02 14:56:15 +00:00
Georg Brandl 0988904df8 Bug #1546052: clarify that PyString_FromString(AndSize) copies the
string pointed to by its parameter.
 (backport from rev. 52078)
2006-09-30 12:03:02 +00:00
Georg Brandl 1206a933cc Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
 (backport from rev. 52075)
2006-09-30 11:22:35 +00:00
Georg Brandl 6d7c36332f Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
 (backport from rev. 52072)
2006-09-30 11:17:43 +00:00
Georg Brandl 7037745be7 Bug #1560617: in pyclbr, return full module name not only for classes,
but also for functions.
 (backport from rev. 52069)
2006-09-30 11:06:55 +00:00
Georg Brandl 9c9a9ab634 Bug #1566602: correct failure of posixpath unittest when $HOME ends
with a slash.
 (backport from rev. 52065)
2006-09-30 09:13:29 +00:00
Georg Brandl ad4e11e16d Bug #1566663: remove obsolete example from datetime docs.
(backport from rev. 52063)
2006-09-30 09:06:49 +00:00
Georg Brandl 506cc189a9 Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
 (backport from rev. 52061)
2006-09-30 09:03:45 +00:00
Georg Brandl af4337a017 Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
 (backport from rev. 52058)
2006-09-30 08:43:50 +00:00
Georg Brandl bbcb2814f2 Bug #1565661: in webbrowser, split() the command for the default
GNOME browser in case it is a command with args.
 (backport from rev. 52056)
2006-09-30 07:32:00 +00:00
Georg Brandl 2b48f9490f Bug #1567375: a minor logical glitch in example description.
(backport from rev. 52053)
2006-09-30 07:24:56 +00:00
Gregory P. Smith 6fed7937c6 fix: DB.stat flags and txn keyword arguments were backwards. 2006-09-30 06:05:07 +00:00
George Yoshida bd42596179 SF bug #1567976 : fix typo(backport from r52048)
Since this paragraph is about exception's message attribute(2.5 feature),
I will not backport to 2.4 branch.
2006-09-30 05:22:23 +00:00
Andrew M. Kuchling a4103a3248 Make examples do error checking on Py_InitModule 2006-09-27 19:24:27 +00:00
Georg Brandl c57221e158 Backport rev. 51972:
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.
2006-09-25 07:04:10 +00:00
Georg Brandl 934c90de0d Backport rev. 51971:
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.
2006-09-25 06:58:00 +00:00
Georg Brandl b14b59fcf9 Backport rev. 51987: superfluous semicola. 2006-09-25 06:53:42 +00:00
Georg Brandl edd81b2402 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.
 (backport from rev. 51995)
2006-09-24 12:50:28 +00:00
Georg Brandl a6b9ce185e 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
 (backport from rev. 51993)
2006-09-24 12:35:40 +00:00
Georg Brandl 1f21578965 Fix webbrowser.BackgroundBrowser on Windows.
(backport from rev. 51991)
2006-09-24 10:36:08 +00:00
Neal Norwitz af4e3ee365 SF Bug #1563963, add missing word and cleanup first sentance 2006-09-23 18:10:12 +00:00
Jack Diederich 6cc16bec17 added itertools.count(-n) fix 2006-09-21 20:38:39 +00:00
Jack Diederich 187e64806f backport of r51950
* 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
2006-09-21 18:32:11 +00:00
Brett Cannon c70e003f75 Backport of fix to allow exception instances to be sliced once again. 2006-09-21 18:12:15 +00:00
Anthony Baxter 7dcdeaf1f7 Tagging for release of Python 2.5 2006-09-19 01:05:18 +00:00
Anthony Baxter 2d8697f32c Preparing for 2.5 final.
(damn, it's nice to see the line
  #define PY_VERSION              "2.5"
in patchlevel.h)
2006-09-18 06:51:50 +00:00
Anthony Baxter 347f3cc40f better wording 2006-09-18 06:45:59 +00:00
Martin v. Löwis cf783eb1db Mention that GCC 4.1 is also affected, and that
adding -fwrapv helps.
2006-09-18 06:23:06 +00:00
Martin v. Löwis 885d8e7737 Discourage using GCC 4.2 for Python. 2006-09-18 06:00:52 +00:00
Ronald Oussoren 736fc567b2 Workaround for bug #1558983
There is an issue with custom icons on directories in the 2.5c2 installer,
don't set a custom icon on "/Applications/MacPython 2.5" for now.

Also make sure that the installer doesn't crap out when the Makefile in the
system's python installation has other customizations than we expect.
2006-09-17 18:40:15 +00:00
Fred Drake 137c789e83 revise explanation of returns_unicode to reflect bool values
and to include the default value
2006-09-15 16:10:25 +00:00
Fred Drake 2e63dbe9ac - fix module name in links in formatted documentation
- minor markup cleanup
2006-09-15 14:14:55 +00:00
Georg Brandl 77aad9a09b Backport uuid doc cleanup from rev. 51883. 2006-09-15 05:26:17 +00:00
Georg Brandl fe20482a46 Correct elementtree module index entry.
(backport)
2006-09-15 05:20:57 +00:00
Georg Brandl 44850ea12a Backport rev 51866-51868 from trunk (sqlite3 documentation fixes). 2006-09-14 05:05:42 +00:00
Martin v. Löwis af22c52fd4 Add sgml_input.html. 2006-09-12 09:16:28 +00:00
Anthony Baxter 29be05444f Tagging for release of Python 2.5c2 2006-09-12 01:00:45 +00:00
Anthony Baxter 72345f2a0b remove 2.5 final section from NEWS.txt until after rc2 (reduced confusion) 2006-09-11 15:32:50 +00:00
Anthony Baxter 2d4183c5f6 preparing for 2.5c2 2006-09-11 15:30:13 +00:00
Neal Norwitz 0bcafac29e 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.

This needs to be ported to HEAD.  I'll try to remember to do that tomorrow.
(Anyone, feel free to port it.)
2006-09-11 08:51:17 +00:00