Commit Graph

3473 Commits

Author SHA1 Message Date
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
Martin v. Löwis b600fe90a7 Switch arguments to memset (kudos to MSVC C4318 for finding that) 2004-07-27 15:03:53 +00:00
Martin v. Löwis 544f1195b1 Patch #995766: Keyword argument support in cPickle. 2004-07-27 05:22:33 +00:00
Gustavo Niemeyer 7bd33c5e22 This change implements the following gettext features, as
discussed recently in python-dev:

In _locale module:

- bind_textdomain_codeset() binding

In gettext module:

- bind_textdomain_codeset() function
- lgettext(), lngettext(), ldgettext(), ldngettext(),
  which return translated strings encoded in
  preferred system encoding, if
  bind_textdomain_codeset() was not used.
- Added equivalent functionality in translate()
  function and catalog classes.

Every change was also documented.
2004-07-22 18:44:01 +00:00
Neal Norwitz dc8e1942dd Fix SF #994580, typo in time.tzsets docstring. Backport candidate 2004-07-20 22:34:37 +00:00
Martin v. Löwis 81aec4bb80 Patch #984654: Add more address family constants. 2004-07-19 17:01:20 +00:00
Martin v. Löwis 8fbefe2874 Patch #993173: Enable audioop on 64-bit platforms. 2004-07-19 16:42:20 +00:00
Raymond Hettinger e9c89e8308 Silence a GCC unused variable warning in debug builds. 2004-07-19 00:10:24 +00:00
Hye-Shik Chang 64a9e38f35 Replace an extern magic to assigning declared pointer from array's.
And unifdef(1) compatibility blocks.
2004-07-18 15:02:45 +00:00
Hye-Shik Chang ca455e8bc9 Remove unused CNS-11643 mapping which shouldn't merged into main Python
yet.
2004-07-18 08:35:43 +00:00
Tim Peters 182b5aca27 Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
Tim Peters 91380d5f28 Repair MS compiler warning about signed-vs-unsigned mismatch. The plane
and width clearly don't need to be signed.
2004-07-18 04:34:33 +00:00
Tim Peters 7c7b3da46e Added a comment explaining the extern ugliness. 2004-07-18 04:26:10 +00:00
Tim Peters 0f27166e6a Changed the "predefinitions" of codec_list and mapping_list from static
to extern.  It's not legal C to say

     static whatever[];

because the size isn't given.  Presumably this is a gcc extension.
2004-07-18 04:20:15 +00:00