Commit Graph

14748 Commits

Author SHA1 Message Date
Fred Drake 0f6dcb3f9e Remove debugging print. ;( 2000-09-22 04:49:50 +00:00
Fred Drake 343ad7a572 Correct some bitrot; some things have become inaccurate in the tutorial.
<file>.readlines() does not call <file>.readline() internally anymore,
and the sizehint parameter should be mentioned briefly.

Some displays of floating point numbers needed to be updated due to the
change in the repr() of floats (from 1.6).

Both issues were noted by Aahz <aahz@panix.com>.
2000-09-22 04:12:27 +00:00
Greg Ward ab7983939b Tweak what happens when run on non-Windows platforms: set install prefix
as well as scheme, and don't convert all installation paths (that's now
done by the "install" command for us).
2000-09-22 01:32:34 +00:00
Greg Ward 379a02ffa9 Changed all paths in the INSTALL_SCHEMES dict to Unix syntax, and added
'convert_paths()' method to convert them all to the local syntax (backslash
or colon or whatever) at the appropriate time.

Added SCHEME_KEYS to get rid of one hard-coded list of attributes (in
'select_scheme()').

Default 'install_path_file' to true, and never set it false (it's just
there in case some outsider somewhere wants to disable installation of the
.pth file for whatever reason).

Toned down the warning emitted when 'install_path_file' is false, since we
no longer know why it might be false.

Added 'warn_dir' flag to suppress warning when installing to a directory
not in sys.path (again, we never set this false -- it's there for outsiders
to use, specifically the "bdist_*" commands).

Pulled the loop of 'change_root()' calls out to new method 'change_roots()'.

Comment updates/deletions/additions.
2000-09-22 01:31:08 +00:00
Greg Ward 7ec053544c Fix 'convert_path()' so it returns immediately under Unix -- prevents blowing
up when the pathname starts with '/', which is needed when converting
installation directories in the "install" command.
2000-09-22 01:05:43 +00:00
Fred Drake f89259786a Denis S. Otkidach <ods@users.sourceforge.net>:
Show how code can be written to handle __getslice__ & friends in a way that
is compatible with pre-2.0 versions of Python while still working with the
"new" way of handling slicing.

Additional explanation added by Fred Drake.

This closes SourceForge patch #101388.
2000-09-21 22:27:16 +00:00
Guido van Rossum 1a5e5830a7 Untested patch by Ty Sarna to make TELL64 work on older NetBSD systems.
According to Justin Pettit, this also works on OpenBSD, so I've added
that symbol as well.
2000-09-21 22:15:29 +00:00
Martin v. Löwis d7bf974af4 Indent _connection_class so that it becomes HTTPS._connection_class. 2000-09-21 22:09:47 +00:00
Fred Drake d68442b164 Lots of minor fixes, many suggested by Detlef Lannert
<lannert@uni-duesseldorf.de>.
2000-09-21 22:01:36 +00:00
Jack Jansen 0bb0a90b20 Various tweaks and bugfixes to GetArgv. It now appears good enough for Distutils. 2000-09-21 22:01:08 +00:00
Fred Drake 00fb4160d3 Added dependencies on the bug-reporting text. 2000-09-21 21:37:09 +00:00
Fred Drake ed773ef78d Include the new text on reporting bugs in a few useful places.
This closes SourceForge bug #114792.
2000-09-21 21:35:22 +00:00
Fred Drake cb0a0b3e80 New text about how to report bugs in Python and the documentation. 2000-09-21 21:32:14 +00:00
Marc-André Lemburg 5cd2f0d4a2 Updated according to the changes made to the "s#" parser marker
and bumped the version number to 1.7.
2000-09-21 21:21:59 +00:00
Marc-André Lemburg b425f5e35b Added a true unicode_internal_encode function and fixed the
unicode_internal_decode function to support Unicode objects
directly rather than by generating a copy of the object.
2000-09-21 21:09:45 +00:00
Marc-André Lemburg 0afff388ce Special case the "s#" PyArg_Parse() token for Unicode objects:
"s#" will now return a pointer to the default encoded string data
of the Unicode object instead of a pointer to the raw UTF-16
data.

The latter is still available via PyObject_AsReadBuffer().

The patch also adds an optimization for string objects which is
based on the fact that string objects return the raw character data
for getreadbuffer access and are always single-segment.
2000-09-21 21:08:30 +00:00
Marc-André Lemburg 3578b77312 Special case the "s#" PyArg_Parse() token for Unicode objects:
"s#" will now return a pointer to the default encoded string data
of the Unicode object instead of a pointer to the raw UTF-16
data.

The latter is still available via PyObject_AsReadBuffer().
2000-09-21 21:08:08 +00:00
Fred Drake 265a804af2 Revise the test case for pyexpat to avoid using asserts. Conform better
to the Python style guide, and remove unneeded imports.
2000-09-21 20:32:13 +00:00
Guido van Rossum 9e79a25b8a The minidom.Node class has a debug attribute which, when its _debug
flag is true, is set to a StringIO object that silently collects all
debug messages.  This is triggered by the Node._debug=1 statement at
the top of test_minidom.py.  After the tests, we better delete that
StringIO object to avoid wasting memory.  We also reset the _debug
flag.  (Note that this is an undetectable memory leak, and the memory
doesn't get collected by the cycle-gc either, because it's all
reachable -- it's just useless.)
2000-09-21 20:10:39 +00:00
Fred Drake ca1f426080 Remove memory leaks of strings/Unicode objects passed into the character
data and default handlers -- a new reference was being passed to
Py_BuildValue() for the "O" format character; using "N" plugs the leak.

Fixed two other (minor) leaks that occurred on various error conditions.

Removed uses of the UNLESS macro, which makes code hard to read, and is
Evil.
2000-09-21 20:10:23 +00:00
Fred Drake 07cbc4e5bd Paul Prescod <paul@prescod.net>:
Add support for parsing already-opened files.  Make sure the parse()
method closes exactly those files that it opens.

Modified by FLD for better conformance to the Python style guide.

This closes SourceForge patch #101512.
2000-09-21 17:43:48 +00:00
Fredrik Lundh 5644b7fad1 - fixed yet another gcc -pedantic warning
- added experimental "expand" method to match objects
- don't use the buffer interface on unicode strings
2000-09-21 17:03:25 +00:00
Fred Drake 44627016da SAXException.__getitem__(): Raise AttributeError instead of NameError. 2000-09-21 16:32:28 +00:00
Guido van Rossum 1e3c8ccb9b As suggested by Toby Dickenson, setting ob_type to NULL in
_Py_Dealloc(), is a bad idea (and always was!).  So let's drop it.
2000-09-21 16:25:33 +00:00
Fred Drake 1bf4e93180 Convert the longest two tables from tableii to longtableii so they do not
make too big a mess.  One actually did not fit on a single page at all!
2000-09-21 16:04:08 +00:00
Fred Drake da72b93a01 Add new environments: longtableii, longtableiii, and longtableiv, to
support long tables which might break across page boundaries.  Otherwise
identical to tableii, tableiii, and tableiv.
2000-09-21 15:58:02 +00:00
Fred Drake 2964268db5 Allow the LaTeX markup descriptions to use the \moreargs and \unspecified
macros in the argument list position.
2000-09-21 15:53:54 +00:00
Jeremy Hylton d34580cb87 fix bogus references to imp; makes test_minidom succeed 2000-09-21 14:46:56 +00:00
Guido van Rossum cf06571a8b Use PyOS_setsig() instead of signal(). Also remove redundant spaces
from the FreeBSD code.
2000-09-21 14:32:04 +00:00
Lars Gustäbel b798c0109f Now uses make_parser to create its parser (patch 101573). 2000-09-21 08:38:46 +00:00
Lars Gustäbel ae43e5205d Added the make_parser function (patch 101571). 2000-09-21 08:34:04 +00:00
Lars Gustäbel c5cec51b95 Updated XMLGenerator to new DocumentHandler interface (patch 101572). 2000-09-21 08:25:28 +00:00
Lars Gustäbel b4d6bb0987 Updated to correct DocumentHandler signatures. (patch 101570) 2000-09-21 08:18:55 +00:00
Tim Peters 39fb28f759 Windows installer:
Don't ship debug .dll, .pyd or .lib files.  Saves space.
    Bumped the title to beta 2.
2000-09-21 07:50:36 +00:00
Tim Peters 38fd5b6413 Derived from Martin's SF patch 110609: support unbounded ints in %d,i,u,x,X,o formats.
Note a curious extension to the std C rules:  x, X and o formatting can never produce
a sign character in C, so the '+' and ' ' flags are meaningless for them.  But
unbounded ints *can* produce a sign character under these conversions (no fixed-
width bitstring is wide enough to hold all negative values in 2's-comp form).  So
these flags become meaningful in Python when formatting a Python long which is too
big to fit in a C long.  This required shuffling around existing code, which hacked
x and X conversions to death when both the '#' and '0' flags were specified:  the
hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
'+' flags too, since signs were always meaningless before for x and X conversions.
Isomorphic shuffling was required in unicodeobject.c.
Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
2000-09-21 05:43:11 +00:00
Fred Drake 31575ce817 Note that __getitem__() may receive a slice object as the index;
reported by Detlef Lannert <lannert@uni-duesseldorf.de>.
2000-09-21 05:28:26 +00:00
Fred Drake 02997491c1 Document directories are not always named with three characters any more;
reported by Detlef Lannert <lannert@uni-duesseldorf.de>.
2000-09-21 05:26:43 +00:00
Fred Drake fffe5dbc47 Fixed a number of small problems reported by Detlef Lannert
<lannert@uni-duesseldorf.de>.
2000-09-21 05:25:30 +00:00
Greg Ward f5855746fe Corran Webster: fix 'change_root()' to handle Mac OS paths. 2000-09-21 01:23:35 +00:00
Guido van Rossum 55a8338d7f On Unix, use O_EXCL when creating the .pyc/.pyo files, to avoid a race condition 2000-09-20 20:31:38 +00:00
Guido van Rossum 6c0f33f8ef Add a definition of rl_library_version. Reported by jpettit@sourceforge. 2000-09-20 20:24:21 +00:00
Fred Drake df84facf0d .use_latex(): Make this a little smarter so that it only runs pdflatex
once if all the temporary files are available from building
               a DVI file.  This can avoid two runs of pdflatex.
2000-09-20 05:49:09 +00:00
Fred Drake 51f53df4c8 Clarify that the softspace attribute is used by print for state management,
not as a user-controlled parameter.
2000-09-20 04:48:20 +00:00
Fred Drake f5aa4ef07c Add entries for the xml.sax documentation. 2000-09-20 02:54:58 +00:00
Fred Drake e10ef74bb8 First cut at documentation for the xml.sax package (not including any
sub-modules).
2000-09-20 02:52:20 +00:00
Jeremy Hylton 572bdce4b3 change 2-space indent to 4-space indent 2000-09-20 02:47:28 +00:00
Jeremy Hylton 9c36a41694 distutils setup script 2000-09-20 02:35:19 +00:00
Guido van Rossum bdd901714d Fix typo (newtabwith). 2000-09-20 00:17:39 +00:00
Greg Ward 9c0ea13ece *Very* belated application of Thomas Heller's patch to handle
resource files.  The gist of the patch is to treat ".rc" and ".mc"
files as source files; ".mc" files are compiled to ".rc" and then
".res", and ".rc" files are compiled to ".res".  Wish I knew what
all these things stood for...
2000-09-19 23:56:43 +00:00
Tim Peters ceeda0e9ba Treat trailing colon in os.path.join("a:", "b") same way for DOS as in
recent changes to ntpath.py and posixmodule.c.  Thanks to Guido for
pointing out the inconsistency!
2000-09-19 23:46:56 +00:00