summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Template: remove __slots__ since that interferes with the ability to mix inBarry Warsaw2004-09-101-1/+0
| | | | Template and unicode classes.
* Typo fix: 'comparisions' is not a wordAndrew M. Kuchling2004-09-101-1/+1
|
* Patch #808120: Add --force-arch=ARCH to bdist_rpm.py.Martin v. Löwis2004-09-101-3/+12
|
* Patch #808115: Add script support to bdist_rpm.py.Martin v. Löwis2004-09-101-0/+25
|
* __slots__ went missing from Template.Raymond Hettinger2004-09-101-0/+1
|
* Many updates to PEP 292 templates. Summary:Barry Warsaw2004-09-102-63/+136
| | | | | | | | | | | | | | | | | - Template no longer inherits from unicode. - SafeTemplate is removed. Now Templates have both a substitute() and a safe_substitute() method, so we don't need separate classes. No more __mod__() operator. - Adopt Tim Peter's idea for giving Template a metaclass, which makes the delimiter, the identifier pattern, or the entire pattern easy to override and document, while retaining efficiency of class-time compilation of the regexp. - More informative ValueError messages which will help a user narrow down the bogus delimiter to the line and column in the original string (helpful for long triple quoted strings).
* clean up the API a little; exceptions are defined by this moduleFred Drake2004-09-091-5/+13
| | | | (needs documentation)
* add name that should be considered public to __all__Fred Drake2004-09-091-1/+1
|
* remove unnecessary override of base class methodFred Drake2004-09-081-13/+0
|
* add tests that make sure buffer boundaries are handled properly for SGML ↵Fred Drake2004-09-082-0/+26
| | | | | | comments (see SF patch #901369)
* Remove usage of locale.getlocale in favor or setlocale(LC_NUMERIC, None) .Brett Cannon2004-09-081-3/+9
| | | | | | | Also added a comment about why the code is bother to see what setlocale thinks the set locale is. Closes bug #1023798.
* SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now supportWalter Dörwald2004-09-076-116/+235
| | | | | | | | | | | decoding incomplete input (when the input stream is temporarily exhausted). codecs.StreamReader now implements buffering, which enables proper readline support for the UTF-16 decoders. codecs.StreamReader.read() has a new argument chars which specifies the number of characters to return. codecs.StreamReader.readline() and codecs.StreamReader.readlines() have a new argument keepends. Trailing "\n"s will be stripped from the lines if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and PyUnicode_DecodeUTF16Stateful.
* Remove debugging print (not triggered by test suite) and add XXX comment ↵Jeremy Hylton2004-09-071-1/+1
| | | | about how the code should raise a SyntaxError.
* compiler.transformer: correct lineno attribute when possibleJeremy Hylton2004-09-074-408/+376
| | | | | | | | | | | | | | | | SF patch #1015989 The basic idea of this patch is to compute lineno attributes for all AST nodes. The actual implementation lead to a lot of restructing and code cleanup. The generated AST nodes now have an optional lineno argument to constructor. Remove the top-level asList(), since it didn't seem to serve any purpose. Add an __iter__ to ast nodes. Use isinstance() instead of explicit type tests. Change transformer to use the new lineno attribute, which replaces three lines of code with one. Use universal newlines so that we can get rid of special-case code for line endings. Use lookup_node() in a few more frequently called, but simple com_xxx methods(). Change string exception to class exception.
* Ported test__locale to unittest.Brett Cannon2004-09-061-26/+34
|
* SF #1022953: binascii.a2b_hqx("") raises SystemErrorRaymond Hettinger2004-09-061-0/+10
| | | | | | | | | | | | | Several functions adopted the strategy of altering a full lengthed string copy and resizing afterwards. That would fail if the initial string was short enough (0 or 1) to be interned. Interning precluded the subsequent resizing operation. The solution was to make sure the initial string was at least two characters long. Added tests to verify that all binascii functions do not crater when given an empty string argument.
* Fix erroneous docstring comment.Raymond Hettinger2004-09-061-2/+3
|
* Fulfill Martin's request to use try/except rather than a "look beforeRaymond Hettinger2004-09-052-18/+13
| | | | you leap" approach. Makes the early call to os.urandom() unnecessary.
* Teach a test about the different kinds of functions.Raymond Hettinger2004-09-041-2/+2
|
* SF bug #1022010: Import random failsRaymond Hettinger2004-09-041-3/+6
| | | | | * Complete the previous patch by making sure that the MachineRandom tests are only run when the underlying resource is available.
* Change the strategy for coping with time intensive tests fromRaymond Hettinger2004-09-042-8/+17
| | | | | | | | "all or none" to "all or some". This provides much greater test coverage without eating much time. It also makes it more likely that routine regression testing will unearth bugs.
* Added IGNORE_EXCEPTION_DETAIL comparison option. The need is explainedTim Peters2004-09-042-32/+84
| | | | | | | | in the new docs. DocTestRunner.__run: Separate the determination of the example outcome from reporting that outcome, to squash brittle code duplication and excessive nesting.
* Added a couple names to __all__.Tim Peters2004-09-041-0/+2
|
* Minor aesthetic change in sre_parse.py, as suggested by Mike Coleman.Gustavo Niemeyer2004-09-031-2/+2
|
* SF bug #1022010: Import random failsRaymond Hettinger2004-09-031-1/+2
| | | | | * trap NotImplementedError raised by os.urandom calls when not available on a particular system.
* Fixing bug #817234, which made SRE get into an infinite loop onGustavo Niemeyer2004-09-031-0/+16
| | | | | empty final matches with finditer(). New test cases included for this bug and for #581080.
* Applying modified version of patch #1018386, which fixesGustavo Niemeyer2004-09-032-42/+89
| | | | some escaping bugs in SRE.
* [Bug #1011606] Only check file descriptors for exceptional conditions if the ↵Andrew M. Kuchling2004-09-011-4/+10
| | | | fd is readable or writable
* Whitespace normalization.Tim Peters2004-09-013-5/+5
|
* Missed some occurrences of test_mpzAndrew M. Kuchling2004-08-311-3/+0
|
* Remove test output for rotor, xreadlineAndrew M. Kuchling2004-08-312-9/+0
|
* Remove rotor, xreadlines modulesAndrew M. Kuchling2004-08-311-2/+2
|
* Remove test for mpzAndrew M. Kuchling2004-08-311-89/+0
|
* Remove tests for mpz, rotor, xreadlinesAndrew M. Kuchling2004-08-313-84/+0
|
* Remove TERMIOS moduleAndrew M. Kuchling2004-08-311-14/+0
|
* Use multi-line importAndrew M. Kuchling2004-08-317-26/+26
|
* SF patch #1007189, multi-line imports, for instance:Anthony Baxter2004-08-316-83/+159
| | | | | "from blah import (foo, bar baz, bongo)"
* HardwareRandom: Go back to multiplying by 2**-BPF instead of usingTim Peters2004-08-311-2/+3
| | | | | | | | | | ldexp. Both methods are exact, and return the same results. Turns out multiplication is a few (but just a few) percent faster on my box. They're both significantly faster than using struct with a Q format to convert bytes to a 64-bit long (struct.unpack() appears to lose due to the tuple creation/teardown overhead), and calling _hexlify is significantly faster than doing bytes.encode('hex'). So we appear to have hit a local minimum (wrt speed) here.
* Take advantage of the math library's ldexp for assembling a float byRaymond Hettinger2004-08-311-5/+3
| | | | | | | components without division and without roundoff error for properly sized mantissas (i.e. on systems with 53 or more mantissa bits per float). Eliminates the previous implementation's rounding bias as aptly demonstrated by Tim Peters.
* Changed Karatsuba cutoff to match current reality.Tim Peters2004-08-301-1/+1
|
* The distinction between comparison flags and reporting flags isn't uniqueTim Peters2004-08-301-28/+19
| | | | | | | | | | | to unittest, so make it official: new module constants COMPARISON_FLAGS and REPORTING_FLAGS, which are bitmasks or'ing together the relevant individual option flags. set_unittest_reportflags(): Reworked to use REPORTING_FLAGS, and simplified overly complicated flag logic. class FakeModule: Removed this; neither documented nor used.
* Patch #934356: if a module defines __all__, believe that rather than usingJohannes Gijsbers2004-08-301-4/+12
| | | | heuristics for filtering out imported names.
* Whitespace normalization.Johannes Gijsbers2004-08-301-1/+1
|
* Patch #1003640: replace checkline() function parsing with new breakpoint logic:Johannes Gijsbers2004-08-302-45/+51
| | | | | | | | | | | | | 1) When a breakpoint is set via a function name: - the breakpoint gets the lineno of the def statement - a new funcname attribute is attached to the breakpoint 2) bdb.effective() calls new function checkfuncname() to handle: - def statement is executed: don't break. - a first executable line of a function with a breakpoint on the lineno of the def statement is reached: break. This fixes bugs 976878, 926369 and 875404. Thanks Ilya Sandler.
* Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists ↵Johannes Gijsbers2004-08-308-4/+44
| | | | in glob.glob.
* Teach the random module about os.urandom().Raymond Hettinger2004-08-302-8/+164
| | | | | * Use it for seeding when it is available. * Provide an alternate generator based on it.
* Whitespace normalization. test_difflib passes again.Tim Peters2004-08-293-101/+101
|
* Reverting whitespace normalization. test_difflib fails with it -- theTim Peters2004-08-292-47/+47
| | | | | test depends on invisible trailing whitespace in .py files. The author will have to repair that.
* Whitespace normalization.Tim Peters2004-08-294-52/+52
|
* Patch #727483: Add AUTH_TYPE and REMOTE_USER.Martin v. Löwis2004-08-291-2/+15
|