Commit Graph

14742 Commits

Author SHA1 Message Date
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
Jack Jansen f86eda5d19 Added GetArgs dialog to EasyDialogs, a very nifty (if I may say so:-) way to create a unix-style sys.argv. 2000-09-19 22:42:38 +00:00
Marc-André Lemburg d1ba443206 This patch adds a new Python C API called PyString_AsStringAndSize()
which implements the automatic conversion from Unicode to a string
object using the default encoding.

The new API is then put to use to have eval() and exec accept
Unicode objects as code parameter. This closes bugs #110924
and #113890.

As side-effect, the traditional C APIs PyString_Size() and
PyString_AsString() will also accept Unicode objects as
parameters.
2000-09-19 21:04:18 +00:00
Guido van Rossum f8d071332a Temporary fix for Bug #114821.
The cause was that the replace code necessarily used a PCRE internal
function to to template expansion.

The fix changes the code to use an SRE internal if SRE is used, and a
PCRE internal if SRE is used; in a way that should work with 1.5.2.

The solution can be sped up tremendously under the assumption that the
choice between sre and pre is not changed during the execution of the
program; especially replace-all will be slow.

But I'll leave that to someone else.
2000-09-19 20:51:17 +00:00
Tim Peters 0eeba5b24b Part of SF patch 101481: on Windows, os.path.join("a:", "b") should yield
"a:b", not "a:/b".  Similar change was made to posixmodule.c earlier.
2000-09-19 20:39:32 +00:00
Tim Peters f5fa0fc640 test_userlist.py:
Added new test for new __contains__ method.
    Extensive editing to get rid of asserts.
2000-09-19 20:31:24 +00:00
Tim Peters 7b393fc037 SF patch 101391: implemented UserList.__contains__. 2000-09-19 20:29:03 +00:00