summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Add sha and _sre to the list of allowed built-in modules.Fred Drake2001-06-221-1/+1
|
* Teach the UNPACK_SEQUENCE opcode how to tease an iterable object intoTim Peters2001-06-211-0/+53
| | | | | giving up the goods. NEEDS DOC CHANGES
* Add a bunch of sample strings to test soft line breaks of varying endBarry Warsaw2001-06-191-1/+28
| | | | cases.
* encode(): Fixed the handling of soft line breaks for lines over 76Barry Warsaw2001-06-191-14/+12
| | | | | characters in length. Remember that when calculating the soft breaks, the trailing `=' sign counts against the max length!
* - _filename_to_abs() didn't cater for .. components in the pathname. Fixed.Jack Jansen2001-06-191-1/+14
| | | | | - compile() didn't return a (empty) list of objects. Fixed. - the various _fix_xxx_args() methods weren't called (are they new or did I overlook them?). Fixed.
* The test used int(time.time()) to get a random number, but this doesn't work ↵Jack Jansen2001-06-191-1/+1
| | | | on the mac (where times are bigger than ints). Changed to int(time.time()%1000000).
* An import MacOS was missing after the code-rearranging. Added.Jack Jansen2001-06-191-0/+1
|
* Test by Martin v. Loewis for the new UTF-16 codec handling of BOMMarc-André Lemburg2001-06-191-0/+25
| | | | marks.
* This patch by Martin v. Loewis changes the UTF-16 codec to onlyMarc-André Lemburg2001-06-191-3/+33
| | | | | | | | | | | write a BOM at the start of the stream and also to only read it as BOM at the start of a stream. Subsequent reading/writing of BOMs will read/write the BOM as ZWNBSP character. This is in sync with the Unicode specifications. Note that UTF-16 files will now *have* to start with a BOM mark in order to be readable by the codec.
* Fixed -D emulation for symbols with a value, as specified with the ↵Just van Rossum2001-06-191-1/+1
| | | | define_macros Extension argument.
* A unittest-based test for the quopri module.Barry Warsaw2001-06-191-0/+112
|
* Better support for RFC 1521 quoted-printable specification, along withBarry Warsaw2001-06-191-25/+77
| | | | | | | | | | | | | | | | | | | | | | addition of interface for consistency with base64 module. Namely, encodestring(), decodestring(): New functions which accept a string object and return a string object. They just wrap the string in StringIOs and pass them to the encode() and decode() methods respectively. encodestring() accepts a default argument of quotetabs, defaulting to zero, which is passed on straight through to encode(). encode(): Fix the bug where an extra newline would always be added to the output, which prevented an idempotent roundtrip through encode->decode. Now, if the source string doesn't end in a newline, then the result string won't end in a newline. Also, extend the quotetabs argument semantics to include quoting embedded strings, which is also optional according to the RFC. test() -> main() "from quopri import *" also imports encodestring() and decodestring().
* Updated keyword.py for "yield".Tim Peters2001-06-191-0/+1
|
* Somebody checked this in w/ an ambiguous tab/space mix (reported byTim Peters2001-06-181-5/+5
| | | | Mark Favas).
* Added "i" and "l" to the list of std-mode struct codes that don't range-Tim Peters2001-06-181-1/+4
| | | | | check correctly on pack(). While these were checking OK on my 32-bit box, Mark Favas reported failures on a 64-bit box (alas, easy to believe).
* Merging the gen-branch into the main line, at Guido's direction. Yay!Tim Peters2001-06-184-113/+49
| | | | | Bugfix candidate in inspect.py: it was referencing "self" outside of a method.
* SF bug 434186: 0x80000000/2 != 0x80000000>>1Tim Peters2001-06-181-0/+7
| | | | | | | | | i_divmod: New and simpler algorithm. Old one returned gibberish on most boxes when the numerator was -sys.maxint-1. Oddly enough, it worked in the release (not debug) build on Windows, because the compiler optimized away some tricky sign manipulations that were incorrect in this case. Makes you wonder <wink> ... Bugfix candidate.
* Fix SF bug #433904 (Alex Martelli) - all s_* methods return None only.Guido van Rossum2001-06-181-6/+7
|
* Patch #413171: Implement get, setdefault, update in terms ofMartin v. Löwis2001-06-181-5/+7
| | | | has_key, __getitem__, and __setitem__.
* SF patch #433619, by Michel Pelletier:Guido van Rossum2001-06-171-0/+7
| | | | | | | | | Summary: NAMESPACE support in imaplib.py Initial Comment: Support for the IMAP NAMESPACE extension defined in rfc 2342. This is almost a necessity for working with modern IMAP servers.
* Synchronize with 1.13 of PyXML:Martin v. Löwis2001-06-171-6/+28
| | | | | | Allow application to set a new content handler and lex_prop handler during parsing. Closes bug #433761. Small hack to make expat be ignored in Jython.
* Generalize the new qQ std-mode tests to all int codes (bBhHiIlLqQ).Tim Peters2001-06-131-158/+202
| | | | | | | | Unfortunately, the std-mode bBhHIL codes don't do any range-checking; if and when some of those get fixed, remove their letters from the IntTester.BUGGY_RANGE_CHECK string. In the meantime, a msg saying that range-tests are getting skipped is printed to stdout whenever one is skipped.
* The new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.Tim Peters2001-06-131-0/+6
| | | | Repaired that, and added appropriate tests for it to test_struct.py.
* Add new built-in 'help' which invokes pydoc.help (with a twist).Guido van Rossum2001-06-121-0/+14
|
* Added q/Q standard (x-platform 8-byte ints) mode in struct module.Tim Peters2001-06-121-6/+165
| | | | | | | | | | | | | | This completes the q/Q project. longobject.c _PyLong_AsByteArray: The original code had a gross bug: the most-significant Python digit doesn't necessarily have SHIFT significant bits, and you really need to count how many copies of the sign bit it has else spurious overflow errors result. test_struct.py: This now does exhaustive std q/Q testing at, and on both sides of, all relevant power-of-2 boundaries, both positive and negative. NEWS: Added brief dict news while I was at it.
* Renamed some stuff to tell the truth about what it does.Tim Peters2001-06-101-4/+4
|
* Initial support for 'q' and 'Q' struct format codes: for now, only inTim Peters2001-06-101-10/+47
| | | | | | | | | | | | | | | | | | native mode, and only when config #defines HAVE_LONG_LONG. Standard mode will eventually treat them as 8-byte ints across all platforms, but that likely requires a new set of routines in longobject.c first (while sizeof(long) >= 4 is guaranteed by C, there's nothing in C we can rely on x-platform to hold 8 bytes of int, so we'll have to roll our own; I'm thinking of a simple pair of conversion functions, Python long to/from sized vector of unsigned bytes; that may be useful for GMP conversions too; std q/Q would call them with size fixed at 8). test_struct.py: In addition to adding some native-mode 'q' and 'Q' tests, got rid of unused code, and repaired a non-portable assumption about native sizeof(short) (it isn't 2 on some Cray boxes). libstruct.tex: In addition to adding a bit of 'q'/'Q' docs (more needed later), removed an erroneous footnote about 'I' behavior.
* SF bug 431772: traceback.print_exc() causes tracebackTim Peters2001-06-101-13/+14
| | | | | | | Patch from Michael Hundson. format_exception_only() blew up when trying to report a SyntaxError from a string input (line is None in this case, but it assumed a string). Bugfix candidate.
* SF bug 430991: wrong co_lnotabTim Peters2001-06-091-17/+14
| | | | | | | | | Armin Rigo pointed out that the way the line-# table got built didn't work for lines generating more than 255 bytes of bytecode. Fixed as he suggested, plus corresponding changes to pyassem.py, plus added some long overdue docs about this subtle table to compile.c. Bugfix candidate (line numbers may be off in tracebacks under -O).
* Patch #424475: Speed-up tp_compare usage, by special-casing the commonMartin v. Löwis2001-06-091-1/+1
| | | | | | case of objects with equal types which support tp_compare. Give type objects a tp_compare function. Also add c<0 tests before a few PyErr_Occurred tests.
* Performance improvements to the profiler:Fred Drake2001-06-081-57/+93
| | | | | | | | | | | | | | | | | Ensure that all the default timers are called as functions, not an expensive method wrapper around a variety of different functions. Agressively avoid dictionary lookups. Modify the dispatch scheme (Profile.trace_dispatch_*(), where * is not 'call', 'exception' or 'return') so that the callables dispatched to are simple functions and not bound methods -- this reduces the number of layers of Python call machinery that gets touched. Remove a couple of duplicate imports from the "if __name__ == ..." section. This closes SF patch #430948.
* Patch #429957: Add support for cp1140, which is identical to cp037,Martin v. Löwis2001-06-072-0/+50
| | | | | with the addition of the euro character. Also added a few EDBDIC aliases.
* check in for patch #430846Peter Schneider-Kamp2001-06-071-10/+6
| | | | | use faster code for base64.encodestring (courtesy of Mr. Tim Peters) and for base64.decodestring (courtesy of Anthony Baxter)
* Previous check-in was by mistake, undo it.Martin v. Löwis2001-06-071-1/+3
|
* Patch #416220: Fix misplaced paren.Martin v. Löwis2001-06-072-4/+2
|
* Patch #409973: Speedup glob.glob, add fnmatch.filter.Martin v. Löwis2001-06-062-7/+26
|
* Fix bug #422702: Make flag argument to open optional, and document it that way.Martin v. Löwis2001-06-051-1/+1
|
* Add .pyo as an extension, fixes bug #416462. Also restore alphabetic order.Martin v. Löwis2001-06-051-1/+2
|
* Convert the parser module test to use PyUnit.Fred Drake2001-06-042-300/+212
|
* Add some useful Windows encodings - patch #423221.Mark Hammond2001-06-041-0/+5
|
* Implement testGetElementsByTagNameNS.Martin v. Löwis2001-06-032-1/+9
|
* Fix getElementsByTagNameNS:Martin v. Löwis2001-06-031-3/+7
| | | | | - actually return a result - Compare with tag.localName in getElementsByTagNameNSHelper
* lookdict: stop more insane core-dump mutating comparison cases. ShouldTim Peters2001-06-031-0/+68
| | | | | | | be possible to provoke unbounded recursion now, but leaving that to someone else to provoke and repair. Bugfix candidate -- although this is getting harder to backstitch, and the cases it's protecting against are mondo contrived.
* Fix comment.Tim Peters2001-06-021-1/+1
|
* Coredumpers from Michael Hudson, mutating dicts while printing orTim Peters2001-06-021-1/+65
| | | | | converting to string. Critical bugfix candidate -- if you take this seriously <wink>.
* more public symbols for __all__Skip Montanaro2001-06-011-1/+6
|
* This division test was too stringent in its accuracy expectations forTim Peters2001-05-291-4/+4
| | | | | | | random inputs: if you ran the test 100 times, you could expect it to report a bogus failure. So loosened its expectations. Also changed the way failing tests are printed, so that when run under regrtest.py we get enough info to reproduce the failure.
* BadDictKey test: The output file expected "raising error" to be printedTim Peters2001-05-291-1/+10
| | | | | | | | | | | exactly once. But the test code can't know that, as the number of times __cmp__ is called depends on internal details of the dict implementation. This is especially nasty because the __hash__ method returns the address of the class object, so the hash codes seen by the dict can vary across runs, causing the dict to use a different probe order across runs. I just happened to see this test fail about 1 run in 7 today, but only under a release build and when passing -O to Python. So, changed the test to be predictable across runs.
* runtest(): When generating output, if the result is a single line with theFred Drake2001-05-291-1/+19
| | | | | | name of the test, only write the output file if it already exists (and tell the user to consider removing it). This avoids the generation of unnecessary turds.
* The one-line output files are no longer needed, so do not keep them.Fred Drake2001-05-291-1/+0
|