Commit Graph

3548 Commits

Author SHA1 Message Date
Lars Gustäbel d2f5a9ac4b Fixed a bug that caused namespace names to be reported as lists rather
than tuples.
2000-10-19 07:36:29 +00:00
Fred Drake f7ef15d6ec Use test_support.TESTFN as the temporary filename.
Fix a minor stylistic nit.

This closes SourceForge bug #117032.
2000-10-18 01:21:38 +00:00
Jeremy Hylton e21670553e the usual (part II) 2000-10-16 17:42:40 +00:00
Tim Peters 98c8184f2f Test for math.* exceptional behavior only in verbose mode, so that the
oddball platforms (where, e.g., math.exp(+huge) still fails to raise
OverflowError) don't fail the std test suite when run normally.
2000-10-16 17:35:13 +00:00
Jeremy Hylton a8268e9457 the usual 2000-10-16 17:33:50 +00:00
Barry Warsaw 75f8101c42 find(): Application of (slightly modified) SF patch #101928 by Ulf
Betlehem, verified by Peter Funk.  Fixes preservation of language
search order lost due to use of dictionary keys instead of a list.
Closes SF bug #116964.
2000-10-16 15:47:50 +00:00
Greg Ward 0eb75b42cd Bump version to 1.0.1. 2000-10-15 19:20:20 +00:00
Lars Gustäbel 55b4efd034 Fixed minor problem with reset(). 2000-10-14 10:28:01 +00:00
Greg Ward 047c3723d0 Removed debugging code at bottom. 2000-10-14 04:07:39 +00:00
Greg Ward fa9ff76aae Untabified. 2000-10-14 04:06:40 +00:00
Greg Ward 4cd6f2ab80 Bastian Kleineidam: make 'check_lib()' more like AC_CHECK_LIB by adding
an 'other_libraries()' parameter.
2000-10-14 03:56:42 +00:00
Greg Ward 0b4dafc39b Lyle Johnson: use 'normcase()' in addition to 'normpath()' when testing if
we actually installed modules to a directory in sys.path.
2000-10-14 03:47:07 +00:00
Greg Ward 2e38a50db1 Bastian Kleineidam: fix up any supplied command-line options. 2000-10-14 03:40:20 +00:00
Jeremy Hylton 9c048f9f65 Now supports entire Python 2.0 language and still supports Python
1.5.2.  The compiler generates code for the version of the interpreter
it is run under.

ast.py:
    Print and Printnl add dest attr for extended print
    new node AugAssign for augmented assignments
    new nodes ListComp, ListCompFor, and ListCompIf for list
        comprehensions

pyassem.py:
    add work around for string-Unicode comparison raising UnicodeError
        on comparison of two objects in code object's const table

pycodegen.py:
    define VERSION, the Python major version number
    get magic number using imp.get_magic() instead of hard coding
    implement list comprehensions, extended print, and augmented
        assignment; augmented assignment uses Delegator classes (see
        doc string)
    fix import and tuple unpacking for 1.5.2

transformer.py:
    various changes to support new 2.0 grammar and old 1.5 grammar
    add debug_tree helper than converts and symbol and token numbers
    to their names
2000-10-13 21:58:13 +00:00
Lars Gustäbel 5bad5a4be2 Updated test suite to latest pulldom changes. 2000-10-13 20:54:10 +00:00
Lars Gustäbel ec964d5b21 Moved appendChild calls back to DOMEventStream.
Added SAX2DOM class.
2000-10-13 20:53:27 +00:00
Paul Prescod 4221ff0ee1 Clear siblings, now that they are being set. 2000-10-13 20:11:42 +00:00
Neil Schemenauer 8a00abc0ff Make the regrtest.py -l (findleaks) option considerably less obnoxious.
First, only report garbage that the GC cannot free.  Second, only report
the number of objects found, not their repr().  People can dig deeper on
their own if they find a leak.
2000-10-13 01:32:42 +00:00
Jeremy Hylton 4e1be72e6b Fix SF bug #116263: support for from .. import *
transformer.py: return '*', None from com_import_as_name
pycodegen.py: special case for name == '*'
pyassem.py: fix stack counting for IMPORT_ opcodes
2000-10-12 20:23:23 +00:00
Jeremy Hylton 110941a4ba If the status line is invalid, assume it is a pre-1.0 response. The
msg/headers are empty and the entire response is treated as the body.
2000-10-12 19:58:36 +00:00
Thomas Heller 20d529be26 Recreated after installer source code changes.
This should close SF bug (patch)
http://sourceforge.net/patch/?func=detailpatch&patch_id=101844&group_id=5470
2000-10-12 19:31:13 +00:00
Jeremy Hylton 73574eefe5 two fixes for redirects:
- don't close the fp, since that appears to also close the socket
    - join the original url with the redirect reponse to deal with
      relative redirect URL

wrap two socket ops in try/except to turn them into URLErrors, so that
client code need only catch one exception.

in HTTPError.__del__ only close fp if fp is not None

style changes:
    - use f(*args) instead of apply(f, args)
    - use __super_init instead of super.__init__(self, ...)
2000-10-12 18:54:18 +00:00
Jeremy Hylton 3b0c600394 cosmetic changes only:
use standard Python style for whitespace near = and ()
2000-10-12 17:31:36 +00:00
Guido van Rossum 22d5895dc3 Added a test for the StringIO write() error I just fixed. 2000-10-12 16:46:28 +00:00
Guido van Rossum b636dc67ed [ Bug #116636 ] Bug in StringIO.write()
http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470
bobalex@rsv.ricoh.com

Bug report: If the file position is less than the end of the "file",
and a write is performed extending past then end of the file, the data
string is corrupted.

Solution: in write(), when writing past the end, properly set self.len
when newpos is > self.len.
2000-10-12 16:45:37 +00:00
Guido van Rossum 2e2a70abe4 Anonymous patch to add Darwin 1.2 to the list of BSDs.
Let's hope this is correct (I'm not sure why the sys.platform would be
'Darwin1.2' rather than 'darwin1', which seems to be the convention).

Someone with Darwin please test this!
2000-10-12 16:01:55 +00:00
Barry Warsaw 0157e7aa3e Added some single tuple/list unpacking for JPython regression testing. 2000-10-12 14:45:58 +00:00
Tim Peters cb5b5bac11 A Mystery: I somehow managed to delete the last two lines of my test_math.py
changes.  Here restoring them.
2000-10-12 07:15:55 +00:00
Tim Peters 1d120619d4 Stop raising OverflowError on underflows reported by libm (errno==ERANGE and
libm result is 0).  Cautiously add a few libm exception test cases:
1. That exp(-huge) returns 0 without exception.
2. That exp(+huge) triggers OverflowError.
3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked
   with -lieee, it was raising OverflowError due to an accident of the way
   mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
2000-10-12 06:10:25 +00:00
Lars Gustäbel f27f5ab31f Added additional test cases for pulldom modifications. 2000-10-11 22:36:00 +00:00
Lars Gustäbel bc1b5c81a5 Added parent attribute with getters and setters on XMLFilterBase. 2000-10-11 22:35:00 +00:00
Lars Gustäbel d178ba666b Added non-ns start and end element methods.
Moved appendChild calls from DOMEventStream to PullDOM (parser indep).
Removed duplicated sibling pointer setting (duplicated in appendChild).
2000-10-11 22:34:04 +00:00
Fred Drake cb953d72d2 Test the exception-raising for error cases in copy_reg. 2000-10-11 22:17:35 +00:00
Fred Drake 78a6a36964 In the module docstring, clarify that this is used to register pickle
support for extension types, not classes.

pickle():  If the type is a class or if the reduction function is not
           callable, raise a TypeError.

constructor():  If the constructor is not callable, raise TypeError.

This (partially) closes SourceForge patch #101859.
2000-10-11 22:16:45 +00:00
Guido van Rossum 4bbea05c4e Jack Jansen reported that the regression test failed on the Mac where
string.letters was much more than expected.

Solution: explicit is better than implicit; don't rely on
string.letters.
2000-10-11 21:34:53 +00:00
Barry Warsaw 7e3e1c1ece Added test cases for extended printing to an instance. This picked up
a bug in JPython where the instance had to have a flush() method.
2000-10-11 21:26:03 +00:00
Tim Peters cfc4178e84 When the classes in wave.py opened files themselves, their .close() methods
didn't bother to close the files.  This caused the new test_wave test to fail
under Windows, as Windows won't let you delete a file that's open.  Fixed
that by ensuring the wave read & write classes' .close() and __del__ methods
close files that were opened by their constructors.
2000-10-09 23:43:55 +00:00
Guido van Rossum e8d2f5589b The usual. 2000-10-09 22:14:43 +00:00
Guido van Rossum 16b198e10e wave test output 2000-10-09 20:06:50 +00:00
Guido van Rossum a00afc1ead Simple test suite for wave.py by Jean-Claude Rimbault (with some
changes to avoid using assert).
2000-10-09 20:05:59 +00:00
Fred Drake 13a3069c2b Paul Prescod <paul@prescod.net>:
Correct the chaining between siblings.
2000-10-09 20:04:16 +00:00
Guido van Rossum eca576c68b Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was
never written properly because the '4' length indicators for the 's'
format characters were missing.
2000-10-09 20:01:53 +00:00
Fred Drake ebe73025cd Move the test for confirmation that all nodes have been freed into the
driver code, so that each test gets this; it had been done inconsistently.
Remove the lines that set the variables holding dom objects to None; not
needed since the interpreter cleans up locals on function return.
2000-10-09 19:57:39 +00:00
Guido van Rossum 95d53d2bf5 Use python$EXE instead of python, for Darwin. (Patch by Tony
Lownds. (#101816)

[Note: I'm not sure that this is really the right fix.  Surely Darwin
doesn't require you to say "python.exe" everywhere???  Even Windows
doesn't!  Or am I misunderstanding the point?]
2000-10-09 19:34:12 +00:00
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