Undo revision 1.7: always mangle a #! line containing "python" to point
to the current Python interpreter (ie. the one used for
building/installation), even (especially!) if "/usr/bin/env" appears in
the #! line.
Rationale: installing scripts with "#!/usr/bin/env python" is asking for
trouble, because
1) it might pick the wrong interpreter (not the one used to
build/install the script)
2) it doesn't work on all platforms (try it on IRIX 5, or on Linux
with command-line options for python)
3) "env" might not be in /usr/bin
Fred Drake [Tue, 24 Jul 2001 16:19:24 +0000 (16:19 +0000)]
Overview comments for the distutils package, with links to the distutils
manuals for more information. This is being added to make it easier to
find the documentation for the distutils code.
Martin v. Löwis [Tue, 24 Jul 2001 06:33:08 +0000 (06:33 +0000)]
Autocheck for snprintf, and use sprintf if it is not available.
Remove declaration of h_errno, since it is supposedly declared in netdb.h.
Changes proposed by itojun.
Fred Drake [Mon, 23 Jul 2001 19:19:39 +0000 (19:19 +0000)]
Add StopIteration to the list of exceptions *not* derived from StandardError.
Slightly re-word discussion of SystemExit and fork().
This is part of SF patch #443788.
SF Patch #441791, with changes: when "import foo.bar" fails with an
exception in the execution of bar, ensure that foo.bar exists.
(Previously, while sys.modules['foo.bar'] would exist, foo.bar would
only be created upon successful execution of bar. This is
inconvenient; some would say wrong. :-)
Tim Peters [Sat, 21 Jul 2001 21:16:39 +0000 (21:16 +0000)]
Leave the Inno script in better shape. Added registration of .py etc
extensions -- but Inno uninstall doesn't restore previous ones (if any),
so that's another step backwards.
Martin v. Löwis [Sat, 21 Jul 2001 18:05:31 +0000 (18:05 +0000)]
Patch #401196: IPv6 extensions to the socket module.
New functions getnameinfo, getaddrinfo. New exceptions socket.gaierror,
socket.herror. Various new constants, in particular AF_INET6 and error
codes and parameters for getaddrinfo.
AF_INET6 support in setipaddr, makesockaddr, getsockaddr, getsockaddrlen,
gethost_common, PySocket_gethostbyaddr.
Tim Peters [Sat, 21 Jul 2001 01:41:30 +0000 (01:41 +0000)]
Whitespace normalization, plus:
+ test_quopri.py relied on significant trailing spaces. Fixed.
+ test_dircache.py (still) doesn't work on Windows (directory mtime on
Windows doesn't work like it does on Unix).
Fred Drake [Fri, 20 Jul 2001 20:56:11 +0000 (20:56 +0000)]
Typo: PyArgs_ParseTuple --> PyArg_ParseTuple
Moved the PyArg_Parse*(), Py_BuildValue() functions to the Utilities
chapter, added a minimal description and reference to the Extending
manual for Py_BuildValue().
Fred Drake [Fri, 20 Jul 2001 20:06:17 +0000 (20:06 +0000)]
Make the add*() helper functions more robust for use after intialization
is complete: recompute _dirs_in_sys_path each time these functions are
entered after module initialization is complete, and reset before
returning to user code.
Fred Drake [Fri, 20 Jul 2001 18:58:42 +0000 (18:58 +0000)]
Use string.ascii_letters instead of string.letters (SF bug #226706).
Move computation of sets of characters out of the body of the function that
uses them.
Fred Drake [Fri, 20 Jul 2001 18:38:26 +0000 (18:38 +0000)]
Added the constants ascii_letters, ascii_lowercase, and ascii_uppercase
to the string module. This was determined to be the right approach in
SF bug #226706.
#ifdef out generation of \U escapes unless Py_UNICODE_WIDE. This
#caused warnings with the VMS C compiler. (SF bug #442998, in part.)
On a narrow system the current code should never be executed since ch
will always be < 0x10000.
Marc-Andre: you may end up fixing this a different way, since I
believe you have plans to generate \U for surrogate pairs. I'll leave
that to you.
Fred Drake [Fri, 20 Jul 2001 15:33:23 +0000 (15:33 +0000)]
Removed unnecessary section "Unicode literals"; all the discussion is
already present in the "String literals" section, including comments on
the "u" prefix and the additional escape sequences used for Unicode.
Fix showstopper SF bug #442983: use of site.addsitedir() was broken
because it references the global dirs_in_sys_path which is deleted.
The fix avoids deleting that global.
(My email through python.org or digicool.com is non-functional at the
moment; use gvanrossum@home.com to reach me.)
Tim Peters [Fri, 20 Jul 2001 09:32:16 +0000 (09:32 +0000)]
A full Inno Setup script for Python, except for the few hard and esoteric
parts Inno has no good answer for (read the comments at the top of the
script).
Tim Peters [Thu, 19 Jul 2001 17:18:18 +0000 (17:18 +0000)]
SF bug #44271: os.path.expanduser problem w/o HOME set.
This is a Windows-specific glitch that's really due to that, e.g.,
ntpath.join("c:", "/abc") returned "/abc" instead of "c:/abc". Made
join smarter.
Bugfix candidate.
Thomas, I don't care about unset either, but setting PYTHONHOME=
doesn't work -- it actually prevents the extensions from being built
properly. So I'm changing the "sharedmods" target to what I presume
it was before:
PYTHONPATH= ./$(PYTHON) $(srcdir)/setup.py build
Martin v. Löwis [Thu, 19 Jul 2001 11:00:41 +0000 (11:00 +0000)]
Patch #418659: Fixes for UnixWare and ReliantUnix.
back-out 1.215 of configure.in and 1.34 of Makefile.pre.in
Check for -Kpthread compiler support, and use this as the sole option
for MT if available.
Fred Drake [Thu, 19 Jul 2001 03:46:26 +0000 (03:46 +0000)]
Remove some false comments.
Reorganize so the initialization sequences does not bite us in the foot.
(There is no good reason to discard classes that clients may want to
subclass.)