Commit Graph

1365 Commits

Author SHA1 Message Date
Guido van Rossum 09ac088152 The call to PyArg_ParseTuple in al_Connect had one too few arguments.
This fixes PR#157.
1999-12-10 15:12:11 +00:00
Fred Drake 5ab8eaf0bb Added support for abort(), ctermid(), tmpfile(), tempnam(), tmpnam(),
and TMP_MAX.

Converted all functions that used PyArg_Parse() or PyArg_NoArgs() to
use PyArg_ParseTuple() and specified all function names using the
:name syntax in the format strings, to allow better error messages
when TypeError is raised for parameter type mismatches.
1999-12-09 21:13:07 +00:00
Guido van Rossum cbdff766d2 OpenSSL support. This is based on patches for a version of SSLeay by
Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by
Laszlo Kovacs of HP.  Both have kindly given permission to include
the patches in the Python distribution.  Final formatting by GvR.
1999-12-07 21:47:09 +00:00
Guido van Rossum 09c8b6c3e4 OpenSSL support. This is based on patches for a version of SSLeay by
Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by
Laszlo Kovacs of HP.  Both have kindly given permission to include
the patches in the Python distribution.  Final formatting by GvR.
1999-12-07 21:37:17 +00:00
Fred Drake bf27298364 Correct the docstring for byteswap(); error noted by Bernhard Reiter
<bernhard@uwm.edu>.

Added a check that no parameters were passed to byteswap(); previously
allowed any parameters you happened to pass.
1999-12-03 17:15:30 +00:00
Guido van Rossum b960e7a797 Patches by Kannan Vijayan:
new:
readline.get_begidx() -> int
	gets the beginning index in the command line string
	delimiting the tab-completion scope.  This would
	probably be used from within a tab-completion
	handler

readline.get_endidx() -> int
	gets the ending index in the command line string
	delimiting the tab-completion scope.  This would
	probably be used from within a tab-compeltion
	handler

readline.set_completer_delims(string) -> None
	sets the delimiters used by readline as word breakpoints
	for tab-completion

readline.get_completer_delims() -> string
	gets the delimiters used by readline as word breakpoints
	for tab-completion

fixed:
readline.get_line_buffer() -> string
	doesnt cause a debug message every other call
1999-11-18 17:51:02 +00:00
Guido van Rossum 09cbb01989 Jack Jansen: Mac has no EINTR. 1999-11-08 15:32:27 +00:00
Guido van Rossum e168c65603 Patch by Dieter Maurer to make things work for Tcl/Tk 8.1. This
simply moves the call to Tk_MainWindow() after the Tcl/Tk
initialization calls.  The patch is unconditional, it works with
earlier and later versions as well.
1999-11-05 18:11:23 +00:00
Guido van Rossum 6b26a06037 Patch by Dieter Maurer to make things work for Tcl/Tk 8.1 (tested with
8.1.1).  His approach doesn't work with Tcl/Tk 8.2, so I've placed it
inside #if TKMAJORMINOR == 8001 and #endif.  See also his patch for
tkappinit.c.
1999-11-05 18:09:56 +00:00
Fred Drake e4f13660f8 split() docstring: Made signature and description for the first
parameter match.  Error pointed out by François
                    Pinard <pinard@iro.umontreal.ca> on c.l.py.
1999-11-04 19:19:48 +00:00
Guido van Rossum 1b6e463bd5 Bugfix by Jack Jansen for Macintosh (for the inet_ntoa/aton changes):
<arpa/inet.h> doesn't exist and isn't needed; and inet_addr() returns
a structure containing a long rather than a long.
1999-11-04 18:22:29 +00:00
Guido van Rossum 2db4f47fdd Patch by Jason Trowbridge. (Followup to his PR#110.) (Slightly
reformatted.)

- Illegal padding is now ignored.  (Recommendation by GvR.)

- Padding no longer removes characters from data string (resulting in
lost data/strings with negative lengths).

- Illegal characters outside the ASCII range are now ignored, instead
of possibly being remapped to a valid character.
1999-10-19 19:05:14 +00:00
Guido van Rossum d5753e15e2 John DuBois tells us that SCO OpenServer 5.0 and later requires _SVID3
before it reveals the needed definitions in sys/statvfs.h.
1999-10-19 13:29:23 +00:00
Guido van Rossum eba24bb920 Fix PR#110 -- bad input ("====") for a2b_base64() caused it to call
_PyString_Resize() with a negative size.
1999-10-19 04:47:13 +00:00
Fred Drake 2a6875e172 parser__pickler(): Don't drop the third argument to
parser_ast2tuple().  Create an temporary empty dictionary to
        use.  Bug reported by Mark Favas <m.favas@per.dem.csiro.au>.

Fix a couple of comments.
1999-09-20 22:32:18 +00:00
Guido van Rossum 675e994a2e Added comment with web location of bsddb windows port. 1999-09-20 13:28:18 +00:00
Guido van Rossum 9376b74c42 (1) On Linux, we really need to trust the configure script to select
the right variant of gethostbyname_r for us, since not all Linuxes are
equal in this respect.  Reported by Laurent Pointal.

(2) On BeOS, Chris Herborth reports that instead of arpa/inet.h you
must include net/netdb.h to get the inet_ntoa() and inet_addr()
prototypes.
1999-09-15 22:01:40 +00:00
Guido van Rossum a2e48552d2 It appears that inet_aton() doesn't really exist except in libresolv;
the proper function to call is inet_addr().  Since we already had code
to do that (for MS-Windows), this simplifies things a lot!
1999-09-09 15:42:59 +00:00
Fred Drake 7a15ba595a Added keyword parameter support to all public interfaces; keyword
names match the documentation.

Removed broken code that supports the __methods__ attribute on ast
objects; the right magic was added to Py_FindMethod() since this was
originally written.  <ast-object>.__methods__ now works, so dir() and
rlcompleter are happy.
1999-09-09 14:21:52 +00:00
Guido van Rossum 65bb328f67 Fixed memory leak in ratecv, in response to PR#72. By Sjoerd Mullender. 1999-09-07 14:24:05 +00:00
Guido van Rossum ff7e83d606 Patch by Mark Hammond to avoid certain header files on Windows/CE. 1999-08-27 20:39:37 +00:00
Guido van Rossum 7f1de832a2 Tiny patch by Mark Hammond to avoid sys/types.h if we don't have it
(for Windows/CE).
1999-08-27 20:33:52 +00:00
Fred Drake 762e206706 posix_putenv(): Constrain memory leakage when setting the same
environment variable repeatedly.  I posted this to the list
        some time ago, but only now got around to asking g--d- what he
        thought about it.
1999-08-26 17:23:54 +00:00
Guido van Rossum c6a164b8bc Port inet_ntoa and inet_aton to Windows:
- fix unescaped newline in string literal
- removed unused err variable
- Windows doesn't have inet_aton; use inet_addr instead
1999-08-20 19:11:27 +00:00
Guido van Rossum 5c9eb21729 Patch by Ben Gertzfield to add inet_aton() and inet_ntoa() calls. 1999-08-20 18:21:51 +00:00
Guido van Rossum a5456d5042 In floatsleep(), when using select(), ignore EINTR error. 1999-08-19 14:40:27 +00:00
Guido van Rossum 09be409220 Patch by Marc-Andre Lemburg to add a bunch more symbols. 1999-08-09 14:40:40 +00:00
Guido van Rossum 6a619f44c5 It turns out that modifying the environment strings is not safe.
Treat them as read-only, and make a copy as appropriately.  This was
first reported by Bill Janssend and later by Craig Rowland and Ron
Sedlmeyer.  This fix is mine.
1999-08-03 19:41:10 +00:00
Guido van Rossum 2f80d96c04 Patch by Stephen Turner, who writes:
"""
It fixes a memory corruption error resulting from BadPickleGet
exceptions in load_get, load_binget and load_long_binget.  This was
initially reported on c.l.py as a problem with Cookie.py; see the thread
titled "python core dump (SIGBUS) on Solaris" for more details.

If PyDict_GetItem(self->memo, py_key) call failed, then py_key was being
Py_DECREF'd out of existence before call was made to
PyErr_SetObject(BadPickleGet, py_key).

The bug can be duplicated as follows:

import cPickle
cPickle.loads('garyp')

This raises a BadPickleGet exception whose value is a freed object.  A
core dump will soon follow.
"""

Jim Fulton approves of the patch.
1999-07-13 15:18:58 +00:00
Guido van Rossum 9068da4b6d Milton L. Hankin reports that on Windows it is possible to have two
different values in the environ dict with the same key (although he
couldn't explain exactly how this came to be).  Since getenv() uses
the first one, Python should do too. (Some doubts about case
sensitivity, but for now this at least seems the right thing to do
regardless of platform.)
1999-07-02 02:54:02 +00:00
Guido van Rossum c3be1a3ca1 New version from Jim:
- Don't call Py_FatalError() when initialization fails.

- Fix bogus use of return value from PyRun_String().

- Fix misc. compiler errors on some platforms.
1999-06-15 14:36:59 +00:00
Guido van Rossum 17d53ecd8b New version from Jim: don't call Py_FatalError() when initialization fails. 1999-06-15 14:35:48 +00:00
Guido van Rossum c03158bfc7 Jim Fulton writes:
I've updated cPickle.c to use class exceptions:

Changed pickle error types to classes:

  PickleError
     PicklingError
        UnpickleableError
     UnpicklingError

And change the handling of unpickleable objects so that an UnpickleableError
is raised with the unpickleable object as the argument.  UnpickleableError
has a reasonable string representation and provides access to the problem
object, which is useful during debugging.

[I'm still waiting for patches to do the same to pickle.py.]
1999-06-09 15:23:31 +00:00
Barry Warsaw f63b8cc07c posix_listdir(): When an error occurs, call
posix_error_with_filename() instead of posix_error(), passing in the
name argument, so you get information on which directory was being
listed.
1999-05-27 23:13:21 +00:00
Guido van Rossum 8bfefce75e On HP-UX, -rpath is another option taking an argument that needs to go
to the libs variable.  Reported by Albert Chin-A-Young.
1999-05-21 19:18:49 +00:00
Guido van Rossum ea424e19f1 Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5.
The test really wanted to distinguish between the two.  So now we test
for __GLIBC__ instead.  I have confirmed that this works for glibc and
I have an email from Christian Tanzer confirming that it works for
libc5, so it should be fine.
1999-04-23 20:59:05 +00:00
Guido van Rossum 1b9e0aae6e Jim Fulton writes:
I have attached a new cPickle that adds a new control attribute
to unpicklers:

  Added new Unpickler attribute, find_global.  If set to None, then
  global and instance pickles are disabled.  Otherwise, it should be set to
  a callable object that takes two arguments, a module name and an
  object name, and returns an object.  If the attribute is unset, then
  the default mechanism is used.

  This feature provides an additional mechanism for controlling which
  classes can be used for unpickling.
1999-04-19 17:58:18 +00:00
Guido van Rossum dc8b569155 Patch from Tim Peters to repare a the problem that tracebacks are off
by a line when Python is run with -x.
1999-04-19 17:54:19 +00:00
Guido van Rossum ae84e8d0f6 Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
join \-terminated lines.
1999-04-19 17:16:12 +00:00
Guido van Rossum a7379d9a34 Avoid triggering Alpha OSF/1 specific code on Alpha NT or Linux. 1999-04-19 16:50:26 +00:00
Guido van Rossum 7a1229991d Put back __osf__ support for gethostbyname_r(); the real bug was that
it was being used even without threads.  This of course might be an
all-platform problem so now we only use the _r variant when we are
using threads.
1999-04-13 04:07:32 +00:00
Guido van Rossum 761fcd03aa Fix accidentally reversed NULL test in load_mark(). Suggested by
Tamito Kajiyama.  (This caused a bug only on platforms where malloc(0)
returns NULL.)
1999-04-12 22:51:20 +00:00
Guido van Rossum d4b8b09a73 'clean' target should remove hassignal. 1999-04-12 16:42:13 +00:00
Guido van Rossum aee9bb2d0b Cast added by Jack Jansen (for Mac port). 1999-04-12 14:35:48 +00:00
Guido van Rossum ff1ccbfc21 casts for picky compilers. 1999-04-10 15:48:23 +00:00
Guido van Rossum cbf8906f5d 3-arg gethostbyname_r doesn't really work on OSF/1. 1999-04-10 15:46:01 +00:00
Guido van Rossum b729a1d0a8 Patch by Andrew Kuchling to unflush() (flush() for deflating).
Without this, if inflate() returned Z_BUF_ERROR asking for more output
space, we would report the error; now, we increase the buffer size and
try again, just as for Z_OK.
1999-04-07 20:23:17 +00:00
Guido van Rossum 8c67e4e8c9 Add extern decl for fsync() for SunOS 4.x. 1999-04-07 15:49:41 +00:00
Guido van Rossum 0ffdd05cc3 Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
1999-04-05 21:54:14 +00:00
Guido van Rossum c91fcaa43b Protection against picling to/from closed (real) file.
The problem was reported by Moshe Zadka.
1999-03-29 20:00:14 +00:00