sys.setdefaultencoding() should only be called in case the standard
default encoding ("ascii") is changed. This safes quite a few cycles
during startup since the first call to .setdefaultencoding() will
initialize the codec registry and the encodings package.
See python-dev for a discussion (Subject: "[Python-Dev] [comp.lang.python] sys.setdefaultencoding (2.0b1)").
Fred Drake [Sun, 17 Sep 2000 16:09:27 +0000 (16:09 +0000)]
Add invert() and __invert__() as aliases for inv()/__inv__().
Add contains() as alias for __contains__().
Make PyArg_ParseTuple() formats include the function name.
Based on patch by Denis S. Otkidach <ods@users.sourceforge.net>,
this closes SourceForge patch #101390.
Tim Peters [Sun, 17 Sep 2000 14:40:17 +0000 (14:40 +0000)]
Fix for SF bug 110688: Instance deallocation neglected to account for
that Py_INCREF boosts global _Py_RefTotal when Py_REF_DEBUG is defined
but Py_TRACE_REFS isn't.
There are, IMO, way too many preprocessor gimmicks in use for refcount
debugging (at least 3 distinct true/false symbols, but not all 8 combos
are supported by the code, etc etc), and no coherent documentation of
this stuff -- 'twas too painful to track this one down.
Added 'expand_makefile_vars()' to (duh) expand make-style variables
in a string (gives you something to do with the dictionary returned
by 'parse_makefile()').
Pulled the regexes in 'parse_makefile()' out -- they're now globals,
as 'expand_makefile_vars()' needs (two of) them.
Cosmetic tweaks to 'parse_makefile()'.
Added 'read_setup_file()' to read old-style Setup files. Could make life
easier for people porting Makefile.pre.in-based extensions to Distutils.
Also loosened argument-checking in Extension constructor to make life
easier for 'read_setup_file()'.
Tim Peters [Sat, 16 Sep 2000 22:31:29 +0000 (22:31 +0000)]
arraymodule: Fix SF bug 113960.
reverse() didn't work at all due to bad arg check.
Fixed that.
Added Brad Chapman to ACKS file, as the proud new owner of two
implicitly copyrighted lines of Python source code <wink>.
Repaired buffer_info's total lack of arg-checking.
Replaced memmove by memcpy in reverse() guts, as memmove is
often slower and the memory areas are guaranteed disjoint.
Replaced poke-and-hope unchecked decl of tmp buffer size by
assert-checked larger tmp buffer.
Got rid of inconsistent spaces before open paren in docstrings.
Added reverse() sanity tests to test_array.py.
Changed so lines that are all comment (or just whitespace + comment)
are completely skipped, rather than being treated as blank lines
(and then subject to the 'skip_blanks' flag). This allows us
to process old-style Setup files, which rely on
hello \\
# boo!
there
coming out as "hello there".
[change from 2000/08/11, propagating now to distutils copy]
Factored the guts of 'warn()' out to 'gen_error()', and added the
'error()' method (trivial thanks to the refactoring).
[change from 2000/04/17, propagating now to distutils copy]
Dropped the 'collapse_ws' option and replaced it with 'collapse_join' --
it's *much* faster (no 're.sub()') and this is the reason I really added
'collapse_ws', ie. to remove leading whitespace from a line being joined
to the previous line.
Rene Liebscher: if we have to run the same sub-command multiple times
(eg. "bdist_dumb", to generate both ZIP and tar archives in the same
run), tell all but the last run to keep temp files -- this just gets
rid of the need to pseudo-install the same files multiple times.
Generalized 'reinitialize_command()' so it can optionally reinitialize
the command's sub-commands as well (off by default). This is essential if
we want to be be able to run (eg.) "install" twice in one run, as happens
when generating multiple built distributions in one run.
Added the "sub-command" machinery to formalize the notion of "command
families" -- eg. install and its brood, build and its brood, and so forth.
Specifically: added the 'sub_commands' class attribute (empty list, sub-
classes must override it) and a comment describing it, and the
'get_sub_commands()' method.
Factored the "sub-command" machinery out to Command. Mainly, this
meant removing 'get_sub_commands()', and moving the 'sub_commands' class
attribute to the end and restructuring it to conform to the new regime.
Fred Drake [Sat, 16 Sep 2000 14:16:57 +0000 (14:16 +0000)]
Use a really ugly hack that depends on output processing by LaTeX2HTML.
This replaces the tilde character with the string ";SPMtilde;", which
LaTeX2HTML converts to a tilde on output.
Include the Python version in the platform-specific build directories:
with the recent change in 'get_platform()', we now have directory names
like "build/lib-1.5-linux-i586". Idea and original patch by
Rene Liebscher.
Jack Jansen [Fri, 15 Sep 2000 22:44:08 +0000 (22:44 +0000)]
This will eventually evolve into a package that creates CodeWarrior projects from templates (for distutils, and possibly the standard extensions too). For now it generates a correct xml file based on sources/output/expfile, but that is about all.
Jeremy Hylton [Fri, 15 Sep 2000 20:06:57 +0000 (20:06 +0000)]
fix bug #110661 (PR#356) -- accept either & or ; as separator for CGI
query string
also some doc string reformatting and use of string methods instead of
older string.splitfields
Fred Drake [Fri, 15 Sep 2000 15:19:35 +0000 (15:19 +0000)]
Update comments in the second paragraph, discussing versioning issues
related to the BSD DB library. Based on comments from Mark Summerfield
<summer@netcraft.com>.
Jeremy Hylton [Fri, 15 Sep 2000 15:14:51 +0000 (15:14 +0000)]
Fix Bug #114293:
Strings are unpickled by calling eval on the string's repr. This
change makes pickle work like cPickle; it checks if the pickled
string is safe to eval and raises ValueError if it is not.
test suite modifications:
Verify that pickle catches a variety of insecure string pickles
Make test_pickle and test_cpickle use exactly the same test suite
Add test for pickling recursive object
Tim Peters [Fri, 15 Sep 2000 07:44:49 +0000 (07:44 +0000)]
Closes SF bug 113894: on Windows, things like os.listdir("k:") and
glob.glob("k:*py") (i.e., a raw drive letter + colon at the start) were
using the root of the drive rather than the expected Windows behavior
of using the drive's "current directory".
Fred Drake [Fri, 15 Sep 2000 04:32:56 +0000 (04:32 +0000)]
main(): Move hackery of sys.argv until after the Tk instance has been
created. This allows the application-specific Tkinter
initialization to be executed if present. Also pass an explicit
className parameter to the Tk() constructor.
Fred Drake [Fri, 15 Sep 2000 04:12:56 +0000 (04:12 +0000)]
Add item to the list of limitations that points out the lack of support
for authenticated proxies. This is noted elsewhere, but this makes it
easier to find.
Adjust to the new sysconfig regime: use 'get_config_vars()' instead
of globals from sysconfig.
Added 'prefix' and 'exec_prefix' to the list of variables that can be
expanded in installation directories (preserving the stupid old names
of 'sys_prefix' and 'sys_exec_prefix, though).
Changed from eager parsing of Makefile (at import time) to lazy: only do
all that work when someone asks for a "configuration variable" from the
Makefile. Details:
- added 'get_config_vars()': responsible for calling one of the
'_init_*()' functions to figure things out for this platform,
and to provide an interface to the resulting dictionary
- added 'get_config_var()' as a simple interface to the dictionary
loaded by 'get_config_vars()'
- changed the '_init_*()' functions so they load the global dictionary
'_config_vars', rather than spewing their findings all over
the module namespace
- don't delete the '_init_*()' functions when done importing
- adjusted 'customize_compiler()' to the new regime
Fred Drake [Thu, 14 Sep 2000 22:25:47 +0000 (22:25 +0000)]
Before running LaTeX2HTML, remove all the HTML files from the output
directory. This avoids acretion of HTML from previous runs which may
have a new name; this would have avoided a lot of the packaging problems
related to changing labels from the old distutils documentation.
Jack Jansen [Thu, 14 Sep 2000 20:46:19 +0000 (20:46 +0000)]
Fixes that should make it possible to run Python on machines without NavServices installed. Also weak-linked OT libraries so Python can run with extensions disabled.
Fred Drake [Thu, 14 Sep 2000 20:42:53 +0000 (20:42 +0000)]
Denis S. Otkidach <ods@users.sourceforge.net>:
Minor fix in documentation of code module.
(Clarifies output destination for default implementation of the write()
method.)