Fred Drake [Sat, 3 Mar 2001 19:41:55 +0000 (19:41 +0000)]
Be a bit more strict in setting up the export of the C API for this
module; do not attempt to insert the API object into the module dict
if there was an error creating it.
Fred Drake [Sat, 3 Mar 2001 18:08:52 +0000 (18:08 +0000)]
Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
some fairly recent versions have an anaemic selection of terminal-control
symbols.
Barry Warsaw [Sat, 3 Mar 2001 04:14:21 +0000 (04:14 +0000)]
Added `memtest' target which excludes the quicktest modules plus
test_dl, test___all__, test_fork1, and test_longexp. All these either
take way too long with Insure or crash it.
Fred Drake [Fri, 2 Mar 2001 21:05:58 +0000 (21:05 +0000)]
Revise the scripts I use to update the documentation on the SourceForge
site. These now seem (slightly) more reliable, and easier to work with
since update-docs.sh no longer needs to be installed ahead of time on
my account at SF.
Fred Drake [Fri, 2 Mar 2001 18:15:11 +0000 (18:15 +0000)]
There is no longer a -X option to the interpreter, so remove the comments
on how PyErr_NewException() behaves in that case.
Clarify why an owned reference is kept in an extension module's
variable that refers to the result of PyErr_NewException(); one reader
thought that was a leak.
Jack Jansen [Fri, 2 Mar 2001 16:32:03 +0000 (16:32 +0000)]
Enable FSpResourceFileAlreadyOpen only for Carbon. This is not strictly correct: OS9 InterfaceLib has it, but enabling it will make Python refuse to run on 8.6 and earlier.
Fred Drake [Fri, 2 Mar 2001 16:26:45 +0000 (16:26 +0000)]
Job.build_html(): When formatting HTML into more than one HTML page, and
not doing the \label{foo} --> foo.html transformation (--numeric was
specified on the command line), still look to see if there is an
"About this document..." node and copy that to "about.html", since the
page footers use that as the target.
Fred Drake [Fri, 2 Mar 2001 07:28:03 +0000 (07:28 +0000)]
When not copying a file because the output is up to date, make the message
slightly more brief, and more like the message that an extension will not
be built because the built copy is up to date.
UNIX style fork/execve/wait are not fully compatible with thread
support on BeOS. For Python, that means neither fork() from import
nor import from a fork work reliably. os._execvpe() does the latter,
importing tempfile to set up a tantalizing target for hackers. This
patch replaces both the tempfile name generation and the exec that
uses it, in case we're on BeOS. Need this for
setup:distutils:execvp(); symptoms are random crashes and internal
BeOS error messages about th name, in case we're on BeOS. It's an
issue because setup.py + distutils calls os.execvp(); symptoms are
random crashes during setup.py, and internal BeOS error messages
about thread IDs.
Ka-Ping Yee [Fri, 2 Mar 2001 05:50:34 +0000 (05:50 +0000)]
Make getsourcefile() succeed even if the filename doesn't end in '.py' --
as long as the filename also doesn't end in a suffix that indicates
a binary file (according to the flags in imp.get_suffixes()).
Shrink try...except clauses and replace some of them with explicit checks.
Believe it or not, but "more" on Windows requires "more <file" rather
than "more file". Since tempfilepager() is only used on Windows, it
seems, do this unconditionally -- on Unix, it always invokes something
else.
Made sure that the warnings issued by symtable_check_unoptimized()
(about import * and exec) contain the proper filename and line number,
and are transformed into SyntaxError exceptions with -Werror.
Jeremy Hylton [Thu, 1 Mar 2001 22:59:14 +0000 (22:59 +0000)]
Useful future statement support for the interactive interpreter
(Also remove warning about module-level global decl, because we can't
distinguish from code passed to exec.)
Define PyCompilerFlags type contains a single element,
cf_nested_scopes, that is true if a nested scopes future statement has
been entered at the interactive prompt.
New API functions:
PyNode_CompileFlags()
PyRun_InteractiveOneFlags()
-- same as their non Flags counterparts except that the take an
optional PyCompilerFlags pointer
compile.c: In jcompile() use PyCompilerFlags argument. If
cf_nested_scopes is true, compile code with nested scopes. If it
is false, but the code has a valid future nested scopes statement,
set it to true.
pythonrun.c: Create a new PyCompilerFlags object in
PyRun_InteractiveLoop() and thread it through to
PyRun_InteractiveOneFlags().
Fred Drake [Thu, 1 Mar 2001 21:54:49 +0000 (21:54 +0000)]
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
defined and export both names.
Solaris also does not define CBAUDEX; it is not clear that CBAUDEXT
(which is defined there) is the same thing, so we only protect against
the lack of CBAUDEX.
Fred Drake [Thu, 1 Mar 2001 18:37:52 +0000 (18:37 +0000)]
Comment out section titles for sections that have not been written yet;
there is no need to clutter a reader's life with those useless things.
Suppress the "Contents" page for HTML; it is not needed for small documents
in the online environment since LaTeX2HTML generates lots of tables of links
anyway.
Fred Drake [Thu, 1 Mar 2001 18:35:43 +0000 (18:35 +0000)]
Comment out section titles for sections that have not been written yet;
there is no need to clutter a reader's life with those useless things.
Make the snippets of Python code conform to the standard style.
Suppress the "Contents" page for HTML; it is not needed for small documents
in the online environment since LaTeX2HTML generates lots of tables of links
anyway.
- In _portable_ftell(), try fgetpos() before ftello() and ftell64().
I ran into a situation on a 64-bit capable Linux where the C
library's ftello() and ftell64() returned negative numbers despite
fpos_t and off_t both being 64-bit types; fgetpos() did the right
thing.
- Define a new typedef, Py_off_t, which is either fpos_t or off_t,
depending on which one is 64 bits. This removes the need for a lot
of #ifdefs later on. (XXX Should this be moved to pyport.h? That
file currently seems oblivious to large fille support, so for now
I'll leave it here where it's needed.)
Tim Peters [Thu, 1 Mar 2001 18:12:00 +0000 (18:12 +0000)]
More MacOSX fiddling. As noted in a comment, I believe all variations
of these "search the directory" schemes (including this one) are still prone
to making mistakes.
Ka-Ping Yee [Thu, 1 Mar 2001 13:55:20 +0000 (13:55 +0000)]
Docstring improvements.
Add checks for .pyo and .pyd.
Collapse docfunction, docmethod, docbuiltin into the one method docroutine.
Small formatting fixes.
Link the segments of a package path in the title.
Link to the source file only if it exists.
Allow modules (e.g. repr.py) to take precedence over built-ins (e.g. repr()).
Add interruptible synopsis scanner (so we can do searches in the background).
Make HTTP server quit.
Add small GUI for controlling the server and launching searches (like -k).
(Tested on Win2k, Win98, and Linux.)
Moshe Zadka [Thu, 1 Mar 2001 08:40:42 +0000 (08:40 +0000)]
Checking in patch 404826 -- urllib2 enhancements and documentations.
(please not that the library reference does *not* include the
urllib2 documnetation -- that will wiat for Fred)
Fred Drake [Thu, 1 Mar 2001 06:33:32 +0000 (06:33 +0000)]
Suppress a compiler warning under OpenVMS; time_t is unsigned on (at least)
the more recent versions of that platform, so we use the value (time_t)(-1)
as the error value. This is the type used in the OpenVMS documentation: