]> granicus.if.org Git - python/log
python
24 years agoAllow 2.0 on the list of target versions. NB. this isn't enough: the GUI part,
Greg Ward [Thu, 29 Jun 2000 23:50:19 +0000 (23:50 +0000)]
Allow 2.0 on the list of target versions.  NB. this isn't enough: the GUI part,
misc/install.c, still needs to be updated, and it looks like a non-trivial
change.

24 years agostill trying to figure out how to fix the remaining
Fredrik Lundh [Thu, 29 Jun 2000 23:33:12 +0000 (23:33 +0000)]
still trying to figure out how to fix the remaining
group reset problem.  in the meantime, I added some
optimizations:

- added "inline" directive to LOCAL

  (this assumes that AC_C_INLINE does what it's
  supposed to do).  to compile SRE on a non-unix
  platform that doesn't support inline, you have
  to add a "#define inline" somewhere...

- added code to generate a SRE_OP_INFO primitive

- added code to do fast prefix search

  (enabled by the USE_FAST_SEARCH define; default
  is on, in this release)

24 years agoDon't try to guess the name of a .def file -- if one is supplied, use it,
Greg Ward [Thu, 29 Jun 2000 23:09:20 +0000 (23:09 +0000)]
Don't try to guess the name of a .def file -- if one is supplied, use it,
otherwise just generate an '/export:' option.

24 years agoOn second thought, first try for _winreg, and then winreg. Only if both
Greg Ward [Thu, 29 Jun 2000 23:04:59 +0000 (23:04 +0000)]
On second thought, first try for _winreg, and then winreg.  Only if both
fail do we try for win32api/win32con.  If *those* both fail, then we don't
have registry access.  Phew!

24 years agoRemoved --l2h-config option; it introduced unnecessary complexity and
Fred Drake [Thu, 29 Jun 2000 23:01:40 +0000 (23:01 +0000)]
Removed --l2h-config option; it introduced unnecessary complexity and
is not needed anywhere.

24 years agoChanged to use _winreg module instead of winreg.
Greg Ward [Thu, 29 Jun 2000 22:59:10 +0000 (22:59 +0000)]
Changed to use _winreg module instead of winreg.

24 years agoCleaned up and reformatted by Rene Liebscher.
Greg Ward [Thu, 29 Jun 2000 22:57:55 +0000 (22:57 +0000)]
Cleaned up and reformatted by Rene Liebscher.
More reformatting by me.
Also added some editorial comments.

24 years agoBump version to 2.0.
Guido van Rossum [Thu, 29 Jun 2000 22:32:08 +0000 (22:32 +0000)]
Bump version to 2.0.

24 years agoBump version to 2.0b1. Change copyright to BeOpen, CNRI, SMC.
Guido van Rossum [Thu, 29 Jun 2000 22:30:37 +0000 (22:30 +0000)]
Bump version to 2.0b1.  Change copyright to BeOpen, CNRI, SMC.

24 years agoBump version to 2.0b1.
Guido van Rossum [Thu, 29 Jun 2000 22:29:24 +0000 (22:29 +0000)]
Bump version to 2.0b1.

24 years agoTentative 2.0 and BeOpen upgrade.
Guido van Rossum [Thu, 29 Jun 2000 22:28:44 +0000 (22:28 +0000)]
Tentative 2.0 and BeOpen upgrade.

24 years agoTrent Mick <trentm@activestate.com>:
Fred Drake [Thu, 29 Jun 2000 21:31:02 +0000 (21:31 +0000)]
Trent Mick <trentm@activestate.com>:
This patch fixes a possible overflow in the Sleep system call on
Win32/64 in the time_sleep() function in the time module. For very
large values of the give time to sleep the number of milliseconds can
overflow and give unexpected sleep intervals. THis patch raises an
OverflowError if the value overflows.

Closes SourceForge patch #100514.

24 years agoTrent Mick <trentm@activestate.com>:
Fred Drake [Thu, 29 Jun 2000 21:12:41 +0000 (21:12 +0000)]
Trent Mick <trentm@activestate.com>:
This patch fixes the posix module for large file support mainly on
Win64, although some general cleanup is done as well.

The changes are:

- abstract stat->STAT, fstat->FSTAT, and struct stat->STRUCT_STAT
This is because stat() etc. are not the correct functions to use on
Win64 (nor maybe on other platforms?, if not then it is now trivial to
select the appropriate one). On Win64 the appropriate system functions
are _stati64(), etc.

- add _pystat_fromstructstat(), it builds the return tuple for the
fstat system call. This functionality was being duplicated. As well
the construction of the tuple was modified to ensure no overflow of
the time_t elements (sizeof(time_t) > sizeof(long) on Win64).

- add overflow protection for the return values of posix_spawnv and
posix_spawnve

- use the proper 64-bit capable lseek() on Win64

- use intptr_t instead of long where appropriate from Win32/64 blocks
(sizeof(void*) > sizeof(long) on Win64)

This closes SourceForge patch #100513.

24 years agoTrent Mick <trentm@activestate.com>:
Fred Drake [Thu, 29 Jun 2000 20:56:28 +0000 (20:56 +0000)]
Trent Mick <trentm@activestate.com>:
Mark Hammond provided (a long time ago) a better Win32 specific
time_clock implementation in timemodule.c. The library for this
implementation does not exist on Win64 (yet, at least). This patch
makes Win64 fall back on the system's clock() function for
time_clock().

This closes SourceForge patch #100512.

24 years agoThis patch extends PC/config.h and configure.in as appropriate for
Fred Drake [Thu, 29 Jun 2000 20:44:47 +0000 (20:44 +0000)]
This patch extends PC/config.h and configure.in as appropriate for
64-bit readiness (the config values are needed for patches that I will
be submitting later today. The changes are as follows:

- add SIZEOF_OFF_T #define's to PC/config.h (it was already in configure.in)

- add SIZEOF_TIME_T #define to PC/config.h and configure
Needed for some buffer overflow checking because sizeof(time_t) is
different on Win64.

- add SIZEOF_FPOS_T #define
Needed for the Win64 large file support implementation.

- add SIZEOF_HKEY in PC/config.h only
Needed for proper Win32 vs. Win64 handling in PC/winreg.c

- #define HAVE_LARGEFILE_SUPPORT for Win64

- typedef long intptr_t; for all Windows except Win64 (which defines it
itself)
This is a new ANSI (I think) type that is useful (and used by me) for
proper handling in msvcrtmodule.c and posixmodule.c

- indent the nested #ifdef's and #defines in PC/config.h
This is *so* much more readable. There cannot be a compiler
compatibilty issue here can there? Perl uses indented #defines and it
compiles with everything.

24 years agoUpdate comments relating to the removal of the -X option and of string
Fred Drake [Thu, 29 Jun 2000 20:15:14 +0000 (20:15 +0000)]
Update comments relating to the removal of the -X option and of string
exceptions in the interpreter and standard library.

24 years agoTypo.
Fred Drake [Thu, 29 Jun 2000 20:02:38 +0000 (20:02 +0000)]
Typo.

24 years agoThe low-level interface is now in _winreg; update the import here.
Fred Drake [Thu, 29 Jun 2000 19:42:00 +0000 (19:42 +0000)]
The low-level interface is now in _winreg; update the import here.

24 years agoPaul Prescod <paul@prescod.net>:
Fred Drake [Thu, 29 Jun 2000 19:39:57 +0000 (19:39 +0000)]
Paul Prescod <paul@prescod.net>:
W3C DOM implementation for Python.

24 years agoPackage docstring.
Fred Drake [Thu, 29 Jun 2000 19:36:27 +0000 (19:36 +0000)]
Package docstring.

24 years agoThe usual :)
Guido van Rossum [Thu, 29 Jun 2000 19:35:29 +0000 (19:35 +0000)]
The usual :)

24 years agoPaul Prescod <paul@prescod.net>:
Fred Drake [Thu, 29 Jun 2000 19:34:54 +0000 (19:34 +0000)]
Paul Prescod <paul@prescod.net>:
SAX interfaces for Python.

24 years agoPackage docstring and initialization.
Fred Drake [Thu, 29 Jun 2000 19:33:43 +0000 (19:33 +0000)]
Package docstring and initialization.

24 years agoPackage docstring.
Fred Drake [Thu, 29 Jun 2000 19:28:01 +0000 (19:28 +0000)]
Package docstring.

24 years agoThis patch addresses two main issues: (1) There exist some non-fatal
Fred Drake [Thu, 29 Jun 2000 19:17:04 +0000 (19:17 +0000)]
This patch addresses two main issues: (1) There exist some non-fatal
errors in some of the hash algorithms. For exmaple, in float_hash and
complex_hash a certain part of the value is not included in the hash
calculation. See Tim's, Guido's, and my discussion of this on
python-dev in May under the title "fix float_hash and complex_hash for
64-bit *nix"

(2) The hash algorithms that use pointers (e.g. func_hash, code_hash)
are universally not correct on Win64 (they assume that sizeof(long) ==
sizeof(void*))

As well, this patch significantly cleans up the hash code. It adds the
two function _Py_HashDouble and _PyHash_VoidPtr that the various
hashing routine are changed to use.

These help maintain the hash function invariant: (a==b) =>
(hash(a)==hash(b))) I have added Lib/test/test_hash.py and
Lib/test/output/test_hash to test this for some cases.

24 years ago[Old patch that hadn't been checked in.]
Fred Drake [Thu, 29 Jun 2000 18:50:59 +0000 (18:50 +0000)]
[Old patch that hadn't been checked in.]

get_starttag_text():  New method.
        Return the text of the most recently parsed start tag, from
        the '<' to the '>' or '/'.  Not really useful for structure
        processing, but requested for Web-related use.  May also be
        useful for being able to re-generate the input from the parse
        events, but there's no equivalent for end tags.

attrfind:  Be a little more forgiving of unquoted attribute values.

24 years ago- fixed another split problem
Fredrik Lundh [Thu, 29 Jun 2000 18:03:25 +0000 (18:03 +0000)]
- fixed another split problem
  (those semantics are weird...)

- got rid of $Id$'s (for the moment, at least).  in other
  words, there should be no more "empty" checkins.

- internal: some minor cleanups.

24 years ago- workaround to make 1.6 build under MSVC 5.0. hopefully,
Fredrik Lundh [Thu, 29 Jun 2000 17:25:30 +0000 (17:25 +0000)]
- workaround to make 1.6 build under MSVC 5.0.  hopefully,
  trent (who broke it in the first place ;-) will come up
  with a cleaner solution.

24 years agoSkip Montanaro: modify test_socket.py to listen/connect using loopback addr
Guido van Rossum [Thu, 29 Jun 2000 17:00:54 +0000 (17:00 +0000)]
Skip Montanaro: modify test_socket.py to listen/connect using loopback addr

24 years ago- fixed split
Fredrik Lundh [Thu, 29 Jun 2000 16:57:40 +0000 (16:57 +0000)]
- fixed split
  (test_sre still complains about split, but that's caused by
  the group reset bug, not split itself)

- added more mark slots
  (should be dynamically allocated, but 100 is better than 32.
  and checking for the upper limit is better than overwriting
  the memory ;-)

- internal: renamed the cursor helper class

- internal: removed some bloat from sre_compile

24 years agoPaul Prescod <paul@prescod.net>:
Fred Drake [Thu, 29 Jun 2000 16:53:06 +0000 (16:53 +0000)]
Paul Prescod <paul@prescod.net>:
OO wrapper for _winreg; blessed by Mark Hammond.

24 years agoFinish converting the winreg extension to _winreg.
Fred Drake [Thu, 29 Jun 2000 16:43:49 +0000 (16:43 +0000)]
Finish converting the winreg extension to _winreg.

24 years agoNils Fischbeck: added doc strings to everything. Martin von Loewis
Guido van Rossum [Thu, 29 Jun 2000 16:30:50 +0000 (16:30 +0000)]
Nils Fischbeck: added doc strings to everything.  Martin von Loewis
has reviewed this, too.

24 years agoChange string exceptions to class exceptions.
Guido van Rossum [Thu, 29 Jun 2000 16:15:52 +0000 (16:15 +0000)]
Change string exceptions to class exceptions.

24 years agoUpdate the module name to _winreg, pending checkin of Paul Prescod's
Fred Drake [Thu, 29 Jun 2000 16:14:14 +0000 (16:14 +0000)]
Update the module name to _winreg, pending checkin of Paul Prescod's
OO wrapper for this module.

24 years agoThread support is turned on my default now. To disable building
Barry Warsaw [Thu, 29 Jun 2000 16:12:00 +0000 (16:12 +0000)]
Thread support is turned on my default now.  To disable building
threads use --without-threads.  No extra tests of thread/compiler
combinations have been added.

--with(out)-thread and --with(out)-threads are completely
interchangeable.

--with-threads still supports the =DIRECTORY option for specifying
where to find thread libraries.

24 years agoUpdated the comment in this file to reflect the new defaults. Threads
Barry Warsaw [Thu, 29 Jun 2000 16:08:28 +0000 (16:08 +0000)]
Updated the comment in this file to reflect the new defaults.  Threads
are enabled by default now unless --without-threads is given to
configure.

24 years agoChange the loop index in normalizestring() to size_t too, to avoid a
Guido van Rossum [Thu, 29 Jun 2000 14:50:15 +0000 (14:50 +0000)]
Change the loop index in normalizestring() to size_t too, to avoid a
warning on Windows.

24 years agopyexpat notes: add the name of the archive to the ar command
Jeremy Hylton [Thu, 29 Jun 2000 14:40:45 +0000 (14:40 +0000)]
pyexpat notes: add the name of the archive to the ar command

24 years agoWhoops! We just discovered that Gordon's revamp of this module was
Guido van Rossum [Thu, 29 Jun 2000 14:13:28 +0000 (14:13 +0000)]
Whoops!  We just discovered that Gordon's revamp of this module was
accidentally wiped out by Ping's patch (which shouldn't have affected
this file at all, had Ping done a cvs update).

This checkin restores Gordon's version, with Fredrik's change merged
back in.

24 years agoMarc-Andre Lemburg <mal@lemburg.com>:
Marc-André Lemburg [Thu, 29 Jun 2000 13:31:10 +0000 (13:31 +0000)]
Marc-Andre Lemburg <mal@lemburg.com>:
New test output

24 years ago- renamed "tolower" hook (it happened to work with
Fredrik Lundh [Thu, 29 Jun 2000 12:48:37 +0000 (12:48 +0000)]
- renamed "tolower" hook (it happened to work with
  my compiler, but not on guido's box...)

24 years agoTypo fix.
Greg Ward [Thu, 29 Jun 2000 12:45:50 +0000 (12:45 +0000)]
Typo fix.

24 years ago- make sure group names are valid identifiers
Fredrik Lundh [Thu, 29 Jun 2000 12:38:45 +0000 (12:38 +0000)]
- make sure group names are valid identifiers
  (closes the "SRE: symbolic reference" bug)

24 years ago- last patch broke parse_template; fixed by changing some
Fredrik Lundh [Thu, 29 Jun 2000 11:34:28 +0000 (11:34 +0000)]
- last patch broke parse_template; fixed by changing some
  tests in sre_patch back to previous version

- fixed return value from findall

- renamed a bunch of functions inside _sre (way too
  many leading underscores...)

</F>

24 years agodemonstration importers
Greg Stein [Thu, 29 Jun 2000 11:05:30 +0000 (11:05 +0000)]
demonstration importers

24 years ago- removed "alpha only" licensing restriction
Fredrik Lundh [Thu, 29 Jun 2000 10:34:56 +0000 (10:34 +0000)]
- removed "alpha only" licensing restriction
- removed some hacks that worked around 1.6 alpha bugs
- removed bogus test code from sre_parse

24 years agotowards 1.6b1
Fredrik Lundh [Thu, 29 Jun 2000 08:58:44 +0000 (08:58 +0000)]
towards 1.6b1

24 years agotowards 1.6b1
Fredrik Lundh [Thu, 29 Jun 2000 08:55:54 +0000 (08:55 +0000)]
towards 1.6b1

24 years agoImprove explanation of how to build the pyexpat module.
Fred Drake [Thu, 29 Jun 2000 05:29:08 +0000 (05:29 +0000)]
Improve explanation of how to build the pyexpat module.

24 years agoConvert to use class-based exceptions.
Fred Drake [Thu, 29 Jun 2000 05:06:02 +0000 (05:06 +0000)]
Convert to use class-based exceptions.
Correct exception information in one docstring.

24 years agoMake it clear that id() can return either a long integer or a plain integer.
Fred Drake [Thu, 29 Jun 2000 03:46:46 +0000 (03:46 +0000)]
Make it clear that id() can return either a long integer or a plain integer.

24 years agoAdd update of httplib docs to reflect Greg Stein's recent updates.
Fred Drake [Thu, 29 Jun 2000 03:33:28 +0000 (03:33 +0000)]
Add update of httplib docs to reflect Greg Stein's recent updates.
Greg, this is yours!

24 years agoFixed so 'get_source_files()' calls 'check_extension_list()' -- that way,
Greg Ward [Thu, 29 Jun 2000 02:16:24 +0000 (02:16 +0000)]
Fixed so 'get_source_files()' calls 'check_extension_list()' -- that way,
we can run "sdist" on a distribution with old-style extension structures
even if we haven't built it yet.  Bug spotted by Harry Gebel.

24 years agoFixed 'findall()' so it only returns regular files -- no directories.
Greg Ward [Thu, 29 Jun 2000 02:06:29 +0000 (02:06 +0000)]
Fixed 'findall()' so it only returns regular files -- no directories.
Changed 'prune_file_list()' so it also prunes out RCS and CVS directories.
Added 'is_regex' parameter to 'select_pattern()', 'exclude_pattern()',
  and 'translate_pattern()', so that you don't have to be constrained
  by the simple shell-glob-like pattern language, and can escape into
  full-blown regexes when needed.  Currently this is only available
  in code -- it's not exposed in the manifest template mini-language.
Added 'prune' option (controlled by --prune and --no-prune) to determine
  whether we call 'prune_file_list()' or not -- it's true by default.
Fixed 'negative_opt' -- it was misnamed and not being seen by dist.py.
Added --no-defaults to the option table, so it's seen by FancyGetopt.

24 years agoJack Jansen: Use include "" instead of <>; and staticforward declarations
Guido van Rossum [Thu, 29 Jun 2000 00:06:39 +0000 (00:06 +0000)]
Jack Jansen: Use include "" instead of <>; and staticforward declarations

24 years agoSome new names (some contributors of patches that haven't even been
Guido van Rossum [Thu, 29 Jun 2000 00:04:51 +0000 (00:04 +0000)]
Some new names (some contributors of patches that haven't even been
accepted yet!)

24 years agoVladimir Marangozov:
Guido van Rossum [Wed, 28 Jun 2000 23:53:56 +0000 (23:53 +0000)]
Vladimir Marangozov:

This patch fixes a problem on AIX with the signed int case code in
getargs.c, after Trent Mick's intervention about MIN/MAX overflow
checks. The AIX compiler/optimizer generates bogus code with the
default flags "-g -O" causing test_builtin to fail: int("10", 16) <>
16L. Swapping the two checks in the signed int code makes the problem
go away.

Also, make the error messages fit in 80 char lines in the
source.

24 years agoVladimir Marangozov:
Guido van Rossum [Wed, 28 Jun 2000 23:46:07 +0000 (23:46 +0000)]
Vladimir Marangozov:

Avoid calling the dealloc function, previously triggered with
DECREF(inst).  This caused a segfault in PyDict_GetItem, called with a
NULL dict, whenever inst->in_dict fails under low-memory conditions.

24 years agoUrmpf. Quality control on this patch lapsed a bit. :-(
Guido van Rossum [Wed, 28 Jun 2000 23:24:19 +0000 (23:24 +0000)]
Urmpf.  Quality control on this patch lapsed a bit. :-(

The depth field was never decremented inside w_object(), and it was
never initialized in PyMarshal_WriteObjectToFile().

This caused imports from .pyc files to fil mysteriously when the .pyc
file was written by the broken code -- w_object() would bail out
early, but PyMarshal_WriteObjectToFile() doesn't check the error or
return an error code, and apparently the marshalling code doesn't call
PyErr_Check() either.  (That's a separate patch if I feel like it.)

24 years agoRunning the program through itself reveals that one end tag was
Guido van Rossum [Wed, 28 Jun 2000 22:55:20 +0000 (22:55 +0000)]
Running the program through itself reveals that one end tag was
mislabeled.

(Using -c and then -e rearranges some comments, so I won't check that
in -- but it's a good test anyway.

Note that pindent is not perfect -- e.g. it doesn't know about
triple-quoted strings!)

24 years agoPeter Schneider-Kamp:
Guido van Rossum [Wed, 28 Jun 2000 22:47:22 +0000 (22:47 +0000)]
Peter Schneider-Kamp:

Problem:
A Python program can be completed and reformatted using
Tools/scripts/pindent.py. Unfortunately there is no option for removal
of the generated "# end"-tags.  Although a few Python commands or a
"grep -v '# end '" can do wonders here, there are two drawbacks:
- not everyone has grep/time to write a Python script
- it is not checked whether the "# end"-tags were used validly

Solution:
add extra option "-e" (eliminate) to pindent.py

24 years agoTrent Mick:
Guido van Rossum [Wed, 28 Jun 2000 22:26:21 +0000 (22:26 +0000)]
Trent Mick:

Fix warnings on 64-bit build build of signalmodule.c

- Though I know that SIG_DFL and SIG_IGN are just small constants,
there are cast to function pointers so the appropriate Python call is
PyLong_FromVoidPtr so that the pointer value cannot overflow on Win64
where sizeof(long) < sizeof(void*).

24 years agoTrent Mick:
Guido van Rossum [Wed, 28 Jun 2000 22:23:56 +0000 (22:23 +0000)]
Trent Mick:

This patch fixes cPickle.c for 64-bit platforms.

- The false assumption sizeof(long) == size(void*) exists where
PyInt_FromLong is used to represent a pointer. The safe Python call
for this is PyLong_FromVoidPtr. (On platforms where the above
assumption *is* true a PyInt is returned as before so there is no
effective change.)

- use size_t instead of int for some variables

24 years agoTrent Mick: familiar simple Win64 patches
Guido van Rossum [Wed, 28 Jun 2000 22:20:06 +0000 (22:20 +0000)]
Trent Mick: familiar simple Win64 patches

24 years agoGive Moshe some work to do.
Fred Drake [Wed, 28 Jun 2000 22:13:06 +0000 (22:13 +0000)]
Give Moshe some work to do.

24 years agoAdd a "See also:" link to the curses.ascii module.
Fred Drake [Wed, 28 Jun 2000 22:11:40 +0000 (22:11 +0000)]
Add a "See also:" link to the curses.ascii module.

24 years agoMade the title of the Examples subsection plural!
Fred Drake [Wed, 28 Jun 2000 22:09:20 +0000 (22:09 +0000)]
Made the title of the Examples subsection plural!

24 years agoAdded note that the atexit module was added for Python 1.6.
Fred Drake [Wed, 28 Jun 2000 22:07:55 +0000 (22:07 +0000)]
Added note that the atexit module was added for Python 1.6.

24 years agoTrent Mick's Win64 changes: size_t vs. int or long; also some overflow
Guido van Rossum [Wed, 28 Jun 2000 22:07:35 +0000 (22:07 +0000)]
Trent Mick's Win64 changes: size_t vs. int or long; also some overflow
tests.

24 years agoAdded entry for the curses.ascii module.
Fred Drake [Wed, 28 Jun 2000 22:05:44 +0000 (22:05 +0000)]
Added entry for the curses.ascii module.

24 years agoAdded entries for the curses.ascii module.
Fred Drake [Wed, 28 Jun 2000 22:03:29 +0000 (22:03 +0000)]
Added entries for the curses.ascii module.

24 years agoTrent Mick: familiar simple Win64 patches
Guido van Rossum [Wed, 28 Jun 2000 22:00:02 +0000 (22:00 +0000)]
Trent Mick: familiar simple Win64 patches

24 years agoadded ucnhash (optional on USE_UCNHASH) and the mysteriously disappeared math.
Jack Jansen [Wed, 28 Jun 2000 21:59:35 +0000 (21:59 +0000)]
added ucnhash (optional on USE_UCNHASH) and the mysteriously disappeared math.

24 years agoucnhash and various other modules added.
Jack Jansen [Wed, 28 Jun 2000 21:58:03 +0000 (21:58 +0000)]
ucnhash and various other modules added.

24 years agoAdded USE_UCNHASH (experimental, I hope it can go), USE_TOOLBOX and USE_QT.
Jack Jansen [Wed, 28 Jun 2000 21:57:24 +0000 (21:57 +0000)]
Added USE_UCNHASH (experimental, I hope it can go), USE_TOOLBOX and USE_QT.

24 years agoTrent Mick: change a few casts for Win64 compatibility.
Guido van Rossum [Wed, 28 Jun 2000 21:57:18 +0000 (21:57 +0000)]
Trent Mick: change a few casts for Win64 compatibility.

24 years agoAdded USE_UCNHASH (experimental, I hope it can go)
Jack Jansen [Wed, 28 Jun 2000 21:57:05 +0000 (21:57 +0000)]
Added USE_UCNHASH (experimental, I hope it can go)

24 years agoSkip Montanaro <skip@mojam.com>:
Fred Drake [Wed, 28 Jun 2000 21:51:43 +0000 (21:51 +0000)]
Skip Montanaro <skip@mojam.com>:
Added an example of using an HTTP POST request.

24 years agoTrent Mick: use size_t instead of int where appropriate (time_strftime()).
Guido van Rossum [Wed, 28 Jun 2000 21:33:59 +0000 (21:33 +0000)]
Trent Mick: use size_t instead of int where appropriate (time_strftime()).

24 years agoTrent Mick: use size_t instead of int where appropriate (set_key()).
Guido van Rossum [Wed, 28 Jun 2000 21:31:10 +0000 (21:31 +0000)]
Trent Mick: use size_t instead of int where appropriate (set_key()).

24 years agoTrent Mick: use size_t instead of int where appropriate (call_readline()).
Guido van Rossum [Wed, 28 Jun 2000 21:30:31 +0000 (21:30 +0000)]
Trent Mick: use size_t instead of int where appropriate (call_readline()).

24 years agoTrent Mick: use size_t instead of int where appropriate (mpz_format()).
Guido van Rossum [Wed, 28 Jun 2000 21:29:47 +0000 (21:29 +0000)]
Trent Mick: use size_t instead of int where appropriate (mpz_format()).

24 years agoTrent Mick: use size_t instead of int where appropriate (various spots).
Guido van Rossum [Wed, 28 Jun 2000 21:29:03 +0000 (21:29 +0000)]
Trent Mick: use size_t instead of int where appropriate (various spots).

24 years agoTrent Mick: use size_t instead of int where appropriate (in
Guido van Rossum [Wed, 28 Jun 2000 21:27:21 +0000 (21:27 +0000)]
Trent Mick: use size_t instead of int where appropriate (in
fromfile(), to hold fread() result.)

24 years agoTrent Mick: use size_t instead of int where appropriate (in strxfrm(),
Guido van Rossum [Wed, 28 Jun 2000 21:23:33 +0000 (21:23 +0000)]
Trent Mick: use size_t instead of int where appropriate (in strxfrm(),
to hold strlen() outcome).

24 years agoTrent Mick:
Guido van Rossum [Wed, 28 Jun 2000 21:18:13 +0000 (21:18 +0000)]
Trent Mick:

This patches fixes a possible overflow of the optional timeout
parameter for the select() function (selectmodule.c). This timeout is
passed in as a double and then truncated to an int. If the double is
sufficiently large you can get unexpected results as it
overflows. This patch raises an overflow if the given select timeout
overflows.

[GvR: To my embarrassment, the original code was assuming an int could
always hold a million.  Note that the overflow check doesn't test for
a very large *negative* timeout passed in -- but who in the world
would do such a thing?]

24 years agoTrent Mick:
Guido van Rossum [Wed, 28 Jun 2000 21:12:25 +0000 (21:12 +0000)]
Trent Mick:

Various small fixes to the builtin module to ensure no buffer
overflows.

- chunk #1:
Proper casting to ensure no truncation, and hence no surprises, in the
comparison.

- chunk #2:
The id() function guarantees a unique return value for different
objects.  It does this by returning the pointer to the object. By
returning a PyInt, on Win64 (sizeof(long) < sizeof(void*)) the pointer
is truncated and the guarantee may be proven false. The appropriate
return function is PyLong_FromVoidPtr, this returns a PyLong if that
is necessary to return the pointer without truncation.

[GvR: note that this means that id() can now return a long on Win32
platforms.  This *might* break some code...]

- chunk #3:
Ensure no overflow in raw_input(). Granted the user would have to pass
in >2GB of data but it *is* a possible buffer overflow condition.

24 years agoSupport constant as a font name for the first column of a table using the
Fred Drake [Wed, 28 Jun 2000 21:06:08 +0000 (21:06 +0000)]
Support constant as a font name for the first column of a table using the
tableii & friends markup family.

24 years agoJack Jansen: Moved includes to the top, removed think C support
Guido van Rossum [Wed, 28 Jun 2000 20:57:07 +0000 (20:57 +0000)]
Jack Jansen: Moved includes to the top, removed think C support

24 years agoJack Jansen: Mac Carbon: don't include sys/types if we don't have it
Guido van Rossum [Wed, 28 Jun 2000 20:56:30 +0000 (20:56 +0000)]
Jack Jansen: Mac Carbon: don't include sys/types if we don't have it

24 years agoJack Jansen: Removed support for long-dead Think C compiler
Guido van Rossum [Wed, 28 Jun 2000 20:55:34 +0000 (20:55 +0000)]
Jack Jansen: Removed support for long-dead Think C compiler

24 years agoJack Jansen: Removed Macintosh tab-guessing code
Guido van Rossum [Wed, 28 Jun 2000 20:54:53 +0000 (20:54 +0000)]
Jack Jansen: Removed Macintosh tab-guessing code

24 years agoJack Jansen: Support for conditional inclusion of methods and functions
Guido van Rossum [Wed, 28 Jun 2000 20:53:33 +0000 (20:53 +0000)]
Jack Jansen: Support for conditional inclusion of methods and functions

24 years agoRevise the description of when functions retrieved from class instances
Fred Drake [Wed, 28 Jun 2000 20:15:47 +0000 (20:15 +0000)]
Revise the description of when functions retrieved from class instances
are and are not turned into bound methods; some confusion was noted by
Andrew Dalke.

In particular, it has to be noted that functions located on the class
instance are not turned into any sort of method, only those which are
found via the underlying class.

24 years agoMichael Hudson <mwh21@cam.ac.uk>:
Fred Drake [Wed, 28 Jun 2000 18:47:56 +0000 (18:47 +0000)]
Michael Hudson <mwh21@cam.ac.uk>:
As I really do not have anything better to do at the moment, I have written
a patch to Python/marshal.c that prevents Python dumping core when trying
to marshal stack bustingly deep (or recursive) data structure.

It just throws an exception; even slightly clever handling of recursive
data is what pickle is for...

[Fred Drake:]  Moved magic constant 5000 to a #define.

This closes SourceForge patch #100645.

24 years agoTrent Mick <trentm@activestate.com>:
Fred Drake [Wed, 28 Jun 2000 17:50:51 +0000 (17:50 +0000)]
Trent Mick <trentm@activestate.com>:
Testing: test_array.py was also extended to check that one can set the
full range of values for each of the integral signed and unsigned
array types.

This closes SourceForge patch #100506.

24 years agoTrent Mick <trentm@activestate.com>:
Fred Drake [Wed, 28 Jun 2000 17:49:30 +0000 (17:49 +0000)]
Trent Mick <trentm@activestate.com>:

The cause: Relatively recent (last month) patches to getargs.c added
overflow checking to the PyArg_Parse*() integral formatters thereby
restricting 'b' to unsigned char value and 'h','i', and 'l' to signed
integral values (i.e. if the incoming value is outside of the
specified bounds you get an OverflowError, previous it silently
overflowed).

The problem: This broke the array module (as Fredrik pointed out)
because *its* formatters relied on the loose allowance of signed and
unsigned ranges being able to pass through PyArg_Parse*()'s
formatters.

The fix: This patch fixes the array module to work with the more
strict bounds checking now in PyArg_Parse*().

How: If the type signature of a formatter in the arraymodule exactly
matches one in PyArg_Parse*(), then use that directly. If there is no
equivalent type signature in PyArg_Parse*() (e.g. there is no unsigned
int formatter in PyArg_Parse*()), then use the next one up and do some
extra bounds checking in the array module.

This partially closes SourceForge patch #100506.

24 years agoThomas Wouters <thomas@xs4all.net>:
Fred Drake [Wed, 28 Jun 2000 17:27:48 +0000 (17:27 +0000)]
Thomas Wouters <thomas@xs4all.net>:
Documentation updates related to the addition of openpty() and forkpty().

24 years agoMarc-Andre Lemburg <mal@lemburg.com>:
Marc-André Lemburg [Wed, 28 Jun 2000 16:53:16 +0000 (16:53 +0000)]
Marc-Andre Lemburg <mal@lemburg.com>:
Perfect hash table generator. Outputs a Python extension module
which provides access to the hash table (which is stored in static
C data) using custom code.

This module can currently only generates code for the ucnhash
module, but can easily be adapted to produce perfect hash tables
for other tasks where fast lookup in large tables is needed.

By Bill Tutt.