Fred Drake [Thu, 2 Aug 2001 18:00:28 +0000 (18:00 +0000)]
Move away from apply() to using extended call syntax for some example
fragments when discussing equivalence of thhe C API to what a Python
programmer sees.
Added descriptions of PyEval_SetProfile() and PyEval_SetTrace().
Tim Peters [Wed, 1 Aug 2001 18:33:33 +0000 (18:33 +0000)]
Repair more ways in which the "backup files" dialog differed from all the
others (wrong title, inconsistent layout). Also tried to make the dialog
text clearer, and spelled out what the "yes" and "no" buttons *mean*.
Fred Drake [Wed, 1 Aug 2001 16:56:51 +0000 (16:56 +0000)]
Added an example of a string value for the replacement parameter to
re.sub().
This closes SF bug #446136.
Fixed description of RE modifiers so that RE{#} and RE{#,} are more
clearly described and disambiguated (plain RE{#} had not been described
at all). Reported by Jeremy Craven via email.
Tim Peters [Wed, 1 Aug 2001 06:29:56 +0000 (06:29 +0000)]
We always wrote a pair of lines to the Wise install.log telling it to
delete the Tools and Lib directories at uninstall time. However,
under the old version of Wise, they didn't actually do anything. Under
the new version, they work as advertised, and even delete files users
added.
Got rid of those, and replaced them with similar uninstall cmds that
get rid of all .pyc and .pyo files (whether or not the installer created
them). This works nicely! It still tears down the directory structure,
except for those directories needed to get to any non-.pyc/o file(s) the
user may have added.
Tim Peters [Wed, 1 Aug 2001 03:42:27 +0000 (03:42 +0000)]
Hmm. The Backup/Replace dialog also had back/next buttons three pixels
narrower than all the other Wise dialogs, and offset by a few pixels in
the vertical direction too. Made these things consistent across dialogs
too.
Tim Peters [Wed, 1 Aug 2001 03:36:20 +0000 (03:36 +0000)]
Aha! Finally figured out something else that's been driving me nuts:
turns out the canned new "backup directory" dialog put its "back" and
"next" buttons at a different relative horizontal position than all the
other canned dialogs. This explains why you had to keep moving the
mouse around if you wanted to do a straight all-default install -- the
Next button kept moving around. Now the back/next buttons are in exactly
the same place on all dialogs, and you can click straight thru to the end.
Tim Peters [Wed, 1 Aug 2001 03:29:59 +0000 (03:29 +0000)]
The "Select Destination Directory" dialog didn't ask for confirmation
about installing into a pre-existing directory *unless* you hit the
Browse button first. At least while testing, this screwed me repeatedly.
Plus I really liked the Inno Setup scheme of giving you a list box in
its "select directory" dialog without needing a distinct browse button
to ask for that.
So I redid this dialog from scratch: now gives a list box at once, the
browse button is gone, it asks for confirmation if the directory already
exists, and, since this is the first dialog in the set now, also removed
its "Back" button.
As discussed on python-dev: this patch adds name mangling to
assure that extensions and interpreters using the Unicode APIs
were compiled using the same Unicode width.
This patch turns the Python API mismatch notice into a standard
Python warning which can be catched by means of the Python warning
framework.
It also adds two new APIs which hopefully make it easier for Python
to switch to buffer overflow safe [v]snprintf() APIs for error
reporting et al. The two new APIs are PyOS_snprintf() and
PyOS_vsnprintf() and work just like the standard ones in many
C libs. On platforms which have snprintf(), the native APIs are used,
on all other an emulation with snprintf() tries to do its best.
Tim Peters [Mon, 30 Jul 2001 23:26:41 +0000 (23:26 +0000)]
Remove oodles of pointless file date and size stamps. I caught the Wise
GUI inserting those once before shortly after I started using it, but
don't know what triggers it -- presumably something in the "expert" view
(which is, suitably enough, unsuited to experts <wink>).
Tim Peters [Mon, 30 Jul 2001 23:06:21 +0000 (23:06 +0000)]
Massive fiddling to get the install to work at all on a Win2K box under a
plain unprivileged User acct:
+ Had to duplicate Wise's Uninstal.wse script, in order to change the line
at its end that unconditionally tries to write uninstall info under HKLM.
This is our new file Uninstal.wse, which must be included by python20.wse
instead of using Wise's version.
+ In every other case we write to HKLM, also write to HKCU instead (we
were already doing that in *most* places, but not quite all).
+ If the user doesn't have admin privs, the DLLs we usually write to the
system dir are written to the root of the Python installation instead.
That's python22.dll, plus the two MSVC runtime DLLs.
+ Added a new component "Register file extensions". Registering .py etc
is done under HKEY_CLASSES_ROOT, and that also requires admin privs;
i.e., AFAICT it's impossible for an unprivileged user to accomplish this.
In the component selection dialog, if the user doesn't have admin privs
I gray out this new component so the user knows they aren't getting file
extensions.
After all that, Python installs, the Start Menu entries are OK, it runs
its test suite to completion, and the uninstaller works too. Only known
problem so far is that the integration with Win2K's Add/Remove subsystem
isn't quite right yet in this irritating case.
Jeremy Hylton [Mon, 30 Jul 2001 22:39:31 +0000 (22:39 +0000)]
Fix for SF byg [ #420304 ] getattr function w/ default
Fix suggested by Michael Hudson: Raise TypeError if attribute name
passed to getattr() is not a string or Unicode. There is some
unfortunate duplication of code between builtin_getattr() and
PyObject_GetAttr(), but it appears to be unavoidable.
Jeremy Hylton [Mon, 30 Jul 2001 22:34:24 +0000 (22:34 +0000)]
Add _PyUnicode_AsDefaultEncodedString to unicodeobject.h.
And remove all the extern decls in the middle of .c files.
Apparently, it was excluded from the header file because it is
intended for internal use by the interpreter. It's still intended for
internal use and documented as such in the header file.
Jeremy Hylton [Mon, 30 Jul 2001 21:49:22 +0000 (21:49 +0000)]
Ugly fix used when pyexpat is not available.
If pyexpat is not available and more than one attempt is made to load
an expat-based xml parser, an empty xml.parser.expat module will be
created. This empty module will confuse xml.sax.expatreader into
thinking that pyexpat is available.
The ugly fix is to verify that the expat module actually defines the
names that are imported from pyexpat.
Tim Peters [Sun, 29 Jul 2001 21:36:58 +0000 (21:36 +0000)]
Repair long-standing mistakes in the distutils and xml installations:
1. Only .py files were getting installed.
2. Empty CVS directories were getting created.
Both were due to trying to get away with "recursively copy *.py" one-
liner scripting.
Tim Peters [Sun, 29 Jul 2001 19:27:23 +0000 (19:27 +0000)]
Add oodles more 8.1 Wizard boilerplate. This creates lots of vrbls we
don't use directly, but the Wise utility scripts we invoke (like
uninstal.wse) sometimes need them.
Tim Peters [Sun, 29 Jul 2001 09:28:37 +0000 (09:28 +0000)]
Updated to Wise 8.14 (web update).
Got rid of useless "Welcome" screen.
Folded Tcl/Tk into the main Python component.
Bug introduced during upgrade: Start Menu entries didn't work if
installation was to a path with an embedded space, because the
enclosing quotes somehow got dropped on the cmdline args. Repaired.
Years of wizard-generated code blocks left this script hard to read.
Added many more comments, blank lines, and rearranged related code
into related blocks where they had drifted apart.
Added %_PYMAJOR_% and %_PYMINOR_% compiler vrbls, and reworked script
items to use them as appropriate. This should slash the amount of
hand-fiddling needed when version numbers change. Indeed, in the
body of the script, only the first line should need changing now.
Deleted unreferenced wizard-generated compiler vrbls.
Tim Peters [Sun, 29 Jul 2001 02:04:20 +0000 (02:04 +0000)]
Woo hoo! Relative paths! This is, alas, partly braindead: When the new
"relative paths" option is enabled, 8.1 rewrites *every* path to be
relative to PCbuild (the dir containing the .wse script), even absolute
paths you type in by hand, paths to the Wise installation itself, and even
paths to the Windows directories (sheesh). Only way to stop it is to
start a path with a variable reference, and we screwed ourselves before
by not using the predefined %_WISE_% vrbl to point to the Wise
installation. Repaired that old, repeated and well-hidden mistake.
Also:
+ Got rid of the %_SRC_% vrbl (such paths always relative to PCBuild now).
+ Changed the %_DOC_% vrbl to prompt for the location of the unzipped
HTML files (defaults to ..\html, cuz that's where I put them, but I
expect I'll change that later cuz I always hated mixing the generated
docs into the CVS tree ... Guido, if you're reading this, where did you
unpack the docs when building a Windows installer? Happy to oblige.).
+ Stopped the generated installer from filling up the entire screen (got
rid of the massive blue background gradient -- new option).
+ Added the helpful app publisher and app URL registry entries that Win2K
displays in its version of Add/Remove.
Tim Peters [Sun, 29 Jul 2001 00:48:54 +0000 (00:48 +0000)]
Convert from Wise version 5.0 to 8.1. Gotta hand it to 'em! 8.1 imported
the old script without any complaints, didn't demand any manual changes,
and built a working installer from it that acts very much like the old one.
It did add a few script items, and changed one, so checking it in now
before I break everything again.
Barry Warsaw [Fri, 27 Jul 2001 16:47:18 +0000 (16:47 +0000)]
Added the -X/--no-docstrings flag which takes a filename containing a
list of files to not extract docstrings from when the -D option is
given. This isn't optimal, but I didn't want to change the semantics
of -D, and it's bad form to allow optional switch arguments.
Bumping __version__ to 1.4.
TokenEater.__init__(): Initialize __curfile to None.
__waiting(): In order to extract docstrings from the module, both the
-D flag should be set, and the __curfile should not be named in
the -X filename (i.e. it isn't in opts.nodocstrings).
set_filename(): Fixed a bug where once the first module docstring is
extracted, no subsequent module docstrings will be extracted. The
bug was that the first extraction set __freshmodule to 0, but that
flag was never reset back to 1. set_filename() is always called
when the next file is being processed, so use it to reset the
__freshmodule flag.
Tim Peters [Thu, 26 Jul 2001 21:54:37 +0000 (21:54 +0000)]
Change ntpath.join() so that join("d:/", "/whatever") returns
d:/whatever instead of /whatever. While I'm afraid changing isabs()
to be *consistent* with this would break lots of code, it makes
best sense for join() to do it this way. Thanks to Alex Martelli for
pushing back on this one!