Guido van Rossum [Wed, 24 May 2000 13:21:46 +0000 (13:21 +0000)]
Fix a problem reported by Oleg Broytmann, who complains that very
often, ftp URLs hang in the final close. Further analysis suggests
that this is because the close hook in addclosehook() calls the hook
before acually closing the connection. The hook, in this case, waits
for the '226 Transfer complete' status from the server on the command
socket. However, more and more ftp servers only send this status when
the data socket has actually been closed -- causing a deadlock.
The fix is simple: in addclosehook.close(), call addbase.close()
*before* calling the closehook.
Greg Ward [Tue, 23 May 2000 23:14:00 +0000 (23:14 +0000)]
Catch failure to open installed Makefile, and report it as a
DistutilsPlatformError: "invalid Python installation". (This will
happen on Red Hat-ish systems where the python-devel package is not
installed.)
Changes by AMK: Use HAVE_NCURSES_H to include correct header file
Lots of typo fixes (a bit too much cut-and-paste in this module)
Aliases removed: attr_on, attr_off, attr_set
Lowercased the names COLOR_PAIR and PAIR_NUMBER
#ifdef's for compiling on Solaris added (need to understand SYSV curses
versions better and generalize this)
Bumped version number bumped to 1.6
Barry Warsaw [Tue, 23 May 2000 05:47:43 +0000 (05:47 +0000)]
(py-execute-region): Based on suggestions by Francois Pinard and Skip
Montanaro, handle execution of indented regions by inserting an "if
1:" in front of the block. This better preserves things like triple
quoted strings and commented regions. This patch resolves PR#264.
Greg Ward [Tue, 23 May 2000 04:11:14 +0000 (04:11 +0000)]
Fix 'get_command_obj()' so it checks if a command object has an attribute
before setting it -- this will catch bad options (eg. typos) in config files.
Greg Ward [Tue, 23 May 2000 03:54:16 +0000 (03:54 +0000)]
Added some debuging output (actually moved here from dist.py) --
dump the Distribution's 'command_options' dict after parsing config files,
and then after parsing the command line.
Greg Ward [Tue, 23 May 2000 03:47:35 +0000 (03:47 +0000)]
Fixed so options from config files and command lines actually work:
* 'get_command_obj()' now sets command attributes based on
the 'command_options' dictionary
* some typos fixed
* kludged 'parse_config_files()' to re-initialize the ConfigParser
instance after each file, so we know for sure which config
file each option comes form
* added lots of handy debugging output
Greg Ward [Tue, 23 May 2000 01:44:20 +0000 (01:44 +0000)]
OptionDummy now has a constructor that takes a list of options: each string
in the option list is an attribute of the OptionDummy that will be
initialized to None.
Greg Ward [Tue, 23 May 2000 01:42:17 +0000 (01:42 +0000)]
Marching towards full support of config files: thoroughly overhauled the
command-line parsing code, splitting it up into several methods (new
methods: '_parse_command_opts()', '_show_help()') and making it put options
into the 'command_options' dictionary rather than instantiating command
objects and putting them there.
Lots of other little changes:
* merged 'find_command_class()' and 'create_command_obj()' and
called the result 'get_command_class()'
* renamed 'find_command_obj()' to 'get_command_obj()', and added
command object creation and maintenance of the command object cache to
its responsibilities (taken over from 'create_command_obj()')
* parse config files one-at-a-time, so we can keep track of the
filename for later error reporting
* tweaked some help messages
* fixed up many obsolete comments and docstrings
Guido van Rossum [Sun, 21 May 2000 16:25:29 +0000 (16:25 +0000)]
Changed list_directory() somewhat. It is now only called when there
is no index.htm[l] file, and when it is called, it also spits out the
headers. When an index.htm[l] file is present, the regular (file
access) path is followed. Also, when the guessed content-type matches
text/*, open the file in text mode; otherwise in binary mode.
Greg Ward [Sat, 20 May 2000 15:17:09 +0000 (15:17 +0000)]
Changed the semantics of the 'sub_commands' list: instead of function
objects, it now has method names.
Added three methods, 'has_lib()', 'has_scripts()', and 'has_data()'
to determine if we need to run each of the three possible sub-commands.
Added 'get_sub_commands()' to take care of finding the methods named
in 'sub_commands', running them, and interpreting the results to
build a list of sub-commands that actually have to be run.
Greg Ward [Sat, 20 May 2000 15:08:57 +0000 (15:08 +0000)]
Check if the claimed build directory doesn't exist, and warn that we don't
have any Python modules to install (rather than bomb when we try to copy
a non-existent directory).
Greg Ward [Sat, 20 May 2000 13:23:21 +0000 (13:23 +0000)]
Added support for the 'export_symbols' parameter to 'link_shared_object()'
and 'link_shared_lib()'. In MSVCCompiler, this is meaningful: it adds
/EXPORT: options to the linker command line. In UnixCCompiler, it
is ignored.
Gregory P. Smith [Sat, 13 May 2000 03:06:56 +0000 (03:06 +0000)]
Drastically simplified by taking advantage of the "install" command's
new flexibility, specifically the 'root' option. Now, we just use
"install" to do a fake installation into a temporary directory
(the 'bdist_dir' option, which derives from the 'bdist_base' option of
"bdist"), and then tar/zip up that directory. This means that dumb
built distributions are now relative to the root directory, rather than
the prefix or exec-prefix; this is probably a feature, but does make
them slightly less flexible.
Gregory P. Smith [Sat, 13 May 2000 02:13:53 +0000 (02:13 +0000)]
Ditch the explicit search for *.py[co] files -- they're now included in
the list returned by 'get_outputs()', thanks to changes in the
"install_lib" command.
Gregory P. Smith [Sat, 13 May 2000 02:11:10 +0000 (02:11 +0000)]
Added '_bytecode_filenames()' method, and use it in 'get_outputs()'
to ensure that compiled bytecode files are considered part of the output
of the "install_lib" command.
Gregory P. Smith [Sat, 13 May 2000 02:01:22 +0000 (02:01 +0000)]
Moved check for installation to non-sys.path location so it comes
last (after writing list of installed files) -- that way, the warning
is more visible.
Gregory P. Smith [Sat, 13 May 2000 01:56:55 +0000 (01:56 +0000)]
Added the 'build_bdist' option and code to clean it up -- this is the
top-level temporary directory for creating built distributions. (Won't
work yet, since the "build" command doesn't yet have a 'build_bdist'
option, and none of the "bdist" commands support it yet.)
Jack Jansen [Fri, 12 May 2000 21:29:58 +0000 (21:29 +0000)]
First tiny steps towards Carbon: this project currently builds a PythonStandSmall without GUSI and with standard MSL malloc. Socket and select are the main victims of this.
Gregory P. Smith [Fri, 12 May 2000 01:31:37 +0000 (01:31 +0000)]
In 'install_misc' class:
- renamed '_copydata()' to 'copy_files()'
- changed it to record complete output filenames
- dropped '_outputdata()' in favour of much simpler 'get_outputs()'
Gregory P. Smith [Fri, 12 May 2000 00:52:23 +0000 (00:52 +0000)]
Patch from Bastien Kleineidam:
adds the 'install_data' and 'install_scripts' commands; these two
are trivial thanks to the 'install_misc' base class in cmd.py.
(Minor tweaks and commentary by me; the code is untested so far.)
Gregory P. Smith [Fri, 12 May 2000 00:34:12 +0000 (00:34 +0000)]
Fix from Lyle Johnson: add the '--compiler' option.
Also added creation of 'implib_dir', a temporary directory specific to
MSVC++ -- but I checked in two ways of fixing it (Lyle's and mine),
because I'm not sure which is right.
Guido van Rossum [Thu, 11 May 2000 18:42:27 +0000 (18:42 +0000)]
The addition of rint() (by Peter Schneider-Kamp; I forgot to mention
that before) in the previous patch has one problem; rint() is not in
the C math library on all platforms (e.g. not for VC++). Make it
conditional on HAVE_RINT.
Fred Drake [Wed, 10 May 2000 20:33:18 +0000 (20:33 +0000)]
Section "The Module's Method Table and Initialization Function":
Explain that the name of the initialization function must be
init<module>(). Omission noted by Daniel Kozan
<crum@dev-group.com>.
Fred Drake [Wed, 10 May 2000 16:50:07 +0000 (16:50 +0000)]
EditorWindow.python_docs():
Instead of using Netscape through os.system(), use the new
browser.open() function to load the documentation on the
default browser. On Windows, this will use the installed
documentation if it exists, instead of hitting python.org.
Guido van Rossum [Wed, 10 May 2000 13:25:32 +0000 (13:25 +0000)]
Trent Mick:
Use "win32" for sys.platform on Win64 instead of "win32" because:
1. While it may be confusing to the Python scriptor on Win64 that he has to
check for win*32*, that is something that he will learn the first time. It
is better than the alternative of the scriptor happily using "win64" and
then that code not running on Win32 for no good reason.
2. The main question is: is Win64 so much more like Win32 than different from
it that the common-case general Python programmer should not ever have to
make the differentiation in his Python code. Or, at least, enough so that
such differentiation by the Python scriptor is rare enough that some other
provided mechanism is sufficient (even preferable). Currently the answer
is yes. Hopefully MS will not change this answer.
Fred Drake [Tue, 9 May 2000 21:50:00 +0000 (21:50 +0000)]
Trent Mick <trentm@activestate.com>:
Limit the 'b' formatter of PyArg_ParseTuple to valid values of an unsigned
char, i.e. [0,UCHAR_MAX]. It is expected that this is the common usage of 'b'.
An OverflowError is raised if the parsed value is outside this range.
Fred Drake [Tue, 9 May 2000 19:57:01 +0000 (19:57 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added APIs to allow setting and querying the system's
current string encoding: sys.set_string_encoding()
and sys.get_string_encoding().
Fred Drake [Tue, 9 May 2000 19:53:39 +0000 (19:53 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added support for user settable default encodings. The
current implementation uses a per-process global which
defines the value of the encoding parameter in case it
is set to NULL (meaning: use the default encoding).