Tim Peters [Thu, 5 Oct 2000 01:42:25 +0000 (01:42 +0000)]
Move LONG_BIT from intobject.c to pyport.h. #error if it's already been
#define'd to an unreasonable value (several recent gcc systems have
misdefined it, causing bogus overflows in integer multiplication). Nuke
CHAR_BIT entirely.
Trent Mick [Wed, 4 Oct 2000 20:57:29 +0000 (20:57 +0000)]
Enable the binascii module for Win64. It builds and passes the test suite.
(I had explicitly disabled it a while ago, possibly unecessarily, along with
rgbimg, audioop, and imageop, which are advertised as "not for 64-bit
platforms.)
Trent Mick [Wed, 4 Oct 2000 17:50:59 +0000 (17:50 +0000)]
Fix for test_class.py on Win64. id(self), which on Win64 returns a
PyLong, was used for the return value of a class __hash__ method, which
*must* return a PyInt. Solution: hash() the id(self) value.
Fred Drake [Wed, 4 Oct 2000 13:57:27 +0000 (13:57 +0000)]
Added \versionchanged comment to os.popen() noting that it was unreliable
in earlier versions of Python; this is useful information for people
interested in writing code that is portable across Python versions.
Fred Drake [Wed, 4 Oct 2000 13:39:24 +0000 (13:39 +0000)]
Remove styling information that conflicts with or duplicates the stylesheet;
different browsers resolve the conflicts differently, and the "proper"
resolution is not what we actually want.
Barry Warsaw [Tue, 3 Oct 2000 20:45:26 +0000 (20:45 +0000)]
_PyUnicode_Fini(): Initialize the local freelist walking variable `u'
after unicode_empty has been freed, otherwise it might not point to
the real start of the unicode_freelist. Final closure for SF bug
#110681, Jitterbug PR#398.
Thomas Wouters [Tue, 3 Oct 2000 16:51:08 +0000 (16:51 +0000)]
On some systems (like Solaris), the master end of a tty/pty pair is
apparently not considered a terminal, and so isatty(3) returns false. So we
skip the test for ttyness of the master side and just check the slave side,
which should really be a terminal.
Barry Warsaw [Tue, 3 Oct 2000 16:02:05 +0000 (16:02 +0000)]
_PyImport_Fini(): Closed small memory leak when an embedded app calls
Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to
be deallocated. Partial closure of SF #110681, Jitterbug PR#398.
CGI scripts should *not* use /usr/bin/env, since on systems that don't
come standard with Python installed, Python isn't on the default $PATH.
Too bad that this breaks on Linux, where Python is in /usr/bin which
is on the default path -- the point is that you must manually edit
your CGI scripts when you install them.
Fred Drake [Tue, 3 Oct 2000 06:05:25 +0000 (06:05 +0000)]
$OFF_SITE_LINK_ICON: Don't define here; simply defining it overrides a
definition provided by previously loaded configuration code, and
testing whether it's defined isn't needed since the default was
false anyway.
get_link_icon(): Add support for $OFF_SITE_LINK_ICON_HEIGHT and
$OFF_SITE_LINK_ICON_WIDTH, giving the dimensions of the icon
being used. This can make for faster page display. Both are
optional.
make_my_titlegraphic(): Fix insertion of the off-site icon link.
do_env_funcdesc(): Remove debugging print.
handle_rfclike_reference(): Remove trailing colon from first line; it
doesn't really make sense and looks bad if we add an icon to
mark off-site links.
Fred Drake [Tue, 3 Oct 2000 05:56:55 +0000 (05:56 +0000)]
Replace minimal \seetext references with better annotated \seerfc
references, telling the reader more about what to expect at the other end
of the links.
Greg Ward [Tue, 3 Oct 2000 03:31:05 +0000 (03:31 +0000)]
Added a long-winded comment (and commented-out comment to go with out)
about how it would be nice to write absolute paths to the temporary
byte-compilation script, but this doesn't work because it screws up the
trailing-slash trickery done to 'prefix' in build_py's 'byte_compile()'
method.
Fixed to use 'execute()' instead of 'os.remove()' to remove the temporary
script: now it doesn't blow up in dry-run mode!
Fred Drake [Mon, 2 Oct 2000 21:20:22 +0000 (21:20 +0000)]
Remove comment about -lucb for the mmap module -- the module has been
changed so that this is no longer needed on the only platform this is
known to have been needed on.
Supporting rl_library_version is more trouble than it's worth --
readline doesn't have it before readline 2.2 and there's no
compile-time way to find out which readline version is in use.
Fred Drake [Mon, 2 Oct 2000 14:43:38 +0000 (14:43 +0000)]
make_icon_filename(): Convenience function to turn a partial filename
into a usable filename using $ICONSERVER and
$IMAGE_TYPE as needed.
get_link_icon(): Function to examine a URL and return the string to use
to insert an icon if the link points off-site, if needed
and $OFF_SITE_LINK_ICON is set.
Adjusted appropriate places to use these new functions.
Fix a bug in stack overflow error handling. This fixes half of Bug
#115555.
The error from s_push() on stack overflow was -1, which was passed
through unchanged by push(), but not tested for by push()'s caller --
which only expected positive error codes. Fixed by changing s_push()
to return E_NOMEM on stack overflow. (Not quite the proper error code
either, but I can't be bothered adding a new E_STACKOVERFLOW error
code in all the right places.)
Fred Drake [Mon, 2 Oct 2000 03:40:51 +0000 (03:40 +0000)]
Do not set Konquerer to be the default browser if $KDEDIR is set -- some
Linux distributions which provide both KDE and Gnome set this environment
variable even if the user is not using KDE. We do *not* want to start
Konquerer if KDE is not running unless the user actually tells us to!
Greg Ward [Mon, 2 Oct 2000 02:19:04 +0000 (02:19 +0000)]
Added the ability to do byte-compilation at build time, currently off
by default (since compiling at install time works just fine). Details:
- added 'compile' and 'optimize' options
- added 'byte_compile()' method
- changed 'get_outputs()' so it includes bytecode files
A lot of the code added is very similar to code in install_lib.py;
would be nice to factor it out further.
Greg Ward [Mon, 2 Oct 2000 02:15:08 +0000 (02:15 +0000)]
Finished the overhaul of byte-compilation options: there's now a 6-way
choice between (compile, no-compile) * (optimize=0, optimize=1,
optimize=2). Details:
- added --no-compile option to complement --compile, which has
been there for ages
- changed --optimize (which never worked) to a value option, which
expects 0, 1, or 2
- renamed 'bytecompile()' method to 'byte_compile()', and beefed
it up to handle both 'compile' and 'optimize' options
- fix '_bytecode_filenames()' to respect the new options
Fred Drake [Sun, 1 Oct 2000 17:50:46 +0000 (17:50 +0000)]
my_getpagesize(): New function; returns the size of a page of memory.
Versions are defined for Windows and Unix; the Unix
flavor uses sysconf() to get the page size; this avoids
the use of getpagesize(), which is deprecated and
requires an additional library on some platforms
(specifically, Reliant UNIX).
Reduced the 'bytecompile()' method to a one-line wrapper around
'util.byte_compile()'. Currently just reproduces the existing functionality
-- doesn't use any of the fancy features in the new 'byte_compile()'.
Added 'byte_compile(): an all-singing, all-dancing wrapper around the
standard 'py_compile.compile()' function. Laundry list of features:
- handles standard Distutils 'force', 'verbose', 'dry_run' flags
- handles various levels of optimization: can compile directly in
this interpreter process, or write a temporary script that is
then executed by a new interpreter with the appropriate flags
- can rewrite the source filename by stripping an optional prefix
and preprending an optional base dir.
Various docstring tweaks.
Fixed 'subst_vars()' so it actually blows up like the docstring claims
(and fixed the docstring not to claim it handles ${var}, which it
doesn't).
Changed to use the 'sub-commands' machinery:
- added 'sub_commands' class attr
- added 'has_*()' predicates referenced by the sub-command list
- rewrote 'run()' so it's a trivial loop over relevant sub-commands
Fred Drake [Fri, 29 Sep 2000 17:45:05 +0000 (17:45 +0000)]
Add a paragraph about an optimization bug in SGI compilers which affects
complex objects, and explain how to build so that Objects/complexobject.c
is compiled without optimization.
Fred Drake [Fri, 29 Sep 2000 15:17:36 +0000 (15:17 +0000)]
Spelling: internalization --> internationalization
Fixed displays of the interactive prompt in running text.
These close SourceForge bug #115658.
Also:
Updated discussion of tuple unpacking to reflect the general ability
to unpack any sequence type. Explained that it is possible to create
tuples which contain mutable values, and noted in the dictionary
section that such tuples cannot be used as keys.
Noted that .pyc and .pyo files can be run directly when provided as
the script parameter to the interpreter, and slightly clarified
comments about using modules with only the byte compiled code.
Removed some XXX comments that are no longer relevant.
Removed commented-out paragraph about __private names being experimental.
Thomas Heller [Fri, 29 Sep 2000 11:36:55 +0000 (11:36 +0000)]
Removed the extra_dirs and path_file metadata options.
They are unneeded: All this stuff is already done by the
install command which is run by bdist_wininst.
One bug has been fixed:
The root of the fake install tree is install.install_purelib,
not install.install_lib!
They are different if the extra_path option is used in
the setup function.
Tim Peters [Fri, 29 Sep 2000 04:03:10 +0000 (04:03 +0000)]
The 2.0b2 change to write .pyc files in exclusive mode (if possible)
unintentionally caused them to get written in text mode under Windows.
As a result, when .pyc files were later read-- in binary mode --the
magic number was always wrong (note that .pyc magic numbers deliberately
include \r and \n characters, so this was "good" breakage, 100% across
all .pyc files, not random corruption in a subset). Fixed that.