Commit Graph

30761 Commits

Author SHA1 Message Date
Andrew M. Kuchling 810b76aebe Remove rotor, xreadlines modules 2004-08-31 13:31:42 +00:00
Andrew M. Kuchling 7297da8a35 Remove test for mpz 2004-08-31 13:29:28 +00:00
Andrew M. Kuchling 163f800095 Remove tests for mpz, rotor, xreadlines 2004-08-31 13:29:03 +00:00
Andrew M. Kuchling 595ac8a6fc Remove rotor license 2004-08-31 13:24:08 +00:00
Andrew M. Kuchling ab459f71d6 Remove docs for xreadlines, mpz, rotor 2004-08-31 13:22:43 +00:00
Andrew M. Kuchling e723863ba1 Remove xreadlines reference 2004-08-31 13:21:07 +00:00
Andrew M. Kuchling f3f1c85858 Remove TERMIOS module 2004-08-31 13:06:16 +00:00
Andrew M. Kuchling a46fd8480f Remove TERMIOS docs 2004-08-31 13:05:59 +00:00
Andrew M. Kuchling e4133d8d67 Use correct constant; remove reference to TERMIOS.py 2004-08-31 13:05:36 +00:00
Andrew M. Kuchling e34c3bd621 Change from Raymond: use pos/neg instead of +/- 1; minor edits 2004-08-31 12:21:44 +00:00
Andrew M. Kuchling ab77822826 Describe non-recursive re 2004-08-31 12:07:43 +00:00
Andrew M. Kuchling b07aae28c5 Add bug/patch counts 2004-08-31 11:54:22 +00:00
Andrew M. Kuchling 33ad28b68d Use multi-line import 2004-08-31 11:38:12 +00:00
Andrew M. Kuchling 3294e9d2e7 Update versions and dates; add PEP 328 2004-08-31 11:26:23 +00:00
Vinay Sajip 17952b78e1 Updated doc for getLogger() 2004-08-31 10:21:51 +00:00
Anthony Baxter 1a4ddaecc7 SF patch #1007189, multi-line imports, for instance:
"from blah import (foo, bar
baz, bongo)"
2004-08-31 10:07:13 +00:00
Anthony Baxter 876032e570 onward and upward 2004-08-31 09:53:05 +00:00
Martin v. Löwis 89a0b7d93a Add patch for Tix 8.1.4. 2004-08-31 06:43:28 +00:00
Tim Peters 7c2a85b2d4 HardwareRandom: Go back to multiplying by 2**-BPF instead of using
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.
2004-08-31 02:19:55 +00:00
Raymond Hettinger 3fa19d7ff8 Take advantage of the math library's ldexp for assembling a float by
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.
2004-08-31 01:05:15 +00:00
Tim Peters daec961e09 Changed Karatsuba cutoff to match current reality. 2004-08-30 23:18:23 +00:00
Tim Peters 42cd14d04c More cmd.exe exploitation. 2004-08-30 22:13:22 +00:00
Tim Peters e2f6899fd6 Since it's impossible to build Python using VC7.1 on a command.com
system, exploit cmd.exe's setlocal function in this directory.
2004-08-30 21:27:55 +00:00
Tim Peters e82b00f14f Updated test-runner .bat for new location of Tcl/Tk.
Replaced outcomes from native Tcl/Tk tests.  Maybe the diffs are legit,
maybe not.  I noticed that the Tcl results I'm replacing here claimed
both that there were no failures, and that one file had tests with
failures, so I wasn't inclined to trust them <wink>.
2004-08-30 21:14:51 +00:00
Tim Peters d311538a93 win32_urandom(): There's no need to copy the generated byte string, so
don't.
2004-08-30 17:36:46 +00:00
Tim Peters 9b279a8df4 win32_urandom(): pass the function name to PyArg_ParseTuple, for better
error msgs.
2004-08-30 17:10:53 +00:00
Tim Peters 51eba6115d win32_urandom(): Raise ValueError if the argument is negative. 2004-08-30 17:08:02 +00:00
Tim Peters 4ad8217ae9 win32_urandom(): Rewrite to Python C standards (hard tabs, function name
in first column, no parens around return value).
2004-08-30 17:02:04 +00:00
Tim Peters 38330fe5ef The distinction between comparison flags and reporting flags isn't unique
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.
2004-08-30 16:19:24 +00:00
Johannes Gijsbers ed047486f5 Fix build error: \filename{/dev/urandom} -> \file{/dev/urandom}. 2004-08-30 15:03:23 +00:00
Johannes Gijsbers 5ae9743ea6 Bug #1014775: update NEWS.help for changes in docutils. 2004-08-30 14:33:25 +00:00
Johannes Gijsbers 343cb8a768 Bug #1014770: apply some rest-foo and fix some docutils errors. 2004-08-30 14:27:11 +00:00
Johannes Gijsbers 4c11f6088a Patch #934356: if a module defines __all__, believe that rather than using
heuristics for filtering out imported names.
2004-08-30 14:13:04 +00:00
Johannes Gijsbers d2a1aa4b1e Whitespace normalization. 2004-08-30 13:39:50 +00:00
Johannes Gijsbers 4a9faa1ea0 Patch #1003640: replace checkline() function parsing with new breakpoint logic:
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.
2004-08-30 13:29:44 +00:00
Andrew M. Kuchling cb7b3f30d6 Add items 2004-08-30 11:58:04 +00:00
Johannes Gijsbers ae882f7984 Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists in glob.glob. 2004-08-30 10:19:56 +00:00
Martin v. Löwis d3f61a2de6 Pickup Tk from tcltk directory. 2004-08-30 09:22:30 +00:00
Martin v. Löwis 6de2d4da7d Bump Tk version to 8.4.7. Build into tcltk directory. 2004-08-30 09:22:04 +00:00
Raymond Hettinger 356a4599ac Teach the random module about os.urandom().
* Use it for seeding when it is available.
* Provide an alternate generator based on it.
2004-08-30 06:14:31 +00:00
Tim Peters cd97da3b1d long_pow(): Fix more instances of leaks in error cases.
Bugfix candidate -- although long_pow() is so different now I doubt a
patch would apply to 2.3.
2004-08-30 02:58:59 +00:00
Tim Peters 47e52ee0c5 SF patch 936813: fast modular exponentiation
This checkin is adapted from part 2 (of 3) of Trevor Perrin's patch set.

BACKWARD INCOMPATIBILITY:  SHIFT must now be divisible by 5.  AFAIK,
nobody will care.  long_pow() could be complicated to worm around that,
if necessary.

long_pow():
  - BUGFIX:  This leaked the base and power when the power was negative
    (and so the computation delegated to float pow).
  - Instead of doing right-to-left exponentiation, do left-to-right.  This
    is more efficient for small bases, which is the common case.
  - In addition, if the exponent is large (more than FIVEARY_CUTOFF
    digits), precompute [a**i % c for i in range(32)], and go left to
    right 5 bits at a time.
l_divmod():
  - The signature changed so that callers who don't want the quotient,
    or don't want the remainder, can pass NULL in the slot they don't
    want.  This saves them from having to declare a vrbl for unwanted
    stuff, and remembering to decref it.
long_mod(), long_div(), long_classic_div():
  - Adjust to new l_divmod() signature, and simplified as a result.
2004-08-30 02:44:38 +00:00
Tim Peters 48bd7f3a71 Whitespace normalization. test_difflib passes again. 2004-08-29 22:38:38 +00:00
Tim Peters 0973b99e1c SF patch 936813: fast modular exponentiation
This checkin is adapted from part 1 (of 3) of Trevor Perrin's patch set.

x_mul()
  - sped a little by optimizing the C
  - sped a lot (~2X) if it's doing a square; note that long_pow() squares
    often
k_mul()
  - more cache-friendly now if it's doing a square
KARATSUBA_CUTOFF
  - boosted; gradeschool mult is quicker now, and it may have been too low
    for many platforms anyway
KARATSUBA_SQUARE_CUTOFF
  - new
  - since x_mul is a lot faster at squaring now, the point at which
    Karatsuba pays for squaring is much higher than for general mult
2004-08-29 22:16:50 +00:00
Tim Peters afb5f94217 Reverting whitespace normalization. test_difflib fails with it -- the
test depends on invisible trailing whitespace in .py files.  The author will
have to repair that.
2004-08-29 19:33:36 +00:00
Tim Peters 45e77c55ff Whitespace normalization. 2004-08-29 18:47:31 +00:00
Martin v. Löwis a28b3e6dfb Patch #727483: Add AUTH_TYPE and REMOTE_USER. 2004-08-29 16:53:26 +00:00
Martin v. Löwis 061f132898 Patch #973204: Use -rpath instead of -R on Irix and Tru64. 2004-08-29 16:40:55 +00:00
Martin v. Löwis e064b41f5a Patch #914575: difflib side by side diff support, diff.py s/b/s HTML option. 2004-08-29 16:34:40 +00:00
Martin v. Löwis 87fa785f0f Centralize WITH_TSC processing. 2004-08-29 15:51:52 +00:00