Commit Graph

3504 Commits

Author SHA1 Message Date
Martin v. Löwis 04f4943d13 _exceptions: Format a missing system id as <unknown>.
expatreader: Use the error handler instead of raising exception directly.
2000-10-09 16:45:54 +00:00
Guido van Rossum 46735add5f Fixed leapdays(). From Patch #101841, by Denis S. Otkidach. 2000-10-09 12:42:04 +00:00
Guido van Rossum e9f922f497 Adapt test output to changed error message. 2000-10-08 19:48:46 +00:00
Guido van Rossum ce6292ebf5 Correct output. 2000-10-08 00:21:43 +00:00
Guido van Rossum 923ebe4dc6 It seems our sound cards can't play mulaw data. Use native-format
16-bit signed data instead.  Hope this works for you; it works for me.
2000-10-08 00:20:20 +00:00
Martin v. Löwis 830b37bd74 Don't use string methods to allow sharing this code with PyXML. 2000-10-07 19:03:20 +00:00
Fredrik Lundh 13ac9926ac Fixed too ambitious "nothing to repeat" check. Closes bug #114033. 2000-10-07 17:38:23 +00:00
Fred Drake 5c0b43d1e2 The test is good, but Jim forgot to check in the updated output. 2000-10-07 16:58:11 +00:00
Fred Drake 613f7c4092 Donn Cave <donn@oz.net>:
Generated files for BeOS R5.
2000-10-07 12:25:17 +00:00
Martin v. Löwis a2fda0dfab Record bugs found when comparing the module with DOM Core Level 2. 2000-10-07 12:10:28 +00:00
Fredrik Lundh 025468d246 SRE didn't handle character category followed by hyphen inside a
character class.  Fix provided by Andrew Kuchling.  Closes bug
#116251.
2000-10-07 10:16:19 +00:00
Marc-André Lemburg b96d80201c Updated test with a case which checks for the bug reported in 2000-10-07 08:52:45 +00:00
Tim Peters de49583a0d Possible fix for Skip's bug 116136 (sre recursion limit hit in tokenize.py).
tokenize.py has always used naive regexps for matching string literals,
and that appears to trigger the sre recursion limit on Skip's platform (he
has very long single-line string literals).  Replaced all of tokenize.py's
string regexps with the "unrolled" forms used in IDLE, where they're known to
handle even absurd (multi-megabyte!) string literals without trouble.  See
Friedl's book for explanation (at heart, the naive regexps create a backtracking
choice point for each character in the literal, while the unrolled forms create
none).
2000-10-07 05:09:39 +00:00
Martin v. Löwis 0a84a338f9 Add .toxml test case, as proposed by Alex Martelli in bug report #116244. 2000-10-06 22:42:55 +00:00
Martin v. Löwis 2c8a89cc3f minidom: access attribute value before printing it
correct order of constructor args in createAttributeNS
pulldom: use symbolic names for uri and localnames
         correct usage of createAttribute and setAttributeNode signatures.
2000-10-06 22:36:03 +00:00
Martin v. Löwis 80670bcaba Add a test case for reporting the file name, and for reporting an error
for incomplete input.
2000-10-06 21:13:23 +00:00
Martin v. Löwis 31b485ffb0 In an incremental parser, close the parser after feeding everything. 2000-10-06 21:12:12 +00:00
Martin v. Löwis 5fece7fc1b Don't use a file object as system id; try to propagate the file name to
the InputSource.
2000-10-06 21:11:20 +00:00
Martin v. Löwis 2aa93efda0 Don't report a final chunk for an external entity parser. 2000-10-06 21:10:34 +00:00
Martin v. Löwis ee1dc157d7 Move translation from expat.error to SAXParseException into feed, so that
callers of feed will get a SAXException.
In close, feed the last chunk first before calling endDocument, so that
the parser may report errors before the end of the document. Don't do
anything in a nested parser.
Don't call endDocument in parse; that will be called in close.
Use self._source for finding the SystemID; XML_GetBase will be cleared in
case of an error.
2000-10-06 21:08:59 +00:00
Fred Drake 24c532a512 Fix a couple of typos in docstrings. 2000-10-06 20:28:46 +00:00
Jeremy Hylton e2b7c4dea3 test_linuxaudio:
read the header from the .au file and do a sanity check
    pass only the data to the audio device
    call flush() so that program does not exit until playback is complete
    call all the other methods to verify that they work minimally
    call setparameters with a bunch of bugs arguments

linuxaudiodev.c:
    use explicit O_WRONLY and O_RDONLY instead of 1 and 0
    add a string name to each of the entries in audio_types[]
    add AFMT_A_LAW to the list of known formats
    add x_mode attribute to lad object, stores imode from open call
    test ioctl return value as == -1, not < 0
    in read() method, resize string before return
    add getptr() method, that calls does ioctl on GETIPTR or GETOPTR
        depending on x_mode
    in setparameters() method, do better error checking and raise
        ValueErrors; also use ioctl calls recommended by Open Sound
        System Programmer's Guido (www.opensound.com)
    use PyModule_AddXXX to define names in module
2000-10-06 19:39:55 +00:00
Fred Drake cc773d3b11 __getslice__(): Make this use the constructor form that gets a sequence
as a parameter; this was the only use of the base
                 constructor or surgical alteration of another object's
                 data attribute.

This change simplifies the constructor requirements for subclasses.

This relates to SourceForge bug #115928.
2000-10-06 19:26:01 +00:00
Jim Fulton d1229f5651 Uncommented tests that failed for cStringIO,
Added missing clode to make the clode test test a close. ;)
2000-10-06 19:21:32 +00:00
Tim Peters 6d699ca699 Adding Jeremy's new test_import (SF patch 101709). 2000-10-06 18:46:22 +00:00
Martin v. Löwis 962c9e7f91 Add SAXReaderNotAvailable, and use it to distinguish between an
ImportError, and a missing driver.
2000-10-06 17:41:52 +00:00
Fred Drake 02776adab8 Donn Cave <donn@u.washington.edu>:
Script to regenerate platform-specific modules of constants.

[I moved common paths to variables for easier reading by humans. -- FLD]

This closes SourceForge patch #101781.
2000-10-06 16:11:21 +00:00
Guido van Rossum 00236f38da [ Bug #110677 ] PRIVATE: various minor Tkinter things (PR#388)
http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=110677

Canvas.CanvasItem & Canvas.Group:
- bind lacks an optional "add" param
- unbind lacks an optional "funcid" param
- tkraise/lower should call self.canvas.tag_XXXX

(markus.oberhumer@jk.uni-linz.ac.at)

Note: I'm *not* fixing "bbox() return value is inconsistent with
Canvas.bbox()" -- it might break existing code.
2000-10-06 00:38:51 +00:00
Tim Peters c54d19043a SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than
raise ValueError.  Checked in the patch as far as it went, but also changed
all of ints, longs and floats to raise ZeroDivisionError instead when raising
0 to a negative number.  This is what 754-inspired stds require, as the "true
result" is an infinity obtained from finite operands, i.e. it's a singularity.
Also changed float pow to not be so timid about using its square-and-multiply
algorithm.  Note that what math.pow does is unrelated to what builtin pow
does, and will still vary by platform.
2000-10-06 00:36:09 +00:00
Fred Drake 034c2a9f7a Add support for "import re" -- it uses pre, but user code does not need
to.
2000-10-05 20:42:44 +00:00
Barry Warsaw 293b03f73f translation(): Minor optimization patch which avoids instantiating the
default value's instance unless it's absolutely necessary.
2000-10-05 18:48:12 +00:00
Jeremy Hylton 77249442a5 Fix Bug #115907: encode '=' as '=3D' and not '==' 2000-10-05 17:24:33 +00:00
Trent Mick d68d0a6f5a Fix for test_class.py on Win64. id(self), which on Win64 returns a
PyLong, was used for the return value of a class __hash__ method, which
*must* return a PyInt. Solution: hash() the id(self) value.
2000-10-04 17:50:59 +00:00
Tim Peters d215218178 test_popen2 broke on Windows shortly after 2.0b2 was released. Fixed it. 2000-10-03 23:07:13 +00:00
Martin v. Löwis cf0a1cc417 Support non-namespace elements in *ElementNS of XMLGenerator. 2000-10-03 22:35:29 +00:00
Fredrik Lundh d11b5e54f0 Recompile pattern if (?x) flag was found inside the pattern during the
first scan.  Closes bug #115040.
2000-10-03 19:22:26 +00:00
Guido van Rossum f19a7ac220 Fix a few problems with the _Printer class and the license variable.
1. repr(license) will no longer print to stdout and read from stdin;
you have to use license().  `license` is a short message explaining
this.

2. Use lazy initialization so that startup isn't slowed down by the
search for the LICENSE file.

3. repr(license) actually returns the desired string, rather than
printing to stdout and returning ''.  (Why didn't we think of this
before?)

4. Use the pythonlabs license URL as the license fallback instead of
the CNRI license handle.
2000-10-03 17:11:37 +00:00
Thomas Wouters f2c1be22f2 On some systems (like Solaris), the master end of a tty/pty pair is
apparently not considered a terminal, and so isatty(3) returns false. So we
skip the test for ttyness of the master side and just check the slave side,
which should really be a terminal.
2000-10-03 16:51:08 +00:00
Fredrik Lundh 65d4bc616a Fixed negative lookahead/lookbehind. Closes bug #115618. 2000-10-03 16:29:23 +00:00
Guido van Rossum 5191463276 Undo Ping's change.
CGI scripts should *not* use /usr/bin/env, since on systems that don't
come standard with Python installed, Python isn't on the default $PATH.

Too bad that this breaks on Linux, where Python is in /usr/bin which
is on the default path -- the point is that you must manually edit
your CGI scripts when you install them.
2000-10-03 13:51:09 +00:00
Ka-Ping Yee 099e534fa4 Change first line to #!/usr/bin/env python (really just to test check-in). 2000-10-03 08:32:00 +00:00
Greg Ward da175f4bdd Bump version to 1.0. 2000-10-03 03:48:43 +00:00
Greg Ward 25a309c0a9 Remove some debugging prints. 2000-10-03 03:32:37 +00:00
Greg Ward a9d37835ad Fixed so --no-compile is a negative alias for --compile. 2000-10-03 03:31:52 +00:00
Greg Ward 9216cfe7ba Added a long-winded comment (and commented-out comment to go with out)
about how it would be nice to write absolute paths to the temporary
byte-compilation script, but this doesn't work because it screws up the
trailing-slash trickery done to 'prefix' in build_py's 'byte_compile()'
method.

Fixed to use 'execute()' instead of 'os.remove()' to remove the temporary
script: now it doesn't blow up in dry-run mode!
2000-10-03 03:31:05 +00:00
Jeremy Hylton d52755f41c Provide a clearer error message when urlopen fails because of an
invalid proxy setting.

Minor change to call of unknown_url; always pass data argument
explicitly since data defaults to None.

PEP 42: Add as a feature that urllib handle proxy setting that contain
only the host and port of the proxy.
2000-10-02 23:04:02 +00:00
Fred Drake d254c0095c Remove redundent information from a docstring. 2000-10-02 22:11:47 +00:00
Fred Drake 484d735f1e Delay import of py_compile until needed, since is is only used by the
PyZipFile class.

End sentences in docstrings with periods.

Reformat docstrings to be more similar to those of other modules.
2000-10-02 21:14:52 +00:00
Fred Drake 3944a01713 Do not set Konquerer to be the default browser if $KDEDIR is set -- some
Linux distributions which provide both KDE and Gnome set this environment
variable even if the user is not using KDE.  We do *not* want to start
Konquerer if KDE is not running unless the user actually tells us to!
2000-10-02 03:40:51 +00:00
Greg Ward 0295181fa6 Typo fix. 2000-10-02 02:25:51 +00:00