Fred Drake [Tue, 18 Jun 2002 15:21:21 +0000 (15:21 +0000)]
SF patch #552837, submitted by Robert Pyron:
1. BUGFIX: In function makefile(), strip blanks from the nodename.
This is necesary to match the behavior of parser.makeref() and
parser.do_node().
2. BUGFIX fixed KeyError in end_ifset (well, I may have just made
it go away, rather than fix it)
3. BUGFIX allow @menu and menu items inside @ifset or @ifclear
4. Support added for:
@uref URL reference
@image image file reference (see note below)
@multitable output an HTML table
@vtable
5. Partial support for accents, to match MAKEINFO output
6. I added a new command-line option, '-H basename', to specify
HTML Help output. This will cause three files to be created
in the current directory:
`basename`.hhp HTML Help Workshop project file
`basename`.hhc Contents file for the project
`basename`.hhk Index file for the project
When fed into HTML Help Workshop, the resulting file will be
named `basename`.chm.
7. A new class, HTMLHelp, to accomplish item 6.
8. Various calls to HTMLHelp functions.
A NOTE ON IMAGES: Just as 'outputdirectory' must exist before
running this program, all referenced images must already exist
in outputdirectory.
Fred Drake [Mon, 17 Jun 2002 15:01:05 +0000 (15:01 +0000)]
Ensure \verbatiminput always uses a unique filename for each input file in
the "Download as text" link. Previously, it could map multiple source files
to a single name since all files end up with the same extension.
This closes SF bug #558279.
Walter Dörwald [Mon, 17 Jun 2002 10:43:59 +0000 (10:43 +0000)]
Apply diff2.txt from SF patch http://www.python.org/sf/566999
This patch enhances Python/import.c/find_module() so
that unicode objects found in sys.path will be treated
as legal directory names (The current code ignores
anything that is not a str). The unicode name is
converted to str using Py_FileSystemDefaultEncoding.
Kurt B. Kaiser [Sun, 16 Jun 2002 03:32:24 +0000 (03:32 +0000)]
Polish RemoteDebugger code.
Use a repr() on the subprocess side when fetching dict values for stack.
The various dict entities are not needed by the debugger GUI, only
their representation.
Tim Peters [Sat, 15 Jun 2002 05:14:05 +0000 (05:14 +0000)]
test_module_with_large_stack(): This failed when Python was run with -O,
trying to delete a .pyc file that didn't exist (it needed to delete .pyo
then).
Guido van Rossum [Fri, 14 Jun 2002 20:41:17 +0000 (20:41 +0000)]
SF patch 568629 by Oren Tirosh: types made callable.
These built-in functions are replaced by their (now callable) type:
slice()
buffer()
and these types can also be called (but have no built-in named
function named after them)
classobj (type name used to be "class")
code
function
instance
instancemethod (type name used to be "instance method")
The module "new" has been replaced with a small backward compatibility
placeholder in Python.
A large portion of the patch simply removes the new module from
various platform-specific build recipes. The following binary Mac
project files still have references to it:
Skip Montanaro [Fri, 14 Jun 2002 20:30:31 +0000 (20:30 +0000)]
This introduces stricter library/header file checking for the Berkeley DB
library. Since multiple versions can be installed simultaneously, it's
crucial that you only select libraries and header files which are compatible
with each other. Version checking is done from highest version to lowest.
Building using version 1 of Berkeley DB is disabled by default because of
the hash file bugs people keep rediscovering. It can be enabled by
uncommenting a few lines in setup.py. Closes patch 553108.
Fred Drake [Fri, 14 Jun 2002 14:35:56 +0000 (14:35 +0000)]
Clean up descriptions of PyObject_RichCompare() and PyObject_RichCompareBool()
based on comments from David Abrahams.
Added refcount information for these functions.
Guido van Rossum [Fri, 14 Jun 2002 02:27:07 +0000 (02:27 +0000)]
Inexplicably, recurse_down_subclasses() was comparing the object
gotten from a weak reference to NULL instead of to None. This caused
the following assert() to fail (but only in 2.2 in the debug build --
I have to find a better test case). Will backport.
Neal Norwitz [Fri, 14 Jun 2002 00:27:13 +0000 (00:27 +0000)]
Use \code{True} (or False) instead of true/false.
Not sure if code is correct, but that is what's in this file.
I've seen \constant{True} in other places.
Guido van Rossum [Thu, 13 Jun 2002 21:42:04 +0000 (21:42 +0000)]
Major cleanup operation: whenever there's a call that looks for an
optional attribute, only clear the exception when the internal getattr
operation raised AttributeError. Many places in this file already had
that policy; but just as many didn't, and there didn't seem to be any
rhyme or reason to it. Be consistently cautious.
Question: should I backport this? On the one hand it's a bugfix. On
the other hand it's a change in behavior. Certain forms of buggy or
just weird code would work in the past but raise an exception under
the new rules; e.g. if you define a __getattr__ method that raises a
non-AttributeError exception.
Guido van Rossum [Thu, 13 Jun 2002 21:32:51 +0000 (21:32 +0000)]
Fix for SF bug 532646. This is a little simpler than what Neal
suggested there, based upon a better analysis (__getattr__ is a red
herring). Will backport to 2.2.
Guido van Rossum [Thu, 13 Jun 2002 20:24:17 +0000 (20:24 +0000)]
Temporarily disable the timeout and socket tests.
They still run as standalone scripts, but when used as part of the
regression test suite, they are effectively no-ops.
(This is done by renaming test_main to main.)
Guido van Rossum [Thu, 13 Jun 2002 19:17:46 +0000 (19:17 +0000)]
Hopefully this addresses the remaining issues of SF bugs 459235 and
473985. Through a subtle rearrangement of some members in the etype
struct (!), mapping methods are now preferred over sequence methods,
which is necessary to support str.__getitem__("hello", slice(4)) etc.
Jeremy Hylton [Thu, 13 Jun 2002 17:28:18 +0000 (17:28 +0000)]
Refactor compile() method implementations.
Always use _setup_compile() to do the grunt work of processing
arguments, figuring out which files to compile, and emitting debug
messages for files that are up-to-date.
Jeremy Hylton [Thu, 13 Jun 2002 17:26:30 +0000 (17:26 +0000)]
Extend compiler() method with optional depends argument.
This change is not backwards compatible. If a compiler subclass
exists outside the distutils package, it may get called with the
unexpected keyword arg. It's easy to extend that compiler by having
it ignore the argument, and not much harder to do the right thing. If
this ends up being burdensome, we can change it before 2.3 final to
work harder at compatibility.
Also add _setup_compile() and _get_cc_args() helper functions that
factor out much of the boilerplate for each concrete compiler class.
Guido van Rossum [Thu, 13 Jun 2002 16:07:04 +0000 (16:07 +0000)]
Fix non-blocking connect() for Windows. Refactored the code
that retries the connect() call in timeout mode so it can be shared
between connect() and connect_ex(), and needs only a single #ifdef.
The test for this was doing funky stuff I don't approve of,
so I removed it in favor of a simpler test. This allowed me
to implement a simpler, "purer" form of the timeout retry code.
Hopefully that's enough (if you want to be fancy, use non-blocking
mode and decode the errors yourself, like before).
Jeremy Hylton [Thu, 13 Jun 2002 15:14:10 +0000 (15:14 +0000)]
More style changes and little cleanups.
Remove __init__ that just called base class __init__ with same args.
Fold long argument lists into fewer, shorter lines.
Remove parens in tuple unpacks.
Don't put multiple statements on one line with a semicolon.
In find_library_file() compute the library_filename() upfront.
Guido van Rossum [Thu, 13 Jun 2002 15:07:44 +0000 (15:07 +0000)]
Major overhaul of timeout sockets:
- setblocking(0) and settimeout(0) are now equivalent, and ditto for
setblocking(1) and settimeout(None).
- Don't raise an exception from internal_select(); let the final call
report the error (this means you will get an EAGAIN error instead of
an ETIMEDOUT error -- I don't care).
- Move the select to inside the Py_{BEGIN,END}_ALLOW_THREADS brackets,
so other theads can run (this was a bug in the original code).
- Redid the retry logic in connect() and connect_ex() to avoid masking
errors. This probably doesn't work for Windows yet; I'll fix that
next. It may also fail on other platforms, depending on what
retrying a connect does; I need help with this.
- Get rid of the retry logic in accept(). I don't think it was needed
at all. But I may be wrong.
Guido van Rossum [Wed, 12 Jun 2002 19:57:18 +0000 (19:57 +0000)]
Add some more basic tests to validate the argument checking of
settimeout(), test settimeout(None), and the interaction between
settimeout() and setblocking().
Guido van Rossum [Wed, 12 Jun 2002 03:45:21 +0000 (03:45 +0000)]
SF bug 567538: Generator can crash the interpreter (Finn Bock).
This was a simple typo. Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(