summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Patch by kragen@pobox.com: When tracing is turned on, lines shorterGuido van Rossum2001-01-011-0/+2
| | | | | than a pixel don't get drawn at all. If you're building long curves made of such lines, this is a bad thing.
* Added test case for legal DOM childrenAndrew M. Kuchling2000-12-312-2/+28
|
* Patch #102485 ] Check for legal children when adding children to a DOM nodeAndrew M. Kuchling2000-12-311-6/+30
|
* Christmas present to myself: changed regrtest in two ways:Tim Peters2000-12-301-4/+30
| | | | | | | | | | | | | 1. When running in verbose mode, if any test happens to pass, print a warning that the apparent success may be bogus (stdout isn't compared in verbose mode). Been fooled by that too often. 2. When a test fails because the expected stdout doesn't match the actual stdout, print as much of stdout as did match before the first failing write. Else we get failures of the form "expected 'a', got 'b'" and a glance at the expected output file shows 500 instances of 'a' -- no idea where it failed, and, as in #1, trying to run in verbose mode instead doesn't help because stdout isn't compared then.
* getopt used to sort the long option names, in an attempt to simplifyTim Peters2000-12-291-12/+2
| | | | | | | the logic. That resulted in a bug. My previous getopt checkin repaired the bug but left the sorting. The solution is significantly simpler if we don't bother sorting at all, so this checkin gets rid of the sort and the code that relied on it.
* Fred, THIS NEEDS DOCS! The function docstrings tell the tale.Tim Peters2000-12-293-4/+188
| | | | | | | | | | | | | Christmas present to myself: the bisect module didn't define what happened if the new element was already in the list. It so happens that it inserted the new element "to the right" of all equal elements. Since it wasn't defined, among other bad implications it was a mystery how to use bisect to determine whether an element was already in the list (I've seen code that *assumed* "to the right" without justification). Added new methods bisect_left and insort_left that insert "to the left" instead; made the old names bisect and insort aliases for the new names bisect_right and insort_right; beefed up docstrings to explain what these actually do; and added a std test for the bisect module.
* Merge with 1.8 of pulldom.py:Martin v. Löwis2000-12-281-1/+7
| | | | Use types.UnicodeType if available, not type(u"").
* Merge changes up to 1.10 from PyXML:Martin v. Löwis2000-12-281-1/+11
| | | | | | | - implement hasAttribute and hasAttributeNS (1.7) - Node.replaceChild(): Update the sibling nodes to point to newChild. Set the .nextSibling attribute on oldChild instead of adding a .newChild attribute (1.9).
* Make Traceback header conform to new traceback ("innermost last" ->Guido van Rossum2000-12-272-2/+2
| | | | "most recent call last").
* Fix for SF bugTim Peters2000-12-271-13/+30
| | | | | | https://sourceforge.net/bugs/?func=detailbug&bug_id=126863&group_id=5470 "getopt long option handling broken". Tossed the excruciating logic in long_has_args in favor of something obviously correct.
* Add test case for SF bugTim Peters2000-12-271-0/+9
| | | | https://sourceforge.net/bugs/?func=detailbug&bug_id=126863&group_id=5470
* Make isspace(chr(32)) return trueAndrew M. Kuchling2000-12-261-1/+1
|
* The "context" parameter to the ExternalEntityRefParameter exposes internalFred Drake2000-12-232-4/+44
| | | | | | | | | information from the Expat library that is not part of its public API. Do not print this information as the format of the string may (and will) change as Expat evolves. Add additional tests to make sure the ParserCreate() function raises the right exceptions on illegal parameters.
* The regression test for the regex module should not trip the deprecationFred Drake2000-12-231-0/+3
| | | | warning for that module, so suppress just that one warning.
* Remove superfluous semicolonsAndrew M. Kuchling2000-12-233-8/+8
|
* Wrapper for _curses_panel module; currently this adds nothing extraAndrew M. Kuchling2000-12-221-0/+9
| | | | beyond what's in _curses_panel
* Patch #102492, fixing bug #116677:Andrew M. Kuchling2000-12-202-10/+42
| | | | | | | | | | give minidom.py behaviour that complies with the DOM Level 1 REC, which says that when a node newChild is added to the tree, "if the newChild is already in the tree, it is first removed." pulldom.py is patched to use the public minidom interface instead of setting .parentNode itself. Possibly this reduces pulldom's efficiency; someone else will have to pronounce on that.
* Change expected message for ValueError, fixing bug #126400Andrew M. Kuchling2000-12-201-1/+1
|
* Add forgotten initialization. Fixes bug #120994, "Traceback withAndrew M. Kuchling2000-12-201-0/+1
| | | | DISTUTILS_DEBUG set"
* Adding a warning about the regsub module. This also disables furtherGuido van Rossum2000-12-191-0/+7
| | | | | warnings in this same module, to prevent getting a warning about importing regex (we *know* that it's obsolete :-).
* Be explicit about scheme_chars -- string.letters is locale dependentGuido van Rossum2000-12-191-20/+18
| | | | | | | | so we can't use it. While I'm at it, got rid of string module use. (Found several new hard special cases for a hypothetical conversion tool: from string import join, find, rfind; and a local assignment "find=string.find".)
* Use binary mode to open "wave" files.Guido van Rossum2000-12-191-2/+2
|
* Improve error messages for invalid warning arguments; don't raiseGuido van Rossum2000-12-191-4/+10
| | | | exceptions but always print a warning message.
* Make string.translate(s, table) work for Unicode s. Two things areGuido van Rossum2000-12-191-4/+11
| | | | | | | | | | | required to work around restrictions on the arguments of u.translate(): 1) don't pass the deletions argument if it's empty; 2) convert table to Unicode if s is Unicode. This fixes SF bug #124060.
* Test more split argument combinations:Guido van Rossum2000-12-191-0/+7
| | | | | | 1) multi-char separator 2) multi-char separator that only occurs at last position 3) all of the above with mixed Unicode and 8-bit-string arguments
* Test some Unicode pickling endcases.Guido van Rossum2000-12-191-0/+12
|
* Minimal fix for the complaints about pickling Unicode objects. (SFGuido van Rossum2000-12-191-0/+2
| | | | | | | | | | | | | | bugs #126161 and 123634). The solution doesn't use the unicode-escape encoding; that has other problems (it seems not 100% reversible). Rather, it transforms the input Unicode object slightly before encoding it using raw-unicode-escape, so that the decoding will reconstruct the original string: backslash and newline characters are translated into their \uXXXX counterparts. This is backwards incompatible for strings containing backslashes, but for some of those strings, the pickling was already broken.
* gdbm.open() no longer accepts garbage in the flags string. Fix the tests.Neil Schemenauer2000-12-181-2/+7
|
* Do not assume that types.UnicodeType exists; we might be running in an oldFred Drake2000-12-161-1/+5
| | | | version of Python. ;-(
* Use the string module instead of string methods; this should still workFred Drake2000-12-161-1/+3
| | | | with Python 1.5.2 for now.
* Typo caught by /F -- thanks!Fred Drake2000-12-151-1/+1
|
* Python part of the warnings subsystem.Guido van Rossum2000-12-151-0/+227
|
* Before calling traceback.print_exc(), call sys.stdout.flush(). This makesFred Drake2000-12-151-0/+1
| | | | it much easier to see where things went wrong.
* DOMException.__init__(): Remember to pass self to Exception.__init__().Fred Drake2000-12-151-1/+1
|
* Comment out a debugging print statement that triggered a complaint inGuido van Rossum2000-12-151-1/+1
| | | | c.l.py.
* Get rid of string functions.Guido van Rossum2000-12-151-15/+14
|
* Get rid of string functions. References to string.whitespace,Guido van Rossum2000-12-151-63/+57
| | | | string.digits are left.
* Get rid of string functions.Guido van Rossum2000-12-151-14/+12
| | | | | There should really be a little tool to help with this -- it's rather tedious and there are lots of special cases!
* Get rid of string functions, except maketrans() (which is *not*Guido van Rossum2000-12-151-42/+45
| | | | | | | | | obsolete!). Fix a bug in ftpwrapper.retrfile() where somehow ftplib.error_perm was assumed to be a string. (The fix applies str().) Also break some long lines and change the output from test() slightly.
* Add test case for error message raised by bad % format characterAndrew M. Kuchling2000-12-151-0/+25
| | | | (Oh, look, it adds another little utility function for testing)
* Update the test suite to cover more ground.Fred Drake2000-12-142-0/+9
| | | | This closes patch #102477.
* Lots of small bug fixes and DOM API conformance improvements:Fred Drake2000-12-141-49/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make Node inherit from xml.dom.Node to pick up the NodeType values defined by the W3C recommendation. When raising AttributeError, be sure to provide the name of the attribute that does not exist. Node.normalize(): Make sure we do not allow an empty text node to survive as the first child; update the sibling links properly. _getElementsByTagNameNSHelper(): Make recursive calls using the right number of parameters. Attr.__setattr__(): Be sure to update name and nodeName at the same time since they are synonyms for this node type. AttributeList: Renamed to NamedNodeMap (AttributeList maintained as an alias). Compute the length attribute dynamically to allow the underlying structures to mutate. AttributeList.item(): Call .keys() on the dictionary rather than using self.keys() for performance. AttributeList.setNamedItem(), .setNamedItemNS(): Added methods. Text.splitText(): Added method. DocumentType: Added implementation class. DOMImplementation: Added implementation class. Document.appendChild(): Do not allow a second document element to be added. Document.documentElement: Find this dynamically, so that one can be removed and another added. Document.unlink(): Clear the doctype attribute. _get_StringIO(): Only use the StringIO module; cStringIO does not support Unicode.
* Adjust PullDOM to use a DOMImplementation instance to create new DocumentFred Drake2000-12-141-26/+37
| | | | | | | | | objects; uses minidom if one is not provided to the constructor. parse(): Pick up the default_bufsize default value dynamically so that the value in the module may be (meaningfully) changed at runtime. This (partially) closes patch #102477.
* When raising KeyError, provide the key value that failed.Fred Drake2000-12-131-4/+4
|
* Changing allow_reuse_address's default value, and documenting it.Moshe Zadka2000-12-131-1/+1
|
* Untabify! (Barry, this is gonna cost you a bottle of wine! ;)Fred Drake2000-12-131-105/+105
|
* Get rid of string module and string exceptions.Guido van Rossum2000-12-131-7/+10
|
* Add code to DOMException to ensure it cannot be instantiated directly,Fred Drake2000-12-131-1/+8
| | | | | since the API documentation will state specifically that the specializations must be used by the DOM implementations.
* Add standard DOM exception hierarchy.Martin v. Löwis2000-12-131-0/+68
|
* Update the code to better reflect recommended style:Fred Drake2000-12-1236-99/+101
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.