Commit Graph

2022 Commits

Author SHA1 Message Date
Georg Brandl dd4c398c27 Bug #1545497: when given an explicit base, int() did ignore NULs
embedded in the string to convert.
 (backport from rev. 52305)
2006-10-12 11:28:04 +00:00
Georg Brandl 3c48709e3a Bug #1548891: The cStringIO.StringIO() constructor now encodes unicode
arguments with the system default encoding just like the write()
method does, instead of converting it to a raw buffer.
 (backport from rev. 52301)
2006-10-12 09:47:17 +00:00
Georg Brandl 8984370c06 Bug #1565919: document set types in the Language Reference.
(backport from rev. 52297)
2006-10-12 08:22:57 +00:00
Georg Brandl f0db92a676 Bug #813342: Start the IDLE subprocess with -Qnew if the parent
is started with that option.
 (backport from rev. 52295)
2006-10-12 07:57:24 +00:00
Martin v. Löwis 463a42b5de Bug #1565150: Fix subsecond processing for os.utime on Windows. 2006-10-09 20:44:50 +00:00
Georg Brandl 7444eda3d6 Patch #1572724: fix typo ('=' instead of '==') in _msi.c.
(backport from rev. 52251)
2006-10-09 19:03:12 +00:00
Andrew M. Kuchling 0037300f15 [Bug #1545341] Let the 'classifiers' parameter be a tuple as well as a list. 2006-10-09 17:13:26 +00:00
Hye-Shik Chang f4fe46d74b Backport from trunk r52223:
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 14:01:45 +00:00
Georg Brandl a5fe3ef8d8 Fix #1569998: no break inside try statement (outside loop) allowed.
(backport from rev. 52129)
2006-10-08 07:12:23 +00:00
Georg Brandl 74284b9606 Patch #1542451: fix crash with continue in nested try/finally
(backport from rev. 51439)
2006-10-08 07:06:29 +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
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
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
Gregory P. Smith 6fed7937c6 fix: DB.stat flags and txn keyword arguments were backwards. 2006-09-30 06:05:07 +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 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
Jack Diederich 6cc16bec17 added itertools.count(-n) fix 2006-09-21 20:38:39 +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 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 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
Neal Norwitz 48829ba61d 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.

Will backport to 2.4 and head later.
2006-09-11 04:05:18 +00:00
Neal Norwitz 2e488fdebf Add NEWS entries for ctypes backports. 2006-09-11 04:03:07 +00:00
Brett Cannon 19d76c5aa8 Remove __unicode__ method so that ``unicode(BaseException)`` succeeds.
Fixes bug #1551432.
2006-09-09 07:18:44 +00:00
Nick Coghlan 62f19e4281 Backport inspect.py fix from rev 51803 2006-09-08 10:01:23 +00:00
Hye-Shik Chang 137ae0cf7c Backport from trunk r51737:
Fixed a few bugs on cjkcodecs:
- 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 0213:2
  codepoints now.
2006-09-07 12:50:38 +00:00
Gustavo Niemeyer d1b1b8c882 Fixed bug #1531862: Do not close standard file descriptors in subprocess.
Let's try that once more. Buildbots were broken last time, but probably
because tests were sending data to stderr for testing it (sending to a
file doesn't touch the problem).

The fix is still the same, but tests were reduced (removing tests to
be able to fix something is weird, but oh well).
2006-09-06 22:44:51 +00:00
Marc-André Lemburg 8a230b50a1 Backport bug fix for SF bug report #1546372. 2006-09-06 20:38:50 +00:00
Georg Brandl 4dc095249e Fix missing import of the types module in logging.config.
(backport from rev. 51785)
2006-09-06 20:06:27 +00:00
Georg Brandl ecab623e13 Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
Also make sure that every exception class has __module__ set to
'exceptions'.
 (backport)
2006-09-06 06:47:02 +00:00
Georg Brandl 37a9e579ec Bug #1550983: emit better error messages for erroneous relative
imports (if not in package and if beyond toplevel package).
 (backport from rev. 51765)
2006-09-06 06:09:34 +00:00
Georg Brandl b20cb33f7f Bug #1551427: fix a wrong NULL pointer check in the win32 version
of os.urandom().
 (backport from rev. 51762)
2006-09-06 06:04:06 +00:00
Neal Norwitz f3ce2ab2f1 Revert 51759 because it broke all the buildbots 2006-09-06 03:58:59 +00:00
Gustavo Niemeyer 63d675ce82 Backporting fix for bug #1531862, committed in 51758, into 2.5,
making subprocess not close standard file descriptors.
2006-09-06 02:05:35 +00:00
Neal Norwitz 9a2447943e Add another NEWS entry for a fix already in 2.5c1 2006-09-05 04:49:45 +00:00
Neal Norwitz 24b6f208ae Add some NEWS for fixes already in 2.5c1 2006-09-05 04:43:56 +00:00
Neal Norwitz 3b3aae013b 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.
2006-09-05 03:56:01 +00:00
Neal Norwitz 541a48b262 Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34]. 2006-09-05 02:54:42 +00:00
Neal Norwitz 716692ff13 Backport fix from 51683. 2006-09-05 02:33:44 +00:00
Neal Norwitz 7ae5f29465 Backport fix for SF bug #1550714, itertools.tee raises SystemError 2006-09-05 02:30:10 +00:00
Neal Norwitz 29a5fdb7ca Fix str.rpartition(sep) when sep is not found in str.
Partially from SF patch #1551339, but also taken from head.
2006-09-05 02:21:38 +00:00
Neal Norwitz 8dc71f2161 This was found by Guido AFAIK on p3yk (sic) branch. 2006-09-05 02:00:21 +00:00
Neal Norwitz d3da7d394a Fix SF bug #1546288, crash in dict_equal 2006-09-05 01:54:06 +00:00
Tim Peters cbdd350dd7 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.
2006-09-05 01:47:53 +00:00
Nick Coghlan 08c496d81d NEWS entry for decimal module changes 2006-09-03 01:13:06 +00:00
Martin v. Löwis 58af7ef55d Patch #1545507: Exclude ctypes package in Win64 MSI file. 2006-08-25 00:11:38 +00:00
Neal Norwitz 19c35bba5d - Patch #1541585: fix buffer overrun when performing repr() on
a unicode string in a build with wide unicode (UCS-4) support.

I will forward port to 2.6.  Can someone backport to 2.4?
2006-08-21 22:13:11 +00:00
Neal Norwitz 7443b80549 Backport 51432:
Fix bug #1543303, tarfile adds padding that breaks gunzip.
Patch # 1543897.  (remove the padding)
2006-08-21 18:43:51 +00:00
Georg Brandl db232dc86a Patch #1542948: fix urllib2 header casing issue. With new test.
(backport from rev. 51416)
2006-08-20 13:15:43 +00:00
Neal Norwitz d6f8629b20 SF #1542693: Remove semi-colon at end of PyImport_ImportModuleEx macro 2006-08-19 04:19:43 +00:00
Georg Brandl 595d9b6bc6 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.
 (backport from rev. 51364)
2006-08-18 07:28:03 +00:00
Martin v. Löwis 2c3a256351 Bug #1541863: uuid.uuid1 failed to generate unique identifiers
on systems with low clock resolution.
2006-08-18 03:40:13 +00:00
Martin v. Löwis 552262409d Invoke debug mk1mf.pl after running Configure. 2006-08-17 18:54:43 +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
Neal Norwitz b476fdf7c3 Fix the test for SocketServer so it should pass on cygwin and not fail
sporadically on other platforms.  This is really a band-aid that doesn't
fix the underlying issue in SocketServer.  It's not clear if it's worth
it to fix SocketServer, however, I opened a bug to track it:

	http://python.org/sf/1540386
2006-08-15 04:58:28 +00:00
Neal Norwitz bf8c19536e Georg fixed one of my bugs, so I'll repay him with 2 NEWS entries.
Now we're even. :-)
2006-08-15 04:14:57 +00:00
Georg Brandl 7a1af770b9 Patch #1536071: trace.py should now find the full module name of a
file correctly even on Windows.
2006-08-14 21:55:28 +00:00
Georg Brandl 3335a7ad63 Patch #1535500: fix segfault in BZ2File.writelines and make sure it
raises the correct exceptions.
2006-08-14 21:42:55 +00:00
Thomas Heller 1ce433e937 News item for rev 51281. 2006-08-14 16:20:04 +00:00
Marc-André Lemburg 757ea27b0f Readd NEWS items that were accidentally removed by r51276. 2006-08-14 11:44:34 +00:00
Thomas Heller 867200483b Apply the patch #1532975 plus ideas from the patch #1533481.
ctypes instances no longer have the internal and undocumented
'_as_parameter_' attribute which was used to adapt them to foreign
function calls; this mechanism is replaced by a function pointer in
the type's stgdict.

In the 'from_param' class methods, try the _as_parameter_ attribute if
other conversions are not possible.

This makes the documented _as_parameter_ mechanism work as intended.

Change the ctypes version number to 1.0.1.
2006-08-14 11:17:48 +00:00
Marc-André Lemburg 040f76b79c Slightly revised version of patch #1538956:
Replace UnicodeDecodeErrors raised during == and !=
compares of Unicode and other objects with a new
UnicodeWarning.

All other comparisons continue to raise exceptions.
Exceptions other than UnicodeDecodeErrors are also left
untouched.
2006-08-14 10:55:19 +00:00
Neal Norwitz 56423e5762 Fix segfault when doing string formatting on subclasses of long if
__oct__, __hex__ don't return a string.

Klocwork 308
2006-08-13 18:11:08 +00:00
Neal Norwitz 1872b1c01f Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbots
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c)  In reviewing the code for classic
classes, there were 2 problems.  Any negative value return could be returned.
Always return -1 if there was an error.  Also make the checks similar
with the new-style classes.  I believe this is correct for 32 and 64 bit
boxes, including Windows64.

Add a test of classic classes too.
2006-08-12 18:44:06 +00:00
Neal Norwitz 8a87f5d37e Patch #1538606, Patch to fix __index__() clipping.
I modified this patch some by fixing style, some error checking, and adding
XXX comments.  This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward.  I don't want this to hold up release if possible.
2006-08-12 17:03:09 +00:00
Georg Brandl 0a7d1bb168 logging's atexit hook now runs even if the rest of the module has
already been cleaned up.
2006-08-11 07:26:10 +00:00
Neal Norwitz 003c9e2952 Fix the failures on cygwin (2006-08-10 fixed the actual locking issue).
The first hunk changes the colon to an ! like other Windows variants.
We need to always wait on the child so the lock gets released and
no other tests fail.  This is the try/finally in the second hunk.
2006-08-11 06:09:41 +00:00
Tim Peters 4643c2fda1 Followup to bug #1069160.
PyThreadState_SetAsyncExc():  internal correctness changes wrt
refcount safety and deadlock avoidance.  Also added a basic test
case (relying on ctypes) and repaired the docs.
2006-08-10 22:45:34 +00:00
Guido van Rossum c69ac2527d Fix title -- it's rc1, not beta3. 2006-08-10 18:09:25 +00:00
Guido van Rossum 133f4e465b News item for SF bug 1112549. 2006-08-10 17:42:50 +00:00
Martin v. Löwis ab2f8f7bd5 __hash__ may now return long int; the final hash
value is obtained by invoking hash on the long int.
Fixes #1536021.
2006-08-09 07:57:39 +00:00
Thomas Heller ab1049c046 memcmp() can return values other than -1, 0, and +1 but tp_compare
must not.
2006-08-08 17:37:00 +00:00
Andrew MacIntyre 16ee33adfc test_threading now skips testing alternate thread stack sizes on
platforms that don't support changing thread stack size.
2006-08-06 12:37:03 +00:00
Georg Brandl 7e3ba2a699 Bug #1535165: fixed a segfault in input() and raw_input() when
sys.stdin is closed.
2006-08-06 08:23:54 +00:00
Georg Brandl 9908d1656c Bug #1535182: really test the xreadlines() method of bz2 objects. 2006-08-06 07:06:33 +00:00
Georg Brandl 212b587a52 Patch #1534922: correct and enhance unittest docs. 2006-08-05 06:10:54 +00:00
Bob Ippolito e6c9f982a0 Fix #1530559, struct.pack raises TypeError where it used to convert.
Passing float arguments to struct.pack when integers are expected
now triggers a DeprecationWarning.
2006-08-04 23:59:21 +00:00
Thomas Heller db7b443d8a Fix #1534738: win32 debug version of _msi must be _msi_d.pyd, not _msi.pyd.
Fix the name of the pdb file as well.
2006-08-04 19:49:31 +00:00
Thomas Heller 1798489547 Fix #1530448 - fix ctypes build failure on solaris 10.
The '-mimpure-text' linker flag is required when linking _ctypes.so.
2006-08-04 18:57:34 +00:00
Thomas Heller 74d36f0d95 On Windows, make PyErr_Warn an exported function again. 2006-08-04 18:17:40 +00:00
Georg Brandl e9462c72bd Change fix for segfaulting property(), add a NEWS entry and a test. 2006-08-04 18:03:37 +00:00
Neil Schemenauer 06ded09d40 Fix the 'compiler' package to generate correct code for MAKE_CLOSURE.
In the 2.5 development cycle, MAKE_CLOSURE as changed to take free
variables as a tuple rather than as individual items on the stack.
Closes patch #1534084.
2006-08-04 16:20:30 +00:00
Neal Norwitz 0cbd805a10 Bug #1333982: string/number constants were inappropriately stored
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
2006-08-04 05:09:28 +00:00
Neal Norwitz 4ffedadb10 Bug #1191458: tracing over for loops now produces a line event
on each iteration.  I'm not positive this is the best way to handle
this.  I'm also not sure that there aren't other cases where
the lnotab is generated incorrectly.  It would be great if people
that use pdb or tracing could test heavily.

Also:
 * Remove dead/duplicated code that wasn't used/necessary
   because we already handled the docstring prior to entering the loop.
 * add some debugging code into the compiler (#if 0'd out).
2006-08-04 04:58:47 +00:00
Neal Norwitz ff4b63b80f Bug #1531405, format_exception no longer raises an exception if
str(exception) raised an exception.
2006-08-04 04:50:21 +00:00
Martin v. Löwis 961b91bd3c Correction of patch #1455898: In the mbcs decoder, set final=False
for stream decoder, but final=True for the decode function.
2006-08-02 13:53:55 +00:00
Anthony Baxter 5d32a9f188 pre-release machinations 2006-08-02 07:43:09 +00:00
Neal Norwitz 9b0ca79213 Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
a socket operation on a socket with a timeout, the exception will be
caught correctly.  Previously, the exception was not caught.
2006-08-02 06:46:21 +00:00
Neal Norwitz c5e060dee6 _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long. 2006-08-02 06:14:22 +00:00
Ronald Oussoren 26cad08748 This fixes bug #1527397: PythonLauncher runs scripts with the wrong working
directory. It also fixes a bug where PythonLauncher failed to launch scripts
when the scriptname (or the path to the script) contains quotes.
2006-08-01 21:00:57 +00:00
Georg Brandl 07fec3aa5a os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
2006-08-01 18:49:24 +00:00
Martin v. Löwis 0907f4dc5b Drop usage of test -e in configure as it is not portable.
Fixes #1439538
Will backport to 2.4
Also regenerate pyconfig.h.in.
2006-07-30 14:09:47 +00:00
Martin v. Löwis 77621585e4 Mention Cygwin in distutils error message about a missing VS 2003.
Fixes #1257728.
2006-07-30 13:27:31 +00:00
Martin v. Löwis 1f30c3777c Base __version__ on sys.version_info, as distutils is
no longer maintained separatedly.
2006-07-30 13:14:05 +00:00
Martin v. Löwis 4e67838d6c Don't copy directory stat times in shutil.copytree on Windows
Fixes #1525866.
2006-07-30 13:00:31 +00:00
Georg Brandl e34ac7ce7a Bug #1002398: The documentation for os.path.sameopenfile now correctly
refers to file descriptors, not file objects.
2006-07-30 11:07:23 +00:00
Neal Norwitz f71ec5a0ac Bug #1515471: string.replace() accepts character buffers again.
Pass the char* and size around rather than PyObject's.
2006-07-30 06:57:04 +00:00
Neal Norwitz 07aadb14f3 Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
2006-07-30 06:55:48 +00:00
Neal Norwitz 0d62a06206 Patch #1531113: Fix augmented assignment with yield expressions.
Also fix a SystemError when trying to assign to yield expressions.
2006-07-30 06:53:31 +00:00
Fred Drake fbdeaad069 expunge the xmlcore changes:
41667, 41668 - initial switch to xmlcore
  47044        - mention of xmlcore in What's New
  50687        - mention of xmlcore in the library reference

re-apply xmlcore changes to xml:
  41674        - line ending changes (re-applied manually), directory props
  41677        - add cElementTree wrapper
  41678        - PSF licensing for etree
  41812        - whitespace normalization
  42724        - fix svn:eol-style settings
  43681, 43682 - remove Python version-compatibility cruft from minidom
  46773        - fix encoding of \r\n\t in attr values in saxutils
  47269        - added XMLParser alias for cElementTree compatibility

additional tests were added in Lib/test/test_sax.py that failed with
the xmlcore changes; these relate to SF bugs #1511497, #1513611
2006-07-29 16:56:15 +00:00
Fred Drake 5391216050 update target version number 2006-07-29 13:22:49 +00:00
Georg Brandl edd9b0dfb3 Bug #1441397: The compiler module now recognizes module and function
docstrings correctly as it did in Python 2.4.
2006-07-29 09:33:26 +00:00
Thomas Heller 1393d6a4ca Patch #1529514: More openbsd platforms for ctypes.
Regenerated Modules/_ctypes/libffi/configure with autoconf 2.59.

Approved by Neal.
2006-07-28 21:43:20 +00:00
Phillip J. Eby 84b7d3a932 Fix svn merge spew. 2006-07-28 21:31:54 +00:00
Phillip J. Eby f7575d0cb7 Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
with PEP 302.  This was fixed by adding an ``imp.NullImporter`` type that is
used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
excessive filesystem operations during imports.
2006-07-28 21:12:07 +00:00
Georg Brandl 4793aa39a9 Patch #1529686: also run test_email_codecs with regrtest.py. 2006-07-28 18:31:39 +00:00
Matt Fleming ec9265094a Allow socketmodule to compile on NetBSD -current, whose bluetooth API
differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
2006-07-28 11:27:27 +00:00
Gregory P. Smith 641cddf0fa - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
methods now allow their database parameter to be None as the
  sleepycat API allows.

Also adds an appropriate test case for DBEnv.dbrename and dbremove.
2006-07-28 01:35:25 +00:00
Tim Peters 9cab593c0e News about the repaired memory leak in defaultdict. 2006-07-28 00:30:00 +00:00
Tim Peters 6f6814706e Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally
lost that tests are sorted by name before being run.  ``DocTestFinder``
has been changed to sort the list of tests it returns.
2006-07-27 23:44:37 +00:00
Barry Warsaw 00decd7835 Patch #1520294: Support for getset and member descriptors in types.py,
inspect.py, and pydoc.py.  Specifically, this allows for querying the type of
an object against these built-in C types and more importantly, for getting
their docstrings printed in the interactive interpreter's help() function.

This patch includes a new built-in module called _types which provides
definitions of getset and member descriptors for use by the types.py module.
These types are exposed as types.GetSetDescriptorType and
types.MemberDescriptorType.  Query functions are provided as
inspect.isgetsetdescriptor() and inspect.ismemberdescriptor().  The
implementations of these are robust enough to work with Python implementations
other than CPython, which may not have these fundamental types.

The patch also includes documentation and test suite updates.

I commit these changes now under these guiding principles:

1. Silence is assent.  The release manager has not said "no", and of the few
   people that cared enough to respond to the thread, the worst vote was "0".

2. It's easier to ask for forgiveness than permission.

3. It's so dang easy to revert stuff in svn, that you could view this as a
   forcing function. :)

Windows build patches will follow.
2006-07-27 23:43:15 +00:00
Georg Brandl 6cea7d74ad Amend news entry. 2006-07-27 15:38:33 +00:00
Tim Peters 3e246a811d News for patch #1529686. 2006-07-27 15:09:20 +00:00
Martin v. Löwis 997ceffe07 Bump distutils version to 2.5, as several new features
have been introduced since 2.4.
2006-07-27 06:38:16 +00:00
Tim Peters bc24eee333 Bug #1521947: possible bug in mystrtol.c with recent gcc.
In general, C doesn't define anything about what happens when
an operation on a signed integral type overflows, and PyOS_strtol()
did several formally undefined things of that nature on signed
longs.  Some version of gcc apparently tries to exploit that now,
and PyOS_strtol() could fail to detect overflow then.

Tried to repair all that, although it seems at least as likely to me
that we'll get screwed by bad platform definitions for LONG_MIN
and/or LONG_MAX now.  For that reason, I don't recommend backporting
this.

Note that I have no box on which this makes a lick of difference --
can't really test it, except to note that it didn't break anything
on my boxes.

Silent change:  PyOS_strtol() used to return the hard-coded 0x7fffffff
in case of overflow.  Now it returns LONG_MAX.  They're the same only on
32-bit boxes (although C doesn't guarantee that either ...).
2006-07-27 01:14:53 +00:00
Andrew M. Kuchling 10c2b55057 Put news item in right section 2006-07-26 17:22:21 +00:00
Andrew M. Kuchling 93c928ebca Minor grammar fix 2006-07-26 17:19:39 +00:00
Andrew M. Kuchling 55b0a0eb0d [Bug #1471938] Fix build problem on Solaris 8 by conditionalizing the use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment. 2006-07-26 17:16:52 +00:00
Martin v. Löwis 9298eff5f9 Bug #978833: Really close underlying socket in _socketobject.close.
Fix httplib.HTTPConnection.getresponse to not close the
socket if it is still needed for the response.
2006-07-26 12:12:56 +00:00
Georg Brandl 0619a329e8 Bug #1459963: properly capitalize HTTP header names. 2006-07-26 07:40:17 +00:00
Georg Brandl cf0c1729dc NEWS entry for #1525766. 2006-07-26 07:23:32 +00:00
Ronald Oussoren 3075e16c51 Fix bug #1517990: IDLE keybindings on OSX
This adds a new key definition for OSX, which is slightly different from the
classic mac definition.

Also add NEWS item for a couple of bugfixes I added recently.
2006-07-25 20:28:55 +00:00
Brett Cannon f23ad3d65e Add comment for changes to test_ossaudiodev. 2006-07-25 17:32:20 +00:00
Martin v. Löwis 2b2d2974e7 Revert incomplete checkin. 2006-07-25 10:11:14 +00:00
Martin v. Löwis e093a3ada9 Bug #978833: Really close underlying socket in _socketobject.close.
Will backport to 2.4.
2006-07-25 10:05:47 +00:00
Martin v. Löwis 0b48303f28 Bug #1525817: Don't truncate short lines in IDLE's tool tips. 2006-07-25 09:53:12 +00:00
Georg Brandl c13c34c39d Patch #1515343: Fix printing of deprecated string exceptions with a
value in the traceback module.
2006-07-24 14:09:56 +00:00