Commit Graph

3486 Commits

Author SHA1 Message Date
Raymond Hettinger 75ccea3777 SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes
(Contributed by Dima Dorfman)
2004-09-01 07:02:44 +00:00
Andrew M. Kuchling 4e699d5f95 Remove mpz, rotor, xreadlines modules 2004-08-31 13:50:12 +00:00
Andrew M. Kuchling 57269d0c7c Remove mpz, rotor, xreadlines modules 2004-08-31 13:37:25 +00:00
Anthony Baxter 1a4ddaecc7 SF patch #1007189, multi-line imports, for instance:
"from blah import (foo, bar
baz, bongo)"
2004-08-31 10:07:13 +00:00
Tim Peters d311538a93 win32_urandom(): There's no need to copy the generated byte string, so
don't.
2004-08-30 17:36:46 +00:00
Tim Peters 9b279a8df4 win32_urandom(): pass the function name to PyArg_ParseTuple, for better
error msgs.
2004-08-30 17:10:53 +00:00
Tim Peters 51eba6115d win32_urandom(): Raise ValueError if the argument is negative. 2004-08-30 17:08:02 +00:00
Tim Peters 4ad8217ae9 win32_urandom(): Rewrite to Python C standards (hard tabs, function name
in first column, no parens around return value).
2004-08-30 17:02:04 +00:00
Martin v. Löwis dc3883f671 Patch #934711: Expose platform-specific entropy. 2004-08-29 15:46:35 +00:00
Raymond Hettinger 6ab78cd0c0 SF feature request #992967: array.array objects should support sequences.
Made the constructor accept general iterables.
2004-08-29 07:50:43 +00:00
Brett Cannon 269ab628d7 Fix the spelling of Fredrik Lundh's last name (unless there really is a
"Fredrik Lund" who contributed the code in question).
2004-08-27 05:00:22 +00:00
Dave Cole e8bbfe4e63 Patch #1015012. Improve markup and punctuation in libsocket.tex 2004-08-26 00:51:16 +00:00
Dave Cole 3203efb55f Patch #1014930. Expose current parse location to XMLParser. 2004-08-26 00:37:31 +00:00
Martin v. Löwis b92b7ed9d6 Back out 1.289, which breaks platforms needing addrinfo.h, and
1.293, 1.298, and 1.300, which have tried to fix this for specific
platforms.
2004-08-25 06:24:58 +00:00
Neal Norwitz 1fa040ba73 SF #1015517, get readline to compile with older compilers 2004-08-25 01:20:18 +00:00
Mark Hammond eb619bb80b Fix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),
and a test case.
When booting a new thread, use the PyGILState API to manage the GIL.
2004-08-24 22:24:08 +00:00
Dave Cole 07fda7e3a0 Updated the socketpair() docstring and documentation to explain that the
default famility is AF_UNIX if defined for the platform, otherwise the
default is AF_INET.
2004-08-23 05:16:23 +00:00
Dave Cole 0fc8575412 Removed unnecessary calls to signal() to ignore SIGPIPE. SIGPIPE is ignored
in initsigs() inside pythonrun.c.
2004-08-23 04:54:53 +00:00
Tim Peters 037b3ee44e Patch 1012740: cStringIO's truncate doesn't
truncate() left the stream position unchanged, which meant the
"truncated" data didn't go away:

>>> io.write('abc')
>>> io.truncate(0)
>>> io.write('xyz')
>>> io.getvalue()
'abcxyz'

Patch by Dima Dorfman.
2004-08-21 06:55:43 +00:00
Martin v. Löwis 701abe745b Fail fatally if strdup fails. 2004-08-20 06:26:59 +00:00
Hye-Shik Chang f5a149a6b6 Bug #1005737, #1007249: Fix several build problems and warnings
found on legacy C compilers of HP-UX, IRIX and Tru64.  (Reported
by roadkill, Richard Townsend, Maik Hertha and Minsik Kim)
2004-08-19 17:49:56 +00:00
Martin v. Löwis 4d4dfb7a2b Patch #1011822: Display errno/strerror for inaccessible files. 2004-08-19 11:07:49 +00:00
Martin v. Löwis 78a8acc55b Patch #914291: Restore locale while readline is running. 2004-08-18 13:34:00 +00:00
Michael W. Hudson 0ccff074cd This is Mark Russell's patch:
[ 1009560 ] Fix @decorator evaluation order

From the description:

Changes in this patch:

- Change Grammar/Grammar to require
newlines between adjacent decorators.

- Fix order of evaluation of decorators
in the C (compile.c) and python
(Lib/compiler/pycodegen.py) compilers

- Add better order of evaluation check
to test_decorators.py (test_eval_order)

- Update the decorator documentation in
the reference manual (improve description
of evaluation order and update syntax
description)

and the comment:

Used Brett's evaluation order (see
http://mail.python.org/pipermail/python-dev/2004-August/047835.html)

(I'm checking this in for Anthony who was having problems getting SF to
talk to him)
2004-08-17 17:29:16 +00:00
Skip Montanaro 6c06cd5ff9 fix a couple problems with the last patch picked up by Michael Hudson 2004-08-16 16:15:13 +00:00
Skip Montanaro e5069019e7 Add get_history_item and replace_history_item functions to the readline
module.  Closes patch #675551.  My apologies to Michal Vitecek for taking so
long to process this.
2004-08-15 14:32:06 +00:00
Johannes Gijsbers 8d3b9dd09c Quote \r\n correctly, remove random indentation (patch #1009384). Thanks
Cherniavsky Beni!
2004-08-15 12:23:10 +00:00
Fred Drake 39689c5c6a make exception propogation more efficient; this avoids having Expat parse
the remaining data in the buffer (which it had done happily without reporting
any results)

this depends on a new feature in Expat added in 1.95.8
2004-08-13 03:12:57 +00:00
Martin v. Löwis 0cb3c63503 Patch #1005568: Use _SC_PAGESIZE on Irix.
Backported to 2.3.
2004-08-12 13:26:56 +00:00
Jason Tishler c246cb76e6 Bug #1001857: socketmodule does not build under cygwin
Restore clean building under Cygwin.
2004-08-09 13:25:59 +00:00
Dave Cole 331708b226 Patch #1003700: Add socketpair function to socket module. 2004-08-09 04:51:41 +00:00
Tim Peters ec8c5a9311 Bug 1003471: Python 1.5.2 security vulnerability still present in 2.3.4
That's the title of the report, but the hole was probably plugged since
Python 2.0.  See corresponding checkin to PC/getpathp.c:  a crucial
precondition for joinpath() was neither documented nor verified, and there
are so many callers with so many conditional paths that no "eyeball
analysis" is satisfactory.  Now Python dies with a fatal error if the
precondition isn't satisfied, instead of allowing a buffer overrun.

NOT TESTED!  The Windows version of the patch was, but not this one.  I
don't feel like waiting for someone to notice the patch I attached to the
bug report.  If it doesn't compile, sorry, but fix it <wink>.  If it
does compile, it's "obviously correct".
2004-08-08 01:00:47 +00:00
Andrew M. Kuchling e5dd162a07 [Bug #923315] Produce correct result on AIX 2004-08-07 17:21:27 +00:00
Fred Drake 283b670f6b add constants for many error values added over the past couple of
years
2004-08-04 22:28:16 +00:00
Michael W. Hudson 5910d81c97 Add a missing decref -- PyErr_SetObject increfs the 'object'! 2004-08-04 14:59:00 +00:00
Michael W. Hudson 7d6cc5b303 Fix a leak of a reference on None. 2004-08-04 14:33:28 +00:00
Hye-Shik Chang e9ddfbb412 SF #989185: Drop unicode.iswide() and unicode.width() and add
unicodedata.east_asian_width().  You can still implement your own
simple width() function using it like this:
    def width(u):
        w = 0
        for c in unicodedata.normalize('NFC', u):
            cwidth = unicodedata.east_asian_width(c)
            if cwidth in ('W', 'F'): w += 2
            else: w += 1
        return w
2004-08-04 07:38:35 +00:00
Tim Peters 51fa3b740f Tkapp_New(): Rewrite in C so it compiles again. 2004-08-04 02:16:48 +00:00
Martin v. Löwis 1fa649f2d5 Patch #986929: Add support for wish -sync and -use options. 2004-08-03 18:45:31 +00:00
Fred Drake f901abdd62 allow ctime(), gmtime(), and localtime() to take None as equivalent to an omitted arg
(closes SF bug #658254, patch #663482)
2004-08-03 17:58:55 +00:00
Martin v. Löwis 0b49e02e03 Patch #977074: Move Encode/Decode to the top so gcc can inline them. 2004-08-03 13:08:07 +00:00
Michael W. Hudson 0bb8454ed4 Fix the reference count errors revealed by the test suite... 2004-08-03 11:31:31 +00:00
Raymond Hettinger cbcff93d49 Restore compilation on MSVC++ 6.0 2004-08-03 08:52:46 +00:00
Armin Rigo a41276956d SF bug #808756: refleaks in _hotshot.c. 2004-08-03 08:33:55 +00:00
Fred Drake 31d485c0f5 update to Expat 1.95.8 2004-08-03 07:06:22 +00:00
Mark Hammond a57ec93b93 Fix [ 1001018 ]: Windows: setdefaulttimeout causes unnecessary timeouts on
connect error
2004-08-03 05:06:26 +00:00
Michael W. Hudson c9f510aed2 Any call to insort_{left,right} with a non-list leaked a reference to None
(or to whatever the 'insert' method chose to return).
2004-08-02 13:24:54 +00:00
Anthony Baxter c2a5a63654 PEP-0318, @decorator-style. In Guido's words:
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728.
2004-08-02 06:10:11 +00:00
Neal Norwitz 014f103705 SF bug #999776, zlib home page wrong
Backport candidate.
2004-07-29 03:55:56 +00:00
Hye-Shik Chang eb34110190 Remove CJKCodecs implementation of UTF-7 and UTF-8 codec which
aren't intended to be part of Python distributiuon.  This was
accidently imported on mass converting from standalone version of
CJKCodecs.
2004-07-28 09:36:52 +00:00