]> granicus.if.org Git - python/log
python
16 years agoRevert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.
Neal Norwitz [Fri, 28 Mar 2008 04:58:51 +0000 (04:58 +0000)]
Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.
Rather than sprinkle casts throughout the code, change Py_CHARMASK to
always cast it's result to an unsigned char.  This should ensure we
do the right thing when accessing an array with the result.

16 years agoPrint more information the next time test_socket throws the wrong exception.
Jeffrey Yasskin [Fri, 28 Mar 2008 04:53:10 +0000 (04:53 +0000)]
Print more information the next time test_socket throws the wrong exception.

16 years agoAllow use of other ports so the test can pass if 9091 is in use
Neal Norwitz [Fri, 28 Mar 2008 04:41:34 +0000 (04:41 +0000)]
Allow use of other ports so the test can pass if 9091 is in use

16 years agoKill a race in test_threading in which the exception info in a thread finishing
Jeffrey Yasskin [Fri, 28 Mar 2008 04:11:18 +0000 (04:11 +0000)]
Kill a race in test_threading in which the exception info in a thread finishing
up after it was joined had a traceback pointing to that thread's (deleted)
target attribute, while the test was trying to check that the target was
destroyed. Big thanks to Antoine Pitrou for diagnosing the race and pointing
out sys.exc_clear() to kill the exception early. This fixes issue 2496.

16 years agotest_future3.py is a regular test file, and should be part of the test suite
Amaury Forgeot d'Arc [Fri, 28 Mar 2008 00:21:34 +0000 (00:21 +0000)]
test_future3.py is a regular test file, and should be part of the test suite

16 years agoIssue2495: tokenize.untokenize did not insert space between two consecutive string...
Amaury Forgeot d'Arc [Thu, 27 Mar 2008 23:23:54 +0000 (23:23 +0000)]
Issue2495: tokenize.untokenize did not insert space between two consecutive string literals:
"" "" => """", which is invalid code.

Will backport

16 years agoThe bug for which there was a test in outstanding_bugs.py was agreed not to be a...
Georg Brandl [Thu, 27 Mar 2008 13:34:59 +0000 (13:34 +0000)]
The bug for which there was a test in outstanding_bugs.py was agreed not to be a bug.

16 years ago#2248: return result of QUIT from quit().
Georg Brandl [Thu, 27 Mar 2008 13:27:31 +0000 (13:27 +0000)]
#2248: return result of QUIT from quit().

16 years agoFixed tokenize tests
Christian Heimes [Thu, 27 Mar 2008 11:46:37 +0000 (11:46 +0000)]
Fixed tokenize tests
The tokenize module doesn't understand __future__.unicode_literals yet

16 years agoBuild bots are working again - removing the hack
Christian Heimes [Thu, 27 Mar 2008 10:35:52 +0000 (10:35 +0000)]
Build bots are working again - removing the hack

16 years agoAdded test cases for single quoted strings, both forms of triple quotes,
Eric Smith [Thu, 27 Mar 2008 09:42:35 +0000 (09:42 +0000)]
Added test cases for single quoted strings, both forms of triple quotes,
 and some string concatenations.
Removed unneeded __future__ print_function import.

16 years agoQuick 'n dirty hack: Increase the magic by 2 to force a rebuild of pyc/pyo files...
Christian Heimes [Thu, 27 Mar 2008 09:02:33 +0000 (09:02 +0000)]
Quick 'n dirty hack: Increase the magic by 2 to force a rebuild of pyc/pyo files on the build bots

16 years agoPluralss only need one s, not 2 (intss -> ints)
Neal Norwitz [Thu, 27 Mar 2008 06:52:01 +0000 (06:52 +0000)]
Pluralss only need one s, not 2 (intss -> ints)

16 years agoFix compiler warnings
Neal Norwitz [Thu, 27 Mar 2008 05:03:11 +0000 (05:03 +0000)]
Fix compiler warnings

16 years agoFix test_compiler after adding unicode_literals
Neal Norwitz [Thu, 27 Mar 2008 05:02:57 +0000 (05:02 +0000)]
Fix test_compiler after adding unicode_literals

16 years agoFix warnings about using char as an array subscript. This is not portable
Neal Norwitz [Thu, 27 Mar 2008 04:40:50 +0000 (04:40 +0000)]
Fix warnings about using char as an array subscript.  This is not portable
since char is signed on some platforms and unsigned on others.

16 years agoFix memory leaks
Neal Norwitz [Thu, 27 Mar 2008 04:40:07 +0000 (04:40 +0000)]
Fix memory leaks

16 years agoFix bytes so it works on 64-bit platforms.
Neal Norwitz [Thu, 27 Mar 2008 03:49:54 +0000 (03:49 +0000)]
Fix bytes so it works on 64-bit platforms.
(Also remove some #if 0 code that is already handled in _getbytevalue.)

16 years agoRevert commit accident
Christian Heimes [Thu, 27 Mar 2008 01:38:47 +0000 (01:38 +0000)]
Revert commit accident

16 years agoHopefully added _fileio module to the Windows build system
Christian Heimes [Thu, 27 Mar 2008 01:36:21 +0000 (01:36 +0000)]
Hopefully added _fileio module to the Windows build system

16 years agoadd commas for introductory clauses
Benjamin Peterson [Thu, 27 Mar 2008 00:25:33 +0000 (00:25 +0000)]
add commas for introductory clauses

16 years agoUse the new unicode literals for the io module
Christian Heimes [Wed, 26 Mar 2008 23:13:59 +0000 (23:13 +0000)]
Use the new unicode literals for the io module
use basestring instead of str in Python 2.x

16 years agoC89 compliance: Microsoft compilers want variable declarations at the top
Amaury Forgeot d'Arc [Wed, 26 Mar 2008 23:07:43 +0000 (23:07 +0000)]
C89 compliance: Microsoft compilers want variable declarations at the top

16 years agoI forgot to svn add the future test
Christian Heimes [Wed, 26 Mar 2008 22:55:31 +0000 (22:55 +0000)]
I forgot to svn add the future test

16 years agoInitialize PyCompilerFlags cf_flags with 0
Christian Heimes [Wed, 26 Mar 2008 22:51:58 +0000 (22:51 +0000)]
Initialize PyCompilerFlags cf_flags with 0

16 years agoSurround p_flags access with #ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
Christian Heimes [Wed, 26 Mar 2008 22:20:26 +0000 (22:20 +0000)]
Surround p_flags access with #ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD

16 years agoPatch #2477: Added from __future__ import unicode_literals
Christian Heimes [Wed, 26 Mar 2008 22:01:37 +0000 (22:01 +0000)]
Patch #2477: Added from __future__ import unicode_literals

The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.

16 years agoTypo: "objects reference count" -> "object's reference count"
Mark Dickinson [Wed, 26 Mar 2008 21:41:36 +0000 (21:41 +0000)]
Typo: "objects reference count" -> "object's reference count"

16 years agoFix and simplify error handling, silencing a compiler warning.
Georg Brandl [Wed, 26 Mar 2008 12:57:47 +0000 (12:57 +0000)]
Fix and simplify error handling, silencing a compiler warning.

16 years agoUpdated Misc/NEWS
Christian Heimes [Wed, 26 Mar 2008 12:53:58 +0000 (12:53 +0000)]
Updated Misc/NEWS

16 years agoRemoved merge tracking for "svnmerge" for
Christian Heimes [Wed, 26 Mar 2008 12:50:43 +0000 (12:50 +0000)]
Removed merge tracking for "svnmerge" for
svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray

16 years agoRemoved merge tracking for "svnmerge" for
Christian Heimes [Wed, 26 Mar 2008 12:50:32 +0000 (12:50 +0000)]
Removed merge tracking for "svnmerge" for
svn+ssh://pythondev@svn.python.org/python/branches/libffi3-branch

16 years agoMerged revisions 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809...
Christian Heimes [Wed, 26 Mar 2008 12:49:49 +0000 (12:49 +0000)]
Merged revisions 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray

........
  r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line

  Copied files from py3k w/o modifications
........
  r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines

  Take One
  * Added initialization code, warnings, flags etc. to the appropriate places
  * Added new buffer interface to string type
  * Modified tests
  * Modified Makefile.pre.in to compile the new files
  * Added bytesobject.c to Python.h
........
  r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines

  Disabled bytearray.extend for now since it causes an infinite recursion
  Fixed serveral unit tests
........
  r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines

  Added PyBytes support to several places:
  str + bytearray
  ord(bytearray)
  bytearray(str, encoding)
........
  r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line

  Fixed more unit tests related to type('') is not unicode
........
  r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines

  Fixed more unit tests
  Fixed bytearray.extend
........
  r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line

  Implemented old buffer interface for bytearray
........
  r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line

  Added backport of the io module
........
  r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line

  Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte
........
  r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines

  Fixed more tests
  Fixed bytearray() comparsion with unicode()
  Fixed iterator assignment of bytearray
........
  r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines

  str(bytesarray()) now returns the bytes and not the representation of the bytearray object
  Enabled and fixed more unit tests
........
  r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines

  Clear error PyNumber_AsSsize_t() fails
  Use CHARMASK for ob_svall access
  disabled a test with memoryview again
........
  r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line

  Untested updates to the PCBuild directory
........
  r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line

  The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed.
........
  r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines

  Disabled last failing test
  I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out.
........
  r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line

  Re-enabled bytes warning code
........
  r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line

  Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass.
........
  r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line

  Re-enabled bytearray subclassing - all tests are passing.
........

16 years agoPrepare integration of bytearray backport branch
Christian Heimes [Wed, 26 Mar 2008 12:32:49 +0000 (12:32 +0000)]
Prepare integration of bytearray backport branch

16 years agoAdded help options to PDB
Benjamin Peterson [Wed, 26 Mar 2008 11:57:47 +0000 (11:57 +0000)]
Added help options to PDB

16 years agoAdd an example for an RFC 822 continuation.
Georg Brandl [Wed, 26 Mar 2008 09:32:46 +0000 (09:32 +0000)]
Add an example for an RFC 822 continuation.

16 years agoAdd Josiah.
Georg Brandl [Wed, 26 Mar 2008 09:04:36 +0000 (09:04 +0000)]
Add Josiah.

16 years agoChanged test so it no longer runs as a side effect of importing.
Jerry Seutter [Wed, 26 Mar 2008 05:58:14 +0000 (05:58 +0000)]
Changed test so it no longer runs as a side effect of importing.

16 years agoChanged test so it no longer runs as a side effect of importing.
Jerry Seutter [Wed, 26 Mar 2008 05:32:51 +0000 (05:32 +0000)]
Changed test so it no longer runs as a side effect of importing.

16 years agoEnsure that the mailbox is closed to prevent problems on Windows with removing
Neal Norwitz [Wed, 26 Mar 2008 05:19:41 +0000 (05:19 +0000)]
Ensure that the mailbox is closed to prevent problems on Windows with removing
an open file.  This doesn't seem to be a problem in 2.6, but that appears
to be somewhat accidental (specific to reference counting).  When this
gets merged to 3.0, it will make the 3.0 code simpler.

16 years agoChanged test so it no longer runs as a side effect of importing.
Jerry Seutter [Wed, 26 Mar 2008 05:03:03 +0000 (05:03 +0000)]
Changed test so it no longer runs as a side effect of importing.

16 years agoTry to get this test to be less flaky. It was failing sometimes because
Neal Norwitz [Wed, 26 Mar 2008 04:55:51 +0000 (04:55 +0000)]
Try to get this test to be less flaky.  It was failing sometimes because
the connect would succeed before the timeout occurred.  Try using an
address and port that hopefully doesn't exist to ensure we get no response.
If this doesn't work, we can use a public address close to python.org
and hopefully that address never gets taken.

16 years agoAdd various items
Andrew M. Kuchling [Wed, 26 Mar 2008 00:30:02 +0000 (00:30 +0000)]
Add various items

16 years agoMinor docstring typos
Andrew M. Kuchling [Wed, 26 Mar 2008 00:16:50 +0000 (00:16 +0000)]
Minor docstring typos

16 years agoOpps! I merged the revisions, but forgot to add
Benjamin Peterson [Tue, 25 Mar 2008 21:55:50 +0000 (21:55 +0000)]
Opps! I merged the revisions, but forgot to add
the header to ACKS

16 years agoMake _ctypes.c PY_SSIZE_T_CLEAN.
Thomas Heller [Tue, 25 Mar 2008 21:18:39 +0000 (21:18 +0000)]
Make _ctypes.c PY_SSIZE_T_CLEAN.

16 years agoMerged the ACKS from py3k
Benjamin Peterson [Tue, 25 Mar 2008 21:14:42 +0000 (21:14 +0000)]
Merged the ACKS from py3k

16 years agoIssue #2482: Make sure that the coefficient of a Decimal
Mark Dickinson [Tue, 25 Mar 2008 18:47:59 +0000 (18:47 +0000)]
Issue #2482:  Make sure that the coefficient of a Decimal
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.

16 years agoAdd Benjamin.
Georg Brandl [Tue, 25 Mar 2008 17:36:43 +0000 (17:36 +0000)]
Add Benjamin.

16 years agoIssue #2478: Decimal(sqrt(0)) failed when the decimal context
Mark Dickinson [Tue, 25 Mar 2008 14:33:23 +0000 (14:33 +0000)]
Issue #2478: Decimal(sqrt(0)) failed when the decimal context
was not explicitly supplied.

16 years agoMove declarations to block start.
Georg Brandl [Tue, 25 Mar 2008 11:59:51 +0000 (11:59 +0000)]
Move declarations to block start.

16 years ago#2476: document that %default feature is new in 2.4.
Georg Brandl [Tue, 25 Mar 2008 08:39:10 +0000 (08:39 +0000)]
#2476: document that %default feature is new in 2.4.

16 years ago#2359: add Py3k warning for array.read/array.write.
Georg Brandl [Tue, 25 Mar 2008 08:37:23 +0000 (08:37 +0000)]
#2359: add Py3k warning for array.read/array.write.

16 years agoFix tabs.
Georg Brandl [Tue, 25 Mar 2008 08:31:32 +0000 (08:31 +0000)]
Fix tabs.

16 years agoMake Py3k warnings consistent w.r.t. punctuation; also respect the
Georg Brandl [Tue, 25 Mar 2008 08:29:14 +0000 (08:29 +0000)]
Make Py3k warnings consistent w.r.t. punctuation; also respect the
EOL 80 limit and supply more alternatives in warning messages.

16 years ago#2355: py3k warning for buffer().
Georg Brandl [Tue, 25 Mar 2008 07:56:27 +0000 (07:56 +0000)]
#2355: py3k warning for buffer().

16 years agoOn platforms without zlib, make this do the right thing and return the python
Gregory P. Smith [Tue, 25 Mar 2008 07:46:07 +0000 (07:46 +0000)]
On platforms without zlib, make this do the right thing and return the python
2.x signed value.  Also, don't waste space on a table full of unsigned longs
when all it needs are unsigned ints (incase anyone builds this without zlib on
a 64-bit unix for some strange reason).

tested by forcing it to compile this version on both 32-bit and 64-bit linux.

16 years agoUse a 32-bit unsigned int here, a long is not needed.
Gregory P. Smith [Tue, 25 Mar 2008 07:31:28 +0000 (07:31 +0000)]
Use a 32-bit unsigned int here, a long is not needed.

16 years ago#868845: document <...> reprs.
Georg Brandl [Tue, 25 Mar 2008 07:20:15 +0000 (07:20 +0000)]
#868845: document <...> reprs.

16 years agoTry to get this test to be more stable:
Neal Norwitz [Tue, 25 Mar 2008 07:00:39 +0000 (07:00 +0000)]
Try to get this test to be more stable:
 * disable gc during the test run because we are spawning objects and there
   was an exception when calling Popen.__del__
 * Always set an alarm handler so the process doesn't exit if the test fails
   (should probably add assertions on the value of hndl_called in more places)
 * Using a negative time causes Linux to treat it as zero, so disable that test.

16 years agoDon't try to close a non-open file.
Neal Norwitz [Tue, 25 Mar 2008 06:35:10 +0000 (06:35 +0000)]
Don't try to close a non-open file.
Don't let file removal cause the test to fail.

16 years agoA stab in the dark attempt to fix the alpha/tru64 buildbot problem and add more
Gregory P. Smith [Tue, 25 Mar 2008 06:12:45 +0000 (06:12 +0000)]
A stab in the dark attempt to fix the alpha/tru64 buildbot problem and add more
test coverage of valid inputs to zlib.crc32.

16 years agoTry to fix a bunch of compiler warnings on Win64.
Neal Norwitz [Tue, 25 Mar 2008 04:18:18 +0000 (04:18 +0000)]
Try to fix a bunch of compiler warnings on Win64.

16 years agoFix a bunch of UnboundLocalErrors when the tests fail.
Neal Norwitz [Tue, 25 Mar 2008 04:17:38 +0000 (04:17 +0000)]
Fix a bunch of UnboundLocalErrors when the tests fail.

16 years agoIssue2469: Correct a typo I introduced at r61793: compilation error with UCS4 builds.
Amaury Forgeot d'Arc [Mon, 24 Mar 2008 21:04:10 +0000 (21:04 +0000)]
Issue2469: Correct a typo I introduced at r61793: compilation error with UCS4 builds.

All buildbots compile with UCS2...

16 years agoAdded quick hack for bzr
Christian Heimes [Mon, 24 Mar 2008 19:58:17 +0000 (19:58 +0000)]
Added quick hack for bzr

16 years agoAdded quick hack for bzr
Christian Heimes [Mon, 24 Mar 2008 19:57:42 +0000 (19:57 +0000)]
Added quick hack for bzr

16 years agoConditionalize sys/time.h inclusion.
Martin v. Löwis [Mon, 24 Mar 2008 13:54:23 +0000 (13:54 +0000)]
Conditionalize sys/time.h inclusion.

16 years agoPatch #2240: Implement signal.setitimer and signal.getitimer.
Martin v. Löwis [Mon, 24 Mar 2008 13:31:16 +0000 (13:31 +0000)]
Patch #2240: Implement signal.setitimer and signal.getitimer.

16 years agoInstall 2to3 script.
Martin v. Löwis [Mon, 24 Mar 2008 12:57:53 +0000 (12:57 +0000)]
Install 2to3 script.

16 years ago#1700821: add a note to audioop docs about signedness of sample formats.
Georg Brandl [Mon, 24 Mar 2008 09:34:34 +0000 (09:34 +0000)]
#1700821: add a note to audioop docs about signedness of sample formats.

16 years agoIssue 2460: Make Ellipsis objects copyable.
Raymond Hettinger [Mon, 24 Mar 2008 08:17:39 +0000 (08:17 +0000)]
Issue 2460: Make Ellipsis objects copyable.

16 years agoTighten documentation for Random.triangular.
Raymond Hettinger [Mon, 24 Mar 2008 06:07:49 +0000 (06:07 +0000)]
Tighten documentation for Random.triangular.

16 years agoMerged revisions 61724-61824 via svnmerge from
Martin v. Löwis [Mon, 24 Mar 2008 00:46:53 +0000 (00:46 +0000)]
Merged revisions 61724-61824 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r61730 | martin.v.loewis | 2008-03-22 02:20:58 +0100 (Sa, 22 Mär 2008) | 2 lines

  More explicit relative imports.
........
  r61755 | david.wolever | 2008-03-22 21:33:52 +0100 (Sa, 22 Mär 2008) | 1 line

  Fixing #2446 -- 2to3 now translates 'import foo' to 'from . import foo'
........
  r61824 | david.wolever | 2008-03-24 01:30:24 +0100 (Mo, 24 Mär 2008) | 3 lines

  Fixed a bug where 'from itertools import izip' would return 'from itertools import'
........

16 years agoHave the binascii module use zlib's optimized crc32() function when available
Gregory P. Smith [Mon, 24 Mar 2008 00:08:01 +0000 (00:08 +0000)]
Have the binascii module use zlib's optimized crc32() function when available
to reduce our code size (1k data table and tiny bit of code).  It falls back
to its own without zlib.

16 years agoprevent a warning from the struct module when data size >= 2**32.
Gregory P. Smith [Sun, 23 Mar 2008 23:45:12 +0000 (23:45 +0000)]
prevent a warning from the struct module when data size >= 2**32.

16 years agoA bugfix for r61813, it would fail if the data size was >=2**32.
Gregory P. Smith [Sun, 23 Mar 2008 23:43:02 +0000 (23:43 +0000)]
A bugfix for r61813, it would fail if the data size was >=2**32.

16 years agoreplace calls to get the initial values with the raw constants.
Gregory P. Smith [Sun, 23 Mar 2008 22:14:38 +0000 (22:14 +0000)]
replace calls to get the initial values with the raw constants.

16 years agoFix gzip to deal with CRC's being signed values in Python 2.x properly and to
Gregory P. Smith [Sun, 23 Mar 2008 21:04:43 +0000 (21:04 +0000)]
Fix gzip to deal with CRC's being signed values in Python 2.x properly and to
read 32bit values as unsigned to start with rather than applying signedness
fixups allover the place afterwards.

This hopefully fixes the test_tarfile failure on the alpha/tru64 buildbot.

16 years agoRevert r61779 - It undid correct code and caused test_zlib to fail on all
Gregory P. Smith [Sun, 23 Mar 2008 20:31:23 +0000 (20:31 +0000)]
Revert r61779 - It undid correct code and caused test_zlib to fail on all
platforms with a 64-bit long.

The Alpha/Tru64 test problem is a problem in either tarfile or test_tarfile,
not zlib.

crc32 and adler32 return 32-bit values.  by using a long thats larger than
32-bits in these functions they were prevented from wrapping around to their
signed 32-bit value that we want them to return in python 2.x.

16 years agoAdopt Nick's suggestion for useful default arguments.
Raymond Hettinger [Sun, 23 Mar 2008 19:37:53 +0000 (19:37 +0000)]
Adopt Nick's suggestion for useful default arguments.
Clean-up floating point issues by adding true division and float constants.

16 years agoIssue 1681432: Add triangular distribution the random module.
Raymond Hettinger [Sun, 23 Mar 2008 13:32:32 +0000 (13:32 +0000)]
Issue 1681432:  Add triangular distribution the random module.

16 years ago#1477: ur'\U0010FFFF' raised in narrow unicode builds.
Amaury Forgeot d'Arc [Sun, 23 Mar 2008 09:55:29 +0000 (09:55 +0000)]
#1477: ur'\U0010FFFF' raised in narrow unicode builds.
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, just like the unicode-escape codec.

16 years agoMake the doctests presentation-friendlier.
Georg Brandl [Sun, 23 Mar 2008 08:05:30 +0000 (08:05 +0000)]
Make the doctests presentation-friendlier.

16 years agoRemove compiler warnings (on Alpha at least) about using chars as
Neal Norwitz [Sun, 23 Mar 2008 06:19:57 +0000 (06:19 +0000)]
Remove compiler warnings (on Alpha at least) about using chars as
array subscripts.  Using chars are dangerous b/c they are signed
on some platforms and unsigned on others.

16 years agoTry to prevent the alarm going off early in tearDown
Neal Norwitz [Sun, 23 Mar 2008 06:16:04 +0000 (06:16 +0000)]
Try to prevent the alarm going off early in tearDown

16 years agoMove itertools before future_builtins since the latter depends on the former.
Neal Norwitz [Sun, 23 Mar 2008 06:13:25 +0000 (06:13 +0000)]
Move itertools before future_builtins since the latter depends on the former.
From a clean build importing future_builtins would fail since itertools
wasn't built yet.

16 years agoSuppress failure (to avoid a flaky test) if we cannot connect to svn.python.org
Neal Norwitz [Sun, 23 Mar 2008 05:47:20 +0000 (05:47 +0000)]
Suppress failure (to avoid a flaky test) if we cannot connect to svn.python.org

16 years agoFix test_tarfile failures on Alpha (Tru64). The problem was caused in r61449
Neal Norwitz [Sun, 23 Mar 2008 05:08:37 +0000 (05:08 +0000)]
Fix test_tarfile failures on Alpha (Tru64).  The problem was caused in r61449
which made the return value signed.  On the Alpha that also lost data
since sizeof(int) != sizeof(long) and apparently adler32/crc32 return
64 bits of data.  This change keeps the signedness and continues to store the
data in a long rather than an int as was the case before r61449.

16 years agoSkip the epoll test if epoll() does not work
Neal Norwitz [Sun, 23 Mar 2008 04:43:09 +0000 (04:43 +0000)]
Skip the epoll test if epoll() does not work

16 years agoSpeed up the test by avoiding socket timeouts.
Neal Norwitz [Sun, 23 Mar 2008 04:08:30 +0000 (04:08 +0000)]
Speed up the test by avoiding socket timeouts.

16 years agoTry to make this test a little more robust and not fail with:
Neal Norwitz [Sun, 23 Mar 2008 03:43:33 +0000 (03:43 +0000)]
Try to make this test a little more robust and not fail with:
  timeout (10.0025) is more than 2 seconds more than expected (0.001)

I'm assuming this problem is caused by DNS lookup.  This change
does a DNS lookup of the hostname before trying to connect, so the time
is not included.

16 years agoSimplify demo code.
Raymond Hettinger [Sun, 23 Mar 2008 00:55:46 +0000 (00:55 +0000)]
Simplify demo code.

16 years agoEnable doctest running for several other documents.
Georg Brandl [Sat, 22 Mar 2008 22:04:10 +0000 (22:04 +0000)]
Enable doctest running for several other documents.
We have now over 640 doctests that are run with "make doctest".

16 years agoEnable doctests in functions.rst. Already found two errors :)
Georg Brandl [Sat, 22 Mar 2008 21:38:33 +0000 (21:38 +0000)]
Enable doctests in functions.rst.  Already found two errors :)

16 years agoTest doctests in operator docs.
Georg Brandl [Sat, 22 Mar 2008 21:26:44 +0000 (21:26 +0000)]
Test doctests in operator docs.

16 years agoTest doctests in datetime docs.
Georg Brandl [Sat, 22 Mar 2008 21:21:57 +0000 (21:21 +0000)]
Test doctests in datetime docs.

16 years agoMake collections' doctests executable.
Georg Brandl [Sat, 22 Mar 2008 21:06:20 +0000 (21:06 +0000)]
Make collections' doctests executable.

(The <BLANKLINE>s will be stripped from presentation output.)

16 years agoFix-up syntax problems.
Georg Brandl [Sat, 22 Mar 2008 20:08:43 +0000 (20:08 +0000)]
Fix-up syntax problems.

16 years agoNo need to specify explicit "doctest_block" anymore.
Georg Brandl [Sat, 22 Mar 2008 13:07:06 +0000 (13:07 +0000)]
No need to specify explicit "doctest_block" anymore.