Jack Jansen [Wed, 5 Sep 2001 22:07:52 +0000 (22:07 +0000)]
Changes to make these work under OSX as the main program for a
fullblown drag and drop application. To my surprise it is starting
to work already: Python actually executes a script dropped on it.
To be done:
- Make sure this still works in MacPython
- Don't lose argv[0] in the process
- Applet support
Jack Jansen [Wed, 5 Sep 2001 22:04:25 +0000 (22:04 +0000)]
Python is a Shell, not a Viewer.
Jack Jansen [Wed, 5 Sep 2001 20:08:07 +0000 (20:08 +0000)]
LongReprTest fails on the Mac because it uses filenames with more than
32 characters per component. This makes mkdir() calls and such fail with EINVAL.
For now I am disabling the test on the Mac, and I'll open a bugreport.
Guido van Rossum [Wed, 5 Sep 2001 19:51:08 +0000 (19:51 +0000)]
Use the build directory by default, and update the version.
Guido van Rossum [Wed, 5 Sep 2001 19:45:34 +0000 (19:45 +0000)]
Class FieldStorage: add two new methods, getfirst() and getlist(),
that provide a somewhat more uniform interface to getting values.
This is from SF patch #453691.
Guido van Rossum [Wed, 5 Sep 2001 19:29:56 +0000 (19:29 +0000)]
class Listbox: add itemcget, to satisfy SF patch #457713.
Fix up docstring for itemconfigure.
Skip Montanaro [Wed, 5 Sep 2001 19:27:13 +0000 (19:27 +0000)]
typo...
Guido van Rossum [Wed, 5 Sep 2001 19:13:16 +0000 (19:13 +0000)]
SF bug #427073: DLINCLDIR defined incorrectly (Skip Montanaro).
I don't know what difference it makes, but '/' indeed makes less sense
as an include dir than '.', so I'm changing the default. Just so I
can close the bug. ;-)
Guido van Rossum [Wed, 5 Sep 2001 18:57:51 +0000 (18:57 +0000)]
Change the date field to use $Date$ so it won't be outrageously out of
date.
Guido van Rossum [Wed, 5 Sep 2001 18:55:34 +0000 (18:55 +0000)]
Document -Q. Move arguments around to be in strict alphabetical
order. Add breaks in SYNOPSIS.
Guido van Rossum [Wed, 5 Sep 2001 18:43:35 +0000 (18:43 +0000)]
Describe -E (which was added to 2.2a2).
Finn Bock [Wed, 5 Sep 2001 18:40:33 +0000 (18:40 +0000)]
[ #458701 ] Patch to zipfile.py for Java
Patch by Jim Ahlstrom which lets java's zipfile classes read zipfiles
create by zipfile.py.
Guido van Rossum [Wed, 5 Sep 2001 17:52:31 +0000 (17:52 +0000)]
Remove a debug print left in the code by Fred.
Martin v. Löwis [Wed, 5 Sep 2001 17:09:48 +0000 (17:09 +0000)]
Patch #449815: Set filesystemencoding based on CODESET.
Jack Jansen [Wed, 5 Sep 2001 15:44:37 +0000 (15:44 +0000)]
A few more gcc warnings bite the dust.
Martin v. Löwis [Wed, 5 Sep 2001 15:18:00 +0000 (15:18 +0000)]
Move UnixWare 7 defines to acconfig.h, regenerate pyconfig.h.in.
Guido van Rossum [Wed, 5 Sep 2001 14:58:11 +0000 (14:58 +0000)]
Changes to automatically enable large file support on some systems.
I believe this works on Linux (tested both on a system with large file
support and one without it), and it may work on Solaris 2.7.
The changes are twofold:
(1) The configure script now boldly tries to set the two symbols that
are recommended (for Solaris and Linux), and then tries a test
script that does some simple seeking without writing.
(2) The _portable_{fseek,ftell} functions are a little more systematic
in how they try the different large file support options: first
try fseeko/ftello, but only if off_t is large; then try
fseek64/ftell64; then try hacking with fgetpos/fsetpos.
I'm keeping my fingers crossed. The meaning of the
HAVE_LARGEFILE_SUPPORT macro is not at all clear.
I'll see if I can get it to work on Windows as well.
Andrew M. Kuchling [Wed, 5 Sep 2001 14:53:31 +0000 (14:53 +0000)]
Note some changes that I need to write about
Martin v. Löwis [Wed, 5 Sep 2001 14:45:54 +0000 (14:45 +0000)]
Patch #453627: Define the following macros when compiling on a UnixWare 7.x system:
SCO_ATAN2_BUG, SCO_ACCEPT_BUG, and STRICT_SYSV_CURSES.
Work aroudn a bug in the SCO UnixWare atan2() implementation.
Martin v. Löwis [Wed, 5 Sep 2001 14:38:48 +0000 (14:38 +0000)]
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis [Wed, 5 Sep 2001 14:24:43 +0000 (14:24 +0000)]
Patch #455231: Support ELF properly on OpenBSD.
Martin v. Löwis [Wed, 5 Sep 2001 13:44:54 +0000 (13:44 +0000)]
Patch #428326: New class threading.Timer.
Guido van Rossum [Wed, 5 Sep 2001 13:37:47 +0000 (13:37 +0000)]
builtin_execfile(): initialize another local that the GCC on leroy
found it necessary to warn about.
Thomas Heller [Wed, 5 Sep 2001 13:00:40 +0000 (13:00 +0000)]
Implement PEP250: Use Lib/site-packages under windows.
bdist_wininst doesn't use the NT SCHEME any more, instead
a custom SCHEME is used, which is exchanged at installation
time, depending on the python version used.
Avoid a bogus warning frpom install_lib about installing
into a directory not on sys.path.
Andrew M. Kuchling [Wed, 5 Sep 2001 12:02:59 +0000 (12:02 +0000)]
[Bug #404274] Restore some special-case code for AIX and BeOS under 1.5.2.
This will have to stay until we decide to drop 1.5.2 compatibility
completely.
Jack Jansen [Wed, 5 Sep 2001 10:31:52 +0000 (10:31 +0000)]
Shut up many more gcc warnings.
Jack Jansen [Wed, 5 Sep 2001 10:27:53 +0000 (10:27 +0000)]
Only output the buffer size error label if it is used.
Shuts up another couple of gcc warnings.
Martin v. Löwis [Wed, 5 Sep 2001 08:36:52 +0000 (08:36 +0000)]
Use -fPIC instead of -fpic for gcc on HP/UX. Fixes bug #433234.
Martin v. Löwis [Wed, 5 Sep 2001 08:22:34 +0000 (08:22 +0000)]
Check for RFC 2553 API. Fixes bug #454493.
Tim Peters [Wed, 5 Sep 2001 06:24:58 +0000 (06:24 +0000)]
Make the error msgs in our pow() implementations consistent.
Tim Peters [Wed, 5 Sep 2001 06:24:24 +0000 (06:24 +0000)]
Repair indentation.
Tim Peters [Wed, 5 Sep 2001 05:38:10 +0000 (05:38 +0000)]
Try to recover from that glibc's ldexp apparently doesn't set errno on
overflow. Needs testing on Linux (test_long.py and test_long_future.py
especially).
Tim Peters [Wed, 5 Sep 2001 04:33:11 +0000 (04:33 +0000)]
loghelper(): Try to nudge the compiler into doing mults in an order that
minimizes roundoff error.
Guido van Rossum [Wed, 5 Sep 2001 02:27:04 +0000 (02:27 +0000)]
Another / that should be a // (previously not caught because of
incomplete coverage of the test suite).
Guido van Rossum [Wed, 5 Sep 2001 02:26:26 +0000 (02:26 +0000)]
Add a test for the final branch in repr.Repr.repr1(), which deals with
a default repr() that's longer than 20 characters.
Tim Peters [Wed, 5 Sep 2001 00:53:45 +0000 (00:53 +0000)]
Return reasonable results for math.log(long) and math.log10(long) (we were
getting Infs, NaNs, or nonsense in 2.1 and before; in yesterday's CVS we
were getting OverflowError; but these functions always make good sense
for positive arguments, no matter how large).
Tim Peters [Tue, 4 Sep 2001 23:17:42 +0000 (23:17 +0000)]
Mechanical fiddling to make this easier to work with in my editor.
Repaired the ldexp docstring (said the name of the func was "ldexp_doc").
Jack Jansen [Tue, 4 Sep 2001 22:29:31 +0000 (22:29 +0000)]
Added prototypes to shut gcc -Wstrict-prototypes up.
Jack Jansen [Tue, 4 Sep 2001 22:25:47 +0000 (22:25 +0000)]
Shut up a few more gcc warnings.
Jack Jansen [Tue, 4 Sep 2001 22:20:39 +0000 (22:20 +0000)]
Added prototypes to silence gcc strict-prototype warnings.
Fixed a few missing return values.
Jack Jansen [Tue, 4 Sep 2001 22:19:18 +0000 (22:19 +0000)]
Regenerated without default int return types.
Jack Jansen [Tue, 4 Sep 2001 22:16:33 +0000 (22:16 +0000)]
Don't use a default "int" return type, gcc gives a warning about it.
Jack Jansen [Tue, 4 Sep 2001 22:15:05 +0000 (22:15 +0000)]
Added pythonpath.r to the developer distribution. It's
useful to people extending Python. Suggested by
Alexandre Parenteau.
Tim Peters [Tue, 4 Sep 2001 22:08:56 +0000 (22:08 +0000)]
At Guido's suggestion, here's a new C API function, PyObject_Dir(), like
__builtin__.dir(). Moved the guts from bltinmodule.c to object.c.
Jack Jansen [Tue, 4 Sep 2001 21:33:12 +0000 (21:33 +0000)]
On MacOSX built the toolbox extension modules iff we're building with
--enable-framework.
Some modules that are also useful outside a fullblown application are
always built.
Jack Jansen [Tue, 4 Sep 2001 21:28:03 +0000 (21:28 +0000)]
Template for an OSX PythonInterpreter application.
Andrew M. Kuchling [Tue, 4 Sep 2001 21:25:58 +0000 (21:25 +0000)]
Correction: the Borland C port isn't fully operational yet
Jack Jansen [Tue, 4 Sep 2001 21:25:36 +0000 (21:25 +0000)]
Photoshop sources for icon files. Not pretty, but hey! I'm not an
artist (and a certain artist didn't jump in, yet).
Andrew M. Kuchling [Tue, 4 Sep 2001 20:42:08 +0000 (20:42 +0000)]
[Bug #444589] Record empty directories in the install_data command
Slightly modified version of patch from Jon Nelson (jnelson).
Andrew M. Kuchling [Tue, 4 Sep 2001 20:06:43 +0000 (20:06 +0000)]
[Bug #436732] install.py does not record a created *.pth file in the
INSTALLED_FILES output. Modified version of a patch from
Jon Nelson (jnelson)
Tim Peters [Tue, 4 Sep 2001 19:48:01 +0000 (19:48 +0000)]
Revert one of the "division fixes" in test_long. It intends to try both
"/" and "//", and doesn't really care what they *mean*, just that both
are tried (and that, whatever they mean, they act similarly for int and
long arguments).
Fred Drake [Tue, 4 Sep 2001 19:43:26 +0000 (19:43 +0000)]
Make pprint more locale-friendly; patch contributed by Denis S. Otkidach.
This closes SF patch #451538.
Andrew M. Kuchling [Tue, 4 Sep 2001 19:34:32 +0000 (19:34 +0000)]
[Bug #457654] bkgd() used a hard-coded A_NORMAL attribute, when it should
have used the attribute argument provided as a parameter
Fred Drake [Tue, 4 Sep 2001 19:20:06 +0000 (19:20 +0000)]
Convert docstring to "raw" string.
Guido van Rossum [Tue, 4 Sep 2001 19:14:14 +0000 (19:14 +0000)]
The first batch of changes recommended by the fixdiv tool. These are
mostly changes of / operators into //. Once or twice I did more or
less than recommended.
Fred Drake [Tue, 4 Sep 2001 19:10:20 +0000 (19:10 +0000)]
Added docstrings by Neal Norwitz. This closes SF bug #450980.
Neil Schemenauer [Tue, 4 Sep 2001 19:03:35 +0000 (19:03 +0000)]
Move call_trace(..., PyTrace_CALL, ...) call to top of eval_frame. That
way it's called each time a generator is resumed. The tracing of normal
functions should be unaffected by this change.
Fred Drake [Tue, 4 Sep 2001 18:55:03 +0000 (18:55 +0000)]
Added docstring by Neal Norwitz. This closes SF bug #450981.
Fred Drake [Tue, 4 Sep 2001 18:39:45 +0000 (18:39 +0000)]
Added docstring by Neal Norwitz. This closes SF bug #450979.
Fred Drake [Tue, 4 Sep 2001 18:26:27 +0000 (18:26 +0000)]
Add more detail to the descriptions of the shutil functions.
This closes SF bug #458223.
Fred Drake [Tue, 4 Sep 2001 18:18:36 +0000 (18:18 +0000)]
Added documentation for sys.maxunicode and sys.warnoptions.
Fixed a markup error which caused an em dash to be presented as a minus sign.
This closes SF bug #458350.
Fred Drake [Tue, 4 Sep 2001 16:26:03 +0000 (16:26 +0000)]
HTMLParser is allowed to be more strict than sgmllib, so let's not
change their basic behavior: When parsing something that cannot possibly
be valid in either HTML or XHTML, raise an exception.
Guido van Rossum [Tue, 4 Sep 2001 16:22:01 +0000 (16:22 +0000)]
- Reverse the meaning of the -m option: warnings about multiple /
operators per line or statement are now on by default, and -m turns
these warnings off.
- Change the way multiple / operators are reported; a regular
recommendation is always emitted after the warning.
- Report ambiguous warnings (both int|long and float|complex used for
the same operator).
- Update the doc string again to clarify all this and describe the
possible messages more precisely.
Guido van Rossum [Tue, 4 Sep 2001 15:22:02 +0000 (15:22 +0000)]
Suppressing all DeprecationWarning messages was a bit of a problem for
the -Qwarnall option, so I've changed this to only filter out the one
warning that's a problem in practice.
Guido van Rossum [Tue, 4 Sep 2001 15:18:54 +0000 (15:18 +0000)]
Suppress the warning about regex here.
Fred Drake [Tue, 4 Sep 2001 15:13:04 +0000 (15:13 +0000)]
Enhanced the test for DOCTYPE declarations, added a test for dealing with
broken declaration-like things.
Fred Drake [Tue, 4 Sep 2001 15:10:16 +0000 (15:10 +0000)]
Added reasonable parsing of the DOCTYPE declaration, fixed edge cases
regarding bare ampersands in content.
Jack Jansen [Tue, 4 Sep 2001 12:01:49 +0000 (12:01 +0000)]
On the mac some library paths returned were outdated, some were outright funny.
Fixed.
Jack Jansen [Tue, 4 Sep 2001 09:05:11 +0000 (09:05 +0000)]
Disabled _curses modules on MacOSX. The curses version is a 1994 BSD
curses, far too old for _cursesmodule.c.
Tim Peters [Tue, 4 Sep 2001 06:37:28 +0000 (06:37 +0000)]
Whitespace normalization.
Tim Peters [Tue, 4 Sep 2001 06:33:00 +0000 (06:33 +0000)]
Fixed a typo and added more tests.
Tim Peters [Tue, 4 Sep 2001 06:17:36 +0000 (06:17 +0000)]
Change long/long true division to return as many good bits as it can;
e.g., (1L << 40000)/(1L << 40001) returns 0.5, not Inf or NaN or whatever.
Tim Peters [Tue, 4 Sep 2001 05:52:47 +0000 (05:52 +0000)]
Move int_true_divide next to the other division routines.
Tim Peters [Tue, 4 Sep 2001 05:31:47 +0000 (05:31 +0000)]
Move long_true_divide next to the other division routines (for clarity!).
Tim Peters [Tue, 4 Sep 2001 05:14:19 +0000 (05:14 +0000)]
Raise OverflowError when appropriate on long->float conversion. Most of
the fiddling is simply due to that no caller of PyLong_AsDouble ever
checked for failure (so that's fixing old bugs). PyLong_AsDouble is much
faster for big inputs now too, but that's more of a happy consequence
than a design goal.
Guido van Rossum [Tue, 4 Sep 2001 03:51:09 +0000 (03:51 +0000)]
PEP 238 documented -Qwarn as warning only for classic int or long
division, and this makes sense. Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
Guido van Rossum [Tue, 4 Sep 2001 03:26:15 +0000 (03:26 +0000)]
Rename the -D option to -Q, to avoid a Jython option name conflict.
Tim Peters [Tue, 4 Sep 2001 02:50:49 +0000 (02:50 +0000)]
Introduce new private API function _PyLong_AsScaledDouble. Not used yet,
but will be the foundation for Good Things:
+ Speed PyLong_AsDouble.
+ Give PyLong_AsDouble the ability to detect overflow.
+ Make true division of long/long nearly as accurate as possible (no
spurious infinities or NaNs).
+ Return non-insane results from math.log and math.log10 when passing a
long that can't be approximated by a double better than HUGE_VAL.
Tim Peters [Tue, 4 Sep 2001 01:20:04 +0000 (01:20 +0000)]
builtin_dir(): Treat classic classes like types. Use PyDict_Keys instead
of PyMapping_Keys because we know we have a real dict. Tolerate that
objects may have an attr named "__dict__" that's not a dict (Py_None
popped up during testing).
test_descr.py, test_dir(): Test the new classic-class behavior; beef up
the new-style class test similarly.
test_pyclbr.py, checkModule(): dir(C) is no longer a synonym for
C.__dict__.keys() when C is a classic class (looks like the same thing
that burned distutils! -- should it be *made* a synoym again? Then it
would be inconsistent with new-style class behavior.).
Neil Schemenauer [Mon, 3 Sep 2001 15:47:21 +0000 (15:47 +0000)]
Don't use dir() to find instance attribute names.
Neil Schemenauer [Mon, 3 Sep 2001 15:44:48 +0000 (15:44 +0000)]
Fix the names of _PyObject_GC_TRACK and _PyObject_GC_UNTRACK when the GC is
disabled. Obviously everyone enables the GC. :-)
Tim Peters [Mon, 3 Sep 2001 08:44:02 +0000 (08:44 +0000)]
Restore a line deleted by mistake.
Tim Peters [Mon, 3 Sep 2001 08:35:41 +0000 (08:35 +0000)]
New restriction on pow(x, y, z): If z is not None, x and y must be of
integer types, and y must be >= 0. See discussion at
http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470
Tim Peters [Mon, 3 Sep 2001 05:47:38 +0000 (05:47 +0000)]
Make dir() wordier (see the new docstring). The new behavior is a mixed
bag. It's clearly wrong for classic classes, at heart because a classic
class doesn't have a __class__ attribute, and I'm unclear on whether
that's feature or bug. I'll repair this once I find out (in the
meantime, dir() applied to classic classes won't find the base classes,
while dir() applied to a classic-class instance *will* find the base
classes but not *their* base classes).
Please give the new dir() a try and see whether you love it or hate it.
The new dir([]) behavior is something I could come to love. Here's
something to hate:
>>> class C:
... pass
...
>>> c = C()
>>> dir(c)
['__doc__', '__module__']
>>>
The idea that an instance has a __doc__ attribute is jarring (of course
it's really c.__class__.__doc__ == C.__doc__; likewise for __module__).
OTOH, the code already has too many special cases, and dir(x) doesn't
have a compelling or clear purpose when x isn't a module.
Tim Peters [Mon, 3 Sep 2001 01:24:30 +0000 (01:24 +0000)]
Made a doctest out of the examples in Guido's type/class tutorial.
Tim Peters [Sun, 2 Sep 2001 23:01:43 +0000 (23:01 +0000)]
Clarify the Borland situation, based on email from Stephen.
Tim Peters [Sun, 2 Sep 2001 18:35:54 +0000 (18:35 +0000)]
Repair typo in comment.
Jack Jansen [Sun, 2 Sep 2001 14:48:32 +0000 (14:48 +0000)]
Added the last few missing files, and put everything in the right packages.
Tested, too:-)
Guido van Rossum [Sun, 2 Sep 2001 14:11:30 +0000 (14:11 +0000)]
Implement what the docstring said: multiple slashes per line are
treated the same as single ones by default. Added -m option to issue
a warning for this case instead.
Guido van Rossum [Sun, 2 Sep 2001 13:44:35 +0000 (13:44 +0000)]
Add news about dictionary() constructor.
Tim Peters [Sun, 2 Sep 2001 08:22:48 +0000 (08:22 +0000)]
Make dictionary() a real constructor. Accepts at most one argument, "a
mapping object", in the same sense dict.update(x) requires of x (that x
has a keys() method and a getitem).
Questionable: The other type constructors accept a keyword argument, so I
did that here too (e.g., dictionary(mapping={1:2}) works). But type_call
doesn't pass the keyword args to the tp_new slot (it passes NULL), it only
passes them to the tp_init slot, so getting at them required adding a
tp_init slot to dicts. Looks like that makes the normal case (i.e., no
args at all) a little slower (the time it takes to call dict.tp_init and
have it figure out there's nothing to do).
Tim Peters [Sun, 2 Sep 2001 06:42:25 +0000 (06:42 +0000)]
Rewrite the tuple() docstring to parallel the list() docstring.
Tim Peters [Sun, 2 Sep 2001 06:29:48 +0000 (06:29 +0000)]
Repair apparent cut'n'pasteo in tuple() docstring.
Fred Drake [Sun, 2 Sep 2001 06:07:36 +0000 (06:07 +0000)]
Move the long minidom example to a separate file; \verbatiminput does the
right thing with page breaks in long examples, while the verbatim
environment does not. This causes the example to wrap to the next page
instead of overwriting the page footer and bottom margin.
Guido van Rossum [Sun, 2 Sep 2001 05:07:17 +0000 (05:07 +0000)]
An anonymous contributor reveals his name...
Guido van Rossum [Sun, 2 Sep 2001 04:49:36 +0000 (04:49 +0000)]
Added more text to the docstring, updated the way the exit status is
percolated out, and some general cleanup. The output is still the
same, except it now prints "Index: <file>" instead of "Processing:
<file>", so that the output can be used as input for patch (but only
the diff-style parts of it).
Guido van Rossum [Sun, 2 Sep 2001 04:43:30 +0000 (04:43 +0000)]
A grep-like tool that looks for division operators.
Guido van Rossum [Sun, 2 Sep 2001 03:58:41 +0000 (03:58 +0000)]
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Tim Peters [Sun, 2 Sep 2001 03:40:59 +0000 (03:40 +0000)]
Start items w/ "-" instead of "+" (consistency w/ earlier versions).
Stephen Hansen reported via email that he didn't finish the port to
Borland C, so remove the old item saying it worked and add a new item
saying what I know; I've asked Stephen for more details.
Jack Jansen [Sun, 2 Sep 2001 00:09:35 +0000 (00:09 +0000)]
Silly typos.