Georg Brandl
59ec315b04
#3319 : don't raise ZeroDivisionError if number of rounds is so
...
low that benchtime is zero.
2008-07-19 13:00:22 +00:00
Georg Brandl
278fc50c07
#3303 : fix crash with invalid Py_DECREF in strcoll().
2008-07-19 12:46:12 +00:00
Raymond Hettinger
3369167089
Add recipe to the itertools docs.
2008-07-19 00:43:00 +00:00
Raymond Hettinger
3c212163ec
Improve accuracy of gamma test function
2008-07-19 00:42:03 +00:00
Eric Smith
f032a00271
Fix issue 3411: default float format spec fails on negative numbers.
2008-07-19 00:24:05 +00:00
Brett Cannon
1e8fba729e
Deprecate the sunaudio module for removal in Python 3.0. The sunau module can provide similar functionality.
2008-07-18 19:30:22 +00:00
Georg Brandl
74bbc79d10
Replace all map(None, a) with list(a).
2008-07-18 19:06:13 +00:00
Benjamin Peterson
e2886fd3ca
now that test_lib2to3 actually works and isn't extremely slow, we don't need the lib2to3 resource
2008-07-18 14:26:35 +00:00
Benjamin Peterson
0e3a6cf2cb
backport test_fileio
2008-07-18 14:14:41 +00:00
Georg Brandl
730c8185b9
Correct attribute name.
2008-07-18 10:29:30 +00:00
Georg Brandl
9334d02ff5
Remove duplicate entry in __all__.
2008-07-18 10:20:59 +00:00
Vinay Sajip
70fdc95b96
Issue #3389 : Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch.
2008-07-18 09:00:00 +00:00
Jesse Noller
7fb9640d57
Fix issue 3395, update _debugInfo to be _debug_info
2008-07-17 21:01:05 +00:00
Eric Smith
d6c393ab2b
Backed out r65069, pending fixing it in Windows.
2008-07-17 19:49:47 +00:00
Bill Janssen
0c1dbf8792
catch socket.error errors in badCertTest
2008-07-17 18:01:57 +00:00
Eric Smith
454816d8bd
Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.
2008-07-17 17:48:39 +00:00
Benjamin Peterson
f5668f13c8
try to fix test_threading on the Windows bot
2008-07-17 12:57:22 +00:00
Georg Brandl
0a34baf1fc
Byte items *can* be chars in 2.6.
2008-07-16 23:18:51 +00:00
Georg Brandl
3e483f643d
#3156 : fix consistency in what type bytearray methods accept as items.
...
Also rename confusing "item" parameters to "index".
2008-07-16 22:57:41 +00:00
Georg Brandl
b9b68ae7a5
#3305 : self->stream can be NULL.
2008-07-16 22:04:20 +00:00
Jesse Noller
5e62ca4fea
Apply patch for 874900: threading module can deadlock after fork
2008-07-16 20:03:47 +00:00
Benjamin Peterson
4b4f0ebf19
lib2to3 isn't broken anymore, so we can run the test
2008-07-16 17:03:06 +00:00
Mark Dickinson
64b7e501f4
Issue #3360 : Fix incorrect parsing of "020000000000.0".
2008-07-16 09:40:03 +00:00
Benjamin Peterson
a736a28702
disable lib2to3 in the trunk. It's broken just for 2.6
2008-07-16 00:44:02 +00:00
Eric Smith
a5fa5a218d
Complete issue 3083: add alternate (#) formatting to bin, oct, hex in str.format().
2008-07-16 00:11:49 +00:00
Mark Dickinson
62764566e8
Fix float.from_hex tests. It appears that Linux/ia64 doesn't like
...
computing 2.0**-1074 accurately. Using ldexp(1.0, -1074) should be
safer.
2008-07-15 21:55:23 +00:00
Mark Dickinson
7103aa42c0
Issue #3008 : add instance method float.hex and class method float.fromhex
...
to convert floats to and from hexadecimal strings respectively.
2008-07-15 19:08:33 +00:00
Nick Coghlan
53663a695e
Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
2008-07-15 14:27:37 +00:00
Eric Smith
d0c841243c
Added '#' formatting to integers. This adds the 0b, 0o, or 0x prefix for bin, oct, hex. There's still one failing case, and I need to finish the docs. I hope to finish those today.
2008-07-15 10:10:07 +00:00
Benjamin Peterson
a6864e0d9f
fix test_py3kwarns
...
The fact that this was failing and went unnoticed so long seems like a good argument for being able to enable and disble py3kwarnings through Python.
2008-07-14 17:42:17 +00:00
Robert Schuppenies
2ee623b710
Fixed test failure on Win64 machines.
2008-07-14 08:42:18 +00:00
Benjamin Peterson
e79edf5f7c
remove sys.version_info check for 3.0
2008-07-13 18:34:58 +00:00
Benjamin Peterson
2a6087966c
remove bytes alias
2008-07-13 18:25:13 +00:00
Nick Coghlan
b028f50911
Fix issue 3221 by emitting a RuntimeWarning instead of raising SystemError when the parent module can't be found during an absolute import (likely due to non-PEP 361 aware code which sets a module level __package__ attribute)
2008-07-13 14:52:36 +00:00
Nick Coghlan
38469e2719
Make test.test_support.catch_warnings more robust as discussed on python-dev. Also add explicit tests for itto test_warnings.
2008-07-13 12:23:47 +00:00
Brett Cannon
3d0b9f095a
dummy_thread.acquire() would return None if no waitflag argument was given. It
...
should have returned True.
Fixes issue #3339 . Thanks, Henk Punt for the report and Andrii v. Mishkovskiyi
for attempting a patch.
2008-07-13 01:15:07 +00:00
Josiah Carlson
873c3864ba
Fixed test for asyncore.
2008-07-11 23:26:59 +00:00
Amaury Forgeot d'Arc
2252d11c08
#3342 : In tracebacks, printed source lines were not indented since r62555.
...
#3343 : Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine.
2008-07-11 21:45:06 +00:00
Robert Schuppenies
4762902998
Added garbage collector overhead and optional default return value to
...
sys.getsizeof.
2008-07-10 17:13:55 +00:00
Robert Schuppenies
9be2ec109b
Added additional __sizeof__ implementations and addressed comments made in
...
Issue3122.
2008-07-10 15:24:04 +00:00
Raymond Hettinger
b01713e7dc
Issue 3285: Fractions from_float() and from_decimal() accept Integral arguments.
2008-07-10 14:34:57 +00:00
Raymond Hettinger
3cd1e42dca
Issue 3301: Bisect functions behaved badly when lo was negative.
2008-07-10 14:03:19 +00:00
Robert Schuppenies
d2cd86ddd5
Fixed Issue3122 and extended sys.getsizeof tests for built-in types.
2008-07-10 13:43:26 +00:00
Raymond Hettinger
655d583a49
Issue 3287: Raise correct exception for float inputs.
2008-07-10 09:31:08 +00:00
Nick Coghlan
524b7773cc
Issue 2517: Allow unicode messages in Exceptions again by correctly bypassing the instance dictionary when looking up __unicode__ on new-style classes
2008-07-08 14:08:04 +00:00
Facundo Batista
1a664419bb
Issue 3306. Better control for a lenght in findmax() function.
2008-07-07 17:02:59 +00:00
Josiah Carlson
ff5f42088b
Fixed bugs 760475, 953599, and 1519.
2008-07-07 04:51:46 +00:00
Gregory P. Smith
3b1e6b2f83
- Issue #3309 : Fix bz2.BZFile itererator to release its internal lock
...
properly when raising an exception due to the bz2file being closed.
Prevents a deadlock.
2008-07-07 04:31:58 +00:00
Benjamin Peterson
7f58022219
remove test_compact_freelists from test_sys
2008-07-06 12:39:09 +00:00
Georg Brandl
1ecce468f8
Keep below 80 chars.
2008-07-05 16:43:45 +00:00
Benjamin Peterson
87988b6753
make regrtest aware of the lib2to3 resource
2008-07-05 16:29:38 +00:00
Martin v. Löwis
5a9ef426a9
Disable lib2to3 by default, unless run explicitly.
2008-07-05 15:48:20 +00:00
Mark Dickinson
bf9f4d8015
Issue 3188: accept float('infinity') as well as float('inf'). This
...
makes the float constructor behave in the same way as specified
by various other language standards, including C99, IEEE 754r,
and the IBM Decimal standard.
2008-07-05 11:33:52 +00:00
Georg Brandl
e78fbcce3e
#2663 : support an *ignore* argument to shutil.copytree(). Patch by Tarek Ziade.
...
This is a new feature, but Barry authorized adding it in the beta period.
2008-07-05 10:13:36 +00:00
Martin v. Löwis
8c43641271
Patch #1622 : Correct interpretation of various ZIP header fields.
...
Also fixes
- Issue #1526 : Allow more than 64k files to be added to Zip64 file.
- Issue #1746 : Correct handling of zipfile archive comments (previously
archives with comments over 4k were flagged as invalid). Allow writing
Zip files with archives by setting the 'comment' attribute of a ZipFile.
2008-07-03 12:51:14 +00:00
Brett Cannon
0bfac6e5d8
Revert r64673 and instead just change the file encoding.
2008-07-02 21:52:42 +00:00
Brett Cannon
3bff9d269c
FIx some Latin-1 characters to be UTF-8 as the file encoding specifies.
...
Closes issue #3261 . THankjs Leo Soto for the bug report.
2008-07-02 21:40:11 +00:00
Jesse Noller
76cf55f499
Add #!/usr/bin/env python for ben
2008-07-02 16:56:51 +00:00
Jesse Noller
146b7ab818
Reenable the manager tests with Amaury's threading fix
2008-07-02 16:44:09 +00:00
Nick Coghlan
c060b0e7eb
Issue 3190: pydoc now hides module __package__ attributes
2008-07-02 13:09:19 +00:00
Mark Dickinson
70c3289085
Replace occurrences of '\d' with '[0-9]' in Decimal regex, to make sure
...
that the behaviour of Decimal doesn't change if/when re.UNICODE becomes
assumed in Python 3.0.
Also add a check that alternative Unicode digits (e.g. u'\N{FULLWIDTH
DIGIT ONE}') are *not* accepted in a numeric string.
2008-07-02 09:37:01 +00:00
Brett Cannon
8bb8fa5dd6
Handle urllib's renaming for Python 3.0:
...
* Deprecate urllib.urlopen() in favor of urllib2.urlopen() for 3.0.
* Update docs to mention split/rename of the module and deprecation of
urlopen().
Changes to lib2to3 are in a separate commit. Work is for issue #2885 .
2008-07-02 01:57:08 +00:00
Amaury Forgeot d'Arc
bdd941fac3
#3242 : fix a crash in "print", if sys.stdout is set to a custom object,
...
whose write() method installs another sys.stdout.
Will backport.
2008-07-01 20:38:04 +00:00
Benjamin Peterson
175e4d9663
#3219 repeated keyword arguments aren't allowed in function calls anymore
2008-07-01 19:34:52 +00:00
Amaury Forgeot d'Arc
1f40c8a8d7
#Issue3088 in-progress: Race condition with instances of classes derived from threading.local:
...
When a thread touches such an object for the first time, a new thread-local __dict__ is created,
and the __init__ method is run.
But a thread switch can occur here; if the other thread touches the same object, it installs another
__dict__; when the first thread resumes, it updates the dictionary of the second...
This is the deep cause of the failures in test_multiprocessing involving "managers" objects.
Also a 2.5 backport candidate.
2008-06-30 22:42:40 +00:00
Facundo Batista
763d309bba
Fix #2702 , with a correct accounting of recursion.
2008-06-30 01:10:55 +00:00
Benjamin Peterson
efc4a3ac17
fix typo
2008-06-28 23:35:31 +00:00
Benjamin Peterson
7416a4cd2a
convert test_audioop to unittest. Thanks to Giampaolo Rodola.
2008-06-28 23:06:05 +00:00
Bill Janssen
de34d91eb0
make sure we close the active channels when eof is received on them
2008-06-28 23:00:39 +00:00
Bill Janssen
934b16d0c2
various SSL fixes; issues 1251, 3162, 3212
2008-06-28 22:19:33 +00:00
Mark Dickinson
3af386a5cb
Remove trailing 'L's from numerator and denominator in the
...
repr() of a Fraction instance.
2008-06-27 10:11:52 +00:00
Brett Cannon
dea1b5653f
warnings.warn_explicit() did not have the proper TypeErrors in place to prevent
...
bus errors or SystemError being raised. As a side effect of fixing this, a bad
DECREF that could be triggered when 'message' and 'category' were both None was
fixed.
Closes issue 3211. Thanks JP Calderone for the bug report.
2008-06-27 00:31:13 +00:00
Robert Schuppenies
161b92103c
Corrected inconsistencies in sizeof tests and addressed issue pointed
...
out by Jean Brouwers.
2008-06-26 15:20:35 +00:00
Facundo Batista
68dc052ca6
Reverting the patch from #3165 , as it broke other
...
behaviours. I left the original test commented out (note
that that test came from #2702 , which seems to have a
problem in FreeBSD and Windows, but not in Linux).
I included a new test, to watch over the now-broken
behaviour, I took it from #3179 .
2008-06-25 19:24:53 +00:00
Robert Schuppenies
41a7ce0a2e
Issue 3147: Fixed SizeofTest failure for LLP64 systems.
2008-06-25 09:20:03 +00:00
Raymond Hettinger
9c437af4eb
Revert 64424, 64438, and 64439.
2008-06-24 22:46:07 +00:00
Eric Smith
5dce7e9a83
Fixed formatting with thousands separator and padding. Resolves issue 3140.
2008-06-24 11:11:59 +00:00
Raymond Hettinger
4c52f52ef3
Issue 3161: Missing import and test.
2008-06-23 03:29:28 +00:00
Facundo Batista
9da18b3133
Fixing the problem stated in issue 2702 with the patch submitted
...
in the issue 3165. Now cPickle does not fails with uncontrolled
behaviour when pickling into a very deep nested structure.
2008-06-22 23:19:14 +00:00
Facundo Batista
2694eb0219
Just returning nothing instead of rising TestSkipped, because
...
it makes the test fail in the trunk.loewis-sun buildbot.
2008-06-22 19:35:24 +00:00
Facundo Batista
96f3dc36ed
Trying to see if the problem in Martin's buildot is at
...
directory creation time...
2008-06-22 18:23:55 +00:00
Facundo Batista
b8242ba6b1
Trying to see if the @ in a path is causing the issue in the
...
shutil.rmtree() in the trunk.loewis-sun buildbot.
2008-06-22 16:11:34 +00:00
Facundo Batista
5596b0cfc2
Issue #2722 . Now the char buffer to support the path string has
...
not fixed length, it mallocs memory if needed. As a result, we
don't have a maximum for the getcwd() method.
2008-06-22 13:36:20 +00:00
Facundo Batista
a6a4d50efe
Now a from submitted via POST that also has a query string
...
will contain both FieldStorage and MiniFieldStorage items.
Fixes #1817 .
2008-06-21 18:58:04 +00:00
Facundo Batista
2da91c375b
Fixed issue #2888 . Now the behaviour of pprint when working with nested
...
structures follows the common sense (and works like in 2.5 and 3.0).
2008-06-21 17:43:56 +00:00
Andrew M. Kuchling
f484363bae
Use repr() for bad input strings; this makes the empty string or binary characters more visible
2008-06-21 13:47:20 +00:00
Raymond Hettinger
e0e711446b
Issue 3008: hex/oct/bin can show floats exactly.
2008-06-21 06:39:53 +00:00
Mark Dickinson
1ec2fcd16e
Issue #3004 : Minor fix to slice.indices(). slice(-10).indices(9) now
...
returns (0, 0, 1) instead of (0, -1, 1), and slice(None, 10, -1).indices(10)
returns (9, 9, -1) instead of (9, 10, -1).
2008-06-20 14:53:43 +00:00
Raymond Hettinger
e3ae655edf
Make bin() implementation parallel oct() and hex() so that int/long subclasses can override or so that other classes can support.
2008-06-20 04:18:15 +00:00
Benjamin Peterson
6f5a2b52ae
skip test_macostools when UCS4 is enabled
2008-06-19 21:39:06 +00:00
Amaury Forgeot d'Arc
9b69ed9d67
In test_site, correctly escape backslashes in path names.
...
This allows the test to pass when the username begins with a lowercase 't'...
2008-06-19 21:17:12 +00:00
Amaury Forgeot d'Arc
8f40f0635b
test_macos can be skipped on non-mac platforms.
2008-06-19 19:57:39 +00:00
Benjamin Peterson
da9c9be159
Fix test_socket_ssl the easy way and remove it per #1489
2008-06-18 22:59:32 +00:00
Amaury Forgeot d'Arc
7248fd833c
The ssl certificate at https://sf.net is not valid.
...
Switch to https://sourceforge.net
2008-06-18 21:18:27 +00:00
Jesse Noller
a3b6baaaab
Remove test_listener_client to remove possible race condition in the multiprocessing tests
2008-06-18 16:34:50 +00:00
Jesse Noller
18623825d2
Attempt RLock creation prior to test execution on Linux, if it raises the OSError in issue 3111, skip the test suite
2008-06-18 13:29:52 +00:00
Benjamin Peterson
aa4e47a04d
add needed import
2008-06-17 23:01:59 +00:00
Benjamin Peterson
ed77f2e143
skip test_multiprocessing when /dev/shm doesn't exist. This seems to be a chroot problem in the buildbot env.
2008-06-17 22:40:44 +00:00
Robert Schuppenies
59f3ade862
Issue 3048: Fixed sys.sizeof test fails with wide unicode.
2008-06-17 08:42:15 +00:00
Benjamin Peterson
da3a1b1200
reduce the test_multiprocessing load to ones that shouldn't hang. These will be reenabled gradually as we find the problems.
2008-06-16 20:52:48 +00:00
Amaury Forgeot d'Arc
a8919fe631
Issue 3110: Crash with weakref subclass,
...
seen after a "import multiprocessing.reduction"
An instance of a weakref subclass can have attributes.
If such a weakref holds the only strong reference to the object,
deleting the weakref will delete the object. In this case,
the callback must not be called, because the ref object is being deleted!
2008-06-16 19:12:42 +00:00
Georg Brandl
a161f6070b
Forward-port new test from r64300.
2008-06-15 19:54:36 +00:00
Gregory P. Smith
a0205d0a46
silence the test when it is skipped on some platforms. should fix a
...
buildbot.
2008-06-14 17:34:09 +00:00
Martin v. Löwis
06510b2213
Run svneol.py on all sources.
2008-06-13 22:38:33 +00:00
Benjamin Peterson
dfd79494ce
convert multiprocessing to unix line endings
2008-06-13 19:13:39 +00:00
Robert Schuppenies
73e9ffc811
Fixed: sys.getsizeof does not take the actual length of the tuples into account.
2008-06-13 13:29:37 +00:00
Neal Norwitz
04097a6282
Fix typo in method name. The LT class implemented less than. The LE class
...
should implement less than or equal to (as the code does).
2008-06-13 06:03:25 +00:00
Benjamin Peterson
26305a03e3
add py3k warnings to rfc822
2008-06-12 22:33:06 +00:00
Benjamin Peterson
a03722f278
deprecated mimetools
2008-06-12 14:23:49 +00:00
Armin Rigo
ffae306784
Sounds obvious, but I didn't even realize that you can put non-string
...
keys in type dictionaries without using this locals() hack.
2008-06-12 09:50:58 +00:00
Benjamin Peterson
0fbcf69455
give the threading API PEP 8 names
2008-06-11 17:27:50 +00:00
Raymond Hettinger
e29a10306c
Add test for heapq using both __lt__ and __le__.
2008-06-11 13:14:50 +00:00
Benjamin Peterson
e605e4f09a
fix import of multiprocessing by juggling imports
2008-06-11 12:26:31 +00:00
Raymond Hettinger
4267be6478
Multi-arg form for set.difference() and set.difference_update().
2008-06-11 10:30:54 +00:00
Gregory P. Smith
9d53457e59
Merge in release25-maint r60793:
...
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-06-11 07:41:16 +00:00
Benjamin Peterson
190d56e009
add the multiprocessing package to fulfill PEP 371
2008-06-11 02:40:25 +00:00
Benjamin Peterson
d5299866f9
convert test_struct to a unittest thanks to Giampaolo Rodola
...
I had to disable one test because it was functioning incorrectly, see #1530559
I also removed the debugging prints
2008-06-11 01:31:28 +00:00
Raymond Hettinger
610a93ea26
Handle the case with zero arguments.
2008-06-11 00:44:47 +00:00
Benjamin Peterson
31296c09ed
backport of 64096
2008-06-10 22:39:25 +00:00
Amaury Forgeot d'Arc
8e8de4afef
Correct test_pydoc for win32 platforms, to account for normalized URLs:
...
C:\temp => file:///C|temp/
2008-06-10 21:37:15 +00:00
Josiah Carlson
b67b53db51
Fixed test to reflect new filedispatcher semantics, as well as two
...
NameErrors pointed out by Giampaolo.
2008-06-10 15:58:19 +00:00
Robert Schuppenies
901c997de0
Issue 3048: Fixed sys.getsizeof for unicode objects.
2008-06-10 10:10:31 +00:00
Georg Brandl
8509db5a21
Add the "ast" module, containing helpers to ease use of the "_ast" classes.
2008-06-10 07:45:28 +00:00
Josiah Carlson
1a72d88abf
Applying updated patch from Issue 1736190, which addresses partial
...
issues in: 909005 and 17361001, as well as completely as possible issues
539444, 760475, 777588, 889153, 953599, 1025525, 1063924, and 658749.
This patch also includes doc and test updates as necessary.
2008-06-10 05:00:08 +00:00
Alexandre Vassalotti
602d8db2bc
Added better pickling support to xrange objects.
...
Cleaned up the unit test.
2008-06-10 04:01:23 +00:00
Alexandre Vassalotti
1f2f61a78f
Issue 2582: Fix pickling of xrange objects.
2008-06-10 03:34:53 +00:00
Raymond Hettinger
5c4d3d0e4c
Let set.intersection() and set.intersection_update() take multiple input arguments.
2008-06-09 13:07:27 +00:00
Raymond Hettinger
ee4bcad68e
Let set.union() and set.update() accept multiple inputs.
2008-06-09 08:33:37 +00:00
Raymond Hettinger
ecbdd2e9b0
Issue #2138 : Add math.factorial().
2008-06-09 06:54:45 +00:00
Raymond Hettinger
e98839a1f4
Issue3065: Fixed pickling of named tuples. Added tests.
2008-06-09 01:28:30 +00:00
Benjamin Peterson
f4fcdb6b8c
warn about parameter tuple unpacking
2008-06-08 23:00:00 +00:00
Benjamin Peterson
d5efd20406
Warn about assigning to Py3k keywords (True and False)
2008-06-08 22:52:37 +00:00
Benjamin Peterson
2fe3ef8750
change Py3k backquote warning to a SyntaxWarning and add a test
2008-06-08 02:05:33 +00:00
Georg Brandl
bf0610a1ca
Revert unwanted changes.
2008-06-07 16:04:01 +00:00
Georg Brandl
7be19aabe2
Factor out docstring dedenting from inspect.getdoc() into inspect.cleandoc()
...
to ease standalone use of the algorithm.
2008-06-07 15:59:10 +00:00
Facundo Batista
6a5a177cba
Finished bug #2451 . Fixed the retrying part to make it
...
more robust.
2008-06-07 13:36:36 +00:00
Ronald Oussoren
5640ce2f1e
MacOS X: Enable 4-way universal builds
...
This patch adds a new configure argument on OSX:
--with-universal-archs=[32-bit|64-bit|all]
When used with the --enable-universalsdk option this controls which
CPU architectures are includes in the framework. The default is 32-bit,
meaning i386 and ppc. The most useful alternative is 'all', which includes
all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64).
This includes limited support for the Carbon bindings in 64-bit mode as well,
limited because (a) I haven't done extensive testing and (b) a large portion
of the Carbon API's aren't available in 64-bit mode anyway.
I've also duplicated a feature of Apple's build of python: setting the
environment variable 'ARCHFLAGS' controls the '-arch' flags used for building
extensions using distutils.
2008-06-05 12:58:24 +00:00
Alexandre Vassalotti
80af6da748
Fixed complex.__getnewargs__() to not emit another complex object.
2008-06-04 20:41:44 +00:00
Benjamin Peterson
c5393c64b8
make test_mutex more elegant
2008-06-03 01:30:37 +00:00
Walter Dörwald
a2a89a8712
Change all functions that expect one unicode character to accept a pair of
...
surrogates in narrow builds. Fixes issue #1706460 .
2008-06-02 20:36:03 +00:00
Gregory P. Smith
137d824148
Fix issue 2782: be less strict about the format string type in strftime.
...
Accept unicode and anything else ParseTuple "s#" can deal with. This
matches the time.strftime behavior.
2008-06-02 04:05:52 +00:00
Gregory P. Smith
8856ddae25
Adds a Thread.getIdent() method to provide the _get_ident() value for
...
any given threading.Thread object. feature request issue 2871.
2008-06-01 23:48:47 +00:00
Georg Brandl
ac19d85e04
Deprecate htmllib and sgmllib for 3.0.
2008-06-01 21:19:14 +00:00
Robert Schuppenies
9359afff56
Fix test_sys.
2008-06-01 17:11:09 +00:00
Georg Brandl
12f8107f91
Fix test_descrtut.
2008-06-01 17:05:56 +00:00
Georg Brandl
7a6de8b0f4
Some style nits. Also clarify in the docstrings what __sizeof__ does.
2008-06-01 16:42:16 +00:00
Robert Schuppenies
51df064767
Issue #2898 : Added sys.getsizeof() to retrieve size of objects in bytes.
2008-06-01 16:16:17 +00:00
Martin v. Löwis
99815892f6
New environment variable PYTHONIOENCODING.
2008-06-01 07:20:46 +00:00
Mark Dickinson
8df4e22a28
Fix typo in testSum
2008-05-30 02:46:53 +00:00
Facundo Batista
4f1b1ed975
Fixed the semantic of timeout for socket.create_connection and
...
all the upper level libraries that use it, including urllib2.
Added and fixed some tests, and changed docs correspondingly.
Thanks to John J Lee for the patch and the pusing, :)
2008-05-29 16:39:26 +00:00
Brett Cannon
abb34fe9f3
UserString.MutableString has been removed in Python 3.0.
...
Works on issue #2877 . Thanks Quentin Gallet-Gilles for the patch.
2008-05-29 05:08:50 +00:00
Jesus Cea
dbd2f6d8a9
Better integration between Python testing and bsddb3
2008-05-27 13:26:02 +00:00
Lars Gustäbel
b1a54a3530
Do not close external file objects passed to tarfile.open(mode='w:bz2')
...
when the TarFile is closed.
2008-05-27 12:39:23 +00:00
Benjamin Peterson
1d31023b31
Improvements for test_py3kwarn
...
- Always show warnings so they are always catchable
- Make test_os_path_walk faster by walking a less populous directory
2008-05-27 01:42:29 +00:00
Benjamin Peterson
838c7b3619
remove some __getslice__
2008-05-27 01:18:39 +00:00
Benjamin Peterson
c1c83bb0de
remove duplication in test module
2008-05-26 21:44:26 +00:00
Gregory P. Smith
4036fd4b75
Fixes issue2791: subprocess.Popen.communicate leaked a file descripton until
...
the last reference to the Popen instance was dropped. Adding explicit
close() calls fixes it.
Candidate for backport to release25-maint.
2008-05-26 20:22:14 +00:00
Benjamin Peterson
3aa84a7f28
warn about some members of the commands module
2008-05-26 19:41:53 +00:00
Benjamin Peterson
eeb2b21ab0
add __all__ to test_support
2008-05-26 16:22:27 +00:00
Gregory P. Smith
9e6468be1d
Fix issue2669: bsddb simple/legacy interface iteration silently fails
...
when database changes size during iteration.
It now behaves like a dictionary, the next attempt to get a value from
the iterator after the database has changed size will raise a RuntimeError.
2008-05-25 08:28:29 +00:00
Georg Brandl
e08e3d0686
#2959 : allow multiple close() calls for GzipFile.
2008-05-25 08:07:37 +00:00
Georg Brandl
392c6fc02d
ConfigParser renaming reversal part 3: move module into place and adapt imports.
2008-05-25 07:25:25 +00:00
Georg Brandl
a6168f9e0a
Queue renaming reversal part 3: move module into place and
...
change imports and other references. Closes #2925 .
2008-05-25 07:20:14 +00:00
Gregory P. Smith
8107290fa1
* Give the test_bsddb3 tests a unique temporary directory to run their
...
stuff in and clean it up afterwards regardless of the result.
* Get rid of duplicate list of test modules to run, they're maintained
within test_all now.
* Print the BerkeleyDB version to stderr when running test_bsddb3 to
help buildbot problem diagnosis.
2008-05-25 07:14:09 +00:00
Georg Brandl
e152a77d96
socketserver renaming reversal part 3: move the module into the right
...
place and fix all references to it. Closes #2926 .
2008-05-24 18:31:28 +00:00
Martin v. Löwis
7d3d04d6db
Don't try to get the window size if it was never set before.
...
Fixes the test failure on Solaris.
2008-05-24 09:36:45 +00:00
Martin v. Löwis
27e4a179f2
Issue #1390 : Raise ValueError in toxml when an invalid comment would
...
otherwise be produced.
2008-05-23 15:18:28 +00:00
Mark Dickinson
badd7da622
Skip math.sum tests on non IEEE 754 platforms, and on IEEE 754 platforms
...
that exhibit the problem described in issue #2937 .
2008-05-23 12:07:36 +00:00
Brett Cannon
2ee0e8eaec
Revert the renaming of repr to reprlib.
2008-05-23 05:03:59 +00:00
Mark Dickinson
d055835253
Better error reporting in test_math.py
2008-05-23 03:30:01 +00:00
Mark Dickinson
c11c3391b0
Add tests for math.sum (Issue #2819 )
2008-05-23 02:36:48 +00:00
Benjamin Peterson
3a7305ed14
fix test_pydoc so it works on make installed Python installations
...
Also let it pass when invoked directly
2008-05-22 23:09:26 +00:00
Benjamin Peterson
83d453421f
remove redundant invocation of json doctests
2008-05-22 01:02:23 +00:00
Benjamin Peterson
948ee7a7c8
use more specific asserts in test_opcode
2008-05-22 00:57:02 +00:00
Benjamin Peterson
a4e4ef1cea
check for toolbox glue before testing platform.mac_ver intensly
2008-05-21 22:52:39 +00:00
Georg Brandl
88659b0ab2
#2592 : delegate nb_index and the floor/truediv slots in weakref.proxy.
2008-05-20 08:40:43 +00:00
Georg Brandl
112aa50329
Patch #1775025 : allow opening zipfile members via ZipInfo instances.
...
Patch by Graham Horler.
2008-05-20 08:25:48 +00:00
Georg Brandl
b7e419ebb9
Use inspect.getabsfile() to get the documented module's filename.
2008-05-20 08:10:03 +00:00
Georg Brandl
fb3de1fcd2
Improve diffing logic and output for test_pydoc.
2008-05-20 08:07:36 +00:00
Georg Brandl
bcdafa44f2
Remove html package and fix test_htmlparser.
2008-05-20 07:58:42 +00:00
Georg Brandl
dffbf5f542
Revert copy_reg -> copyreg rename.
2008-05-20 07:49:57 +00:00
Georg Brandl
6634bf2919
Tkinter rename reversal: remove tkinter package, adapt imports and docs.
2008-05-20 07:13:37 +00:00
Georg Brandl
7bb1653cc3
Argh, this is the *actual* test that works under Windows.
2008-05-20 06:47:31 +00:00
Georg Brandl
b740f6a0c7
Activate two more test cases in test_httpservers.
2008-05-20 06:15:36 +00:00
Fred Drake
d995e1150c
revert creation of the html.entities and html.parser modules
...
(http://bugs.python.org/issue2882 )
2008-05-20 06:08:38 +00:00
Benjamin Peterson
d21dabc890
change some imports in tests so they will not be skipped in 3.0
2008-05-18 23:07:07 +00:00
Benjamin Peterson
913c15c1c6
fix test_platform (os was not imported)
2008-05-18 22:07:42 +00:00
Georg Brandl
6e7e0790de
Fix test_pyclbr after another platform-dependent function was added to urllib.
2008-05-18 21:10:19 +00:00
Ronald Oussoren
7a0f4c75b1
- Add unittests for platform.mac_ver (or rather, ensure that the unittest for
...
that function actually tests something on OSX).
- Add documentation to platform.mac_ver that explains why the middle element
of the return value will not contain useful information.
2008-05-18 20:54:47 +00:00
Benjamin Peterson
f5c38dadf6
bring test_pydoc up to my high standards (now that I have them)
2008-05-18 20:48:07 +00:00
Georg Brandl
8632cc2573
GHOP #121 : improve test_pydoc, by Benjamin Peterson.
2008-05-18 16:32:48 +00:00
Georg Brandl
0bb0299ad8
Take namedtuple item names only from ascii_letters (this blew up on OSX),
...
and make sure there are no duplicate names.
2008-05-18 10:39:26 +00:00
Georg Brandl
f899dfa1d1
GHOP #134 , #171 , #137 : unit tests for the three HTTPServer modules.
2008-05-18 09:12:20 +00:00
Georg Brandl
a9916b55de
#2353 : raise Py3k warning in file.xreadlines().
2008-05-17 22:11:54 +00:00
Fred Drake
cb51d84214
update references and documentation for modules in the new html package
...
(http://bugs.python.org/issue2882 )
2008-05-17 21:14:05 +00:00
Fred Drake
91ae250273
rename HTMLParser to html.parser, htmlentitydefs to html.entities
...
(http://bugs.python.org/issue2882 )
2008-05-17 20:30:04 +00:00
Benjamin Peterson
c6d64ec83f
revert 63425 over Guido's Febuary message about this, that I missed
2008-05-17 20:09:42 +00:00
Benjamin Peterson
d7943cb71d
fix spelling
2008-05-17 19:51:10 +00:00
Benjamin Peterson
79a922d6df
add Py3k warnings to oct and hex. backport hex behavior (because it's not different)
2008-05-17 19:21:20 +00:00
Gregory P. Smith
af8a68733f
fix issue2381: test_subprocess fails if your sys.executable is on a
...
path with a space in it.
2008-05-17 07:17:34 +00:00
Alexandre Vassalotti
3c4971c40e
Added Python 3.0 warning to cPickle.
2008-05-16 19:14:31 +00:00
Alexandre Vassalotti
ea0b22a167
Patch by Quentin Gallet-Gilles: Renaming leftovers for 2.6.
...
This fixes the omissions of configparser, copyreg, queue and
socketserver renaming.
2008-05-16 18:03:52 +00:00
Georg Brandl
ad9afeb8f0
Tkinter rename, step 2: fix imports and add stub modules.
2008-05-16 15:48:15 +00:00
Georg Brandl
ecf9091f59
Don't allow keyword arguments to reversed().
2008-05-16 13:24:29 +00:00
Georg Brandl
5ffad6646e
Make generator repr consistent with function and code object repr.
2008-05-16 09:34:48 +00:00
Alexandre Vassalotti
a8eaf8faf3
Rename the test file of reprlib.
2008-05-16 07:14:08 +00:00
Alexandre Vassalotti
50a1acb2ab
Changed references to the reprlib module to use its new name.
2008-05-16 06:58:49 +00:00
Alexandre Vassalotti
95d97c7390
Renamed the repr module to reprlib.
...
Added stub module for repr.
2008-05-16 06:37:57 +00:00
Benjamin Peterson
5915a4dcfe
make test_platform a bit more assertive (We'll see what the buildbots say.)
2008-05-16 02:24:49 +00:00
Brett Cannon
fa40bbf625
Deprecated statvfs for removal in 3.0.
2008-05-16 00:50:02 +00:00
Brett Cannon
90f2cb422f
Remove the last usage of statvfs in the stdlib.
2008-05-16 00:37:42 +00:00
Brett Cannon
2224817cdf
Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0.
2008-05-16 00:10:24 +00:00
Alexandre Vassalotti
f7f439b6f1
Fixed typo in a doctest of test_genexps.
2008-05-15 20:31:42 +00:00
Georg Brandl
c91210c06b
#2863 : add gen.__name__ and add this name to generator repr().
2008-05-15 15:08:32 +00:00
Brett Cannon
74a596c068
Deprecate WAIT for removal in 3.0.
2008-05-15 04:17:35 +00:00
Brett Cannon
f56b6aeb06
Deprecated torgb for removal in 3.0.
2008-05-15 04:15:25 +00:00
Brett Cannon
518c5da219
Deprecate SV for removal in 3.0.
2008-05-15 04:13:19 +00:00
Brett Cannon
cd2de08257
Deprecate readcd for removal in 3.0.
2008-05-15 03:51:21 +00:00
Brett Cannon
7e37586c50
The panel module for IRIX has been deprecated for removal in 3.0.
2008-05-15 03:46:27 +00:00
Brett Cannon
89f5d9cc81
Deprecate jpeg for IRIX for removal in 3.0.
2008-05-15 03:44:00 +00:00
Brett Cannon
d8c41ecc17
Deprecate IOCTL from IRIX for removal in 3.0.
2008-05-15 03:41:55 +00:00
Brett Cannon
6328b297dc
Deprecate IN from IRIX for removal in 3.0.
2008-05-15 03:36:13 +00:00
Brett Cannon
4652537ba4
Deprecate imgfile for removal in 3.0.
2008-05-15 03:32:11 +00:00
Brett Cannon
707e384a7a
Deprecate GLWS from IRIX for removal in 3.0.
2008-05-15 03:29:18 +00:00
Brett Cannon
82bd94e651
Deprecate GET from IRIX for removal in 3.0.
2008-05-15 03:27:12 +00:00
Brett Cannon
75ba465099
Deprecated 'fm' for removal in 3.0.
2008-05-15 03:23:17 +00:00
Brett Cannon
178582e2a4
FL, flp, and fl from IRIX have been deprecated for removal in 3.0.
2008-05-15 03:20:36 +00:00
Brett Cannon
72ccc40db5
FILE from IRIX has been deprecated for removal in 3.0.
2008-05-15 03:17:24 +00:00
Brett Cannon
2773b6f1c9
Deprecate ERRNO for removal in 3.0.
2008-05-15 03:14:57 +00:00
Brett Cannon
044616aa24
Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for removal in 3.0.
2008-05-15 02:33:55 +00:00
Alexandre Vassalotti
e2514c6f10
Updated import statements to use the new `configparser` module name.
...
Updated the documentation to use the new name.
Revert addition of the stub entry for the old name.
Georg, I am reverting your changes since this commit should propagate
to py3k.
2008-05-14 22:44:22 +00:00
Alexandre Vassalotti
e3a23c0734
Renamed the ConfigParser module to 'configparser'.
2008-05-14 22:07:07 +00:00
Brett Cannon
650f5161f4
Deprecate CL, CL_old, and cl for 3.0.
2008-05-14 21:12:12 +00:00
Brett Cannon
54c77aa459
Deprecate the cdplayer module for IRIX for 3.0.
2008-05-14 21:08:41 +00:00
Brett Cannon
9eebe49d07
The cddb module for IRIX has been deprecated for 3.0.
2008-05-14 20:34:22 +00:00
Brett Cannon
ddf949f194
The CD and cd modules for IRIX are deprecated for 3.0.
2008-05-14 20:31:38 +00:00
Georg Brandl
885982283e
Fix another "refleak" by clearing the filters after test.
2008-05-14 07:18:22 +00:00
Neal Norwitz
40388cc330
Fix "refleak" by restoring the tearDown method removed by accident (AFAICT)
...
in r62788.
2008-05-14 06:47:56 +00:00
Gregory P. Smith
ee365b9f92
Enable the updated Lib/bsddb/test suite to run.
2008-05-14 04:27:01 +00:00
Brett Cannon
ea785fb0cf
Rewrap some lines in test_py3kwarn.
2008-05-14 01:09:40 +00:00
Brett Cannon
34721d5683
Deprecate al/AL for removal in 3.0.
2008-05-14 01:08:21 +00:00
Georg Brandl
913835763a
#2831 : add start argument to enumerate(). Patch by Scott Dial and me.
2008-05-13 19:04:54 +00:00
Benjamin Peterson
bbb093751c
use .format and fix a bug
2008-05-13 00:09:46 +00:00
Benjamin Peterson
ab1fb9f728
Make error messages more helpful
2008-05-12 22:26:05 +00:00
Amaury Forgeot d'Arc
e1b93f2855
Adapt test_pyclbr to the new version of urllib.py:
...
The new mac-specific functions must be ignored.
2008-05-12 22:21:39 +00:00
Benjamin Peterson
236819310d
Add warnings to and deprecated all those Mac modules
2008-05-12 21:42:13 +00:00
Georg Brandl
23da6e6545
#1713041 : fix pprint's handling of maximum depth.
2008-05-12 16:26:52 +00:00
Brett Cannon
ac861b5a17
Deprecate the sv module as per PEP 4.
2008-05-12 03:45:59 +00:00
Brett Cannon
43e5ef49b1
Deprecate the multifile module as per PEP 4.
2008-05-12 03:19:20 +00:00
Alexandre Vassalotti
d192c925ac
Updated all import statements to use the new socketserver module name.
...
Renamed socketserver module in its own documentation.
Renamed documentation references.
2008-05-12 02:11:22 +00:00
Alexandre Vassalotti
fb9ce65a91
Renamed SocketServer to 'socketserver'.
...
Deprecated old name.
2008-05-12 01:37:10 +00:00
Benjamin Peterson
b9030f4f0d
#2196 hasattr now allows SystemExit and KeyboardInterrupt to propagate
2008-05-12 00:41:23 +00:00
Brett Cannon
42bfa90f02
Depreate imageop for removal in 3.0.
2008-05-12 00:08:34 +00:00
Alexandre Vassalotti
1fcaa77ac5
Revert commit r63086.
2008-05-11 23:12:38 +00:00
Alexandre Vassalotti
8940ecd39d
Added stub for the PixMapWrapper module to be renamed in 3.0.
...
Modified TestStdlibRenames to support platform specific renames.
Added test for PixMapWrapper rename warning.
Added note to documentation about PixMapWrapper rename.
2008-05-11 20:30:43 +00:00
Alexandre Vassalotti
73812bf2a6
Added test for Queue rename warning.
...
Added note to documentation about Queue rename.
2008-05-11 20:04:03 +00:00
Eric Smith
cf537ff39e
Addresses issue 2802: 'n' formatting for integers.
...
Adds 'n' as a format specifier for integers, to mirror the same
specifier which is already available for floats. 'n' is the same as
'd', but inserts the current locale-specific thousands grouping.
I added this as a stringlib function, but it's only used by str type,
not unicode. This is because of an implementation detail in
unicode.format(), which does its own str->unicode conversion. But the
unicode version will be needed in 3.0, and it may be needed by other
code eventually in 2.6 (maybe decimal?), so I left it as a stringlib
implementation. As long as the unicode version isn't instantiated,
there's no overhead for this.
2008-05-11 19:52:48 +00:00
Alexandre Vassalotti
30ece44f2e
Added stub for the Queue module to be renamed in 3.0.
...
Use the 3.0 module name to avoid spurious warnings.
2008-05-11 19:39:48 +00:00
Georg Brandl
b52a74b517
#2816 : clarify error messages for EOF while scanning strings.
2008-05-11 15:07:39 +00:00
Georg Brandl
6a57c08dc8
#1326 : document and test zipimporter.archive and zipimporter.prefix.
2008-05-11 15:05:13 +00:00
Andrew M. Kuchling
6c02916dfb
#1792 : Improve performance of marshal.dumps() on large objects by increasing
...
the size of the buffer more quickly.
2008-05-11 13:33:56 +00:00
Georg Brandl
6f95ae55b1
#2659 : add ``break_on_hyphens`` to TextWrapper.
2008-05-11 10:42:28 +00:00
Alexandre Vassalotti
25ad76c91d
Added test for copy_reg rename.
...
Added note to documentation about copy_reg rename.
2008-05-11 09:01:51 +00:00
Alexandre Vassalotti
9510e4a9f8
Added module stub for copy_reg renaming in 3.0.
...
Renamed copy_reg to copyreg in the standard library, to avoid
spurious warnings and ease later merging to py3k branch. Public
documentation remains intact.
2008-05-11 08:25:28 +00:00
Alexandre Vassalotti
f602c71b07
Removed a dead line of code.
2008-05-11 07:10:25 +00:00
Alexandre Vassalotti
445ff35d5c
Fixed typo in a comment of test_support.CleanImport.
2008-05-11 07:08:12 +00:00
Alexandre Vassalotti
eb83f70586
Added test framework for handling module renames.
...
Factored the import guard in test_py3kwarn.TestStdlibRemovals into
a context manager, namely test_support.CleanImport.
2008-05-11 07:06:04 +00:00
Brett Cannon
2a86913864
Deprecated the mhlib module for removal in 3.0.
2008-05-11 03:01:47 +00:00
Brett Cannon
df0a717037
The linuxaudidev module has been deprecated for removal in Python 3.0.
2008-05-11 00:50:51 +00:00
Brett Cannon
27508d4eb9
Deprecate ihooks for removal in 3.0.
2008-05-10 22:45:07 +00:00
Brett Cannon
fe5985188d
Deprecate the fpformat module for removal in 3.0.
2008-05-10 22:11:45 +00:00
Brett Cannon
7f874fce63
Deprecate the dl module for removal in 3.0.
2008-05-10 21:20:19 +00:00
Brett Cannon
0aa6e1b8fb
Deprecate the dircache module for 3.0.
2008-05-10 21:12:57 +00:00
Brett Cannon
ddf7a4214e
Make sure warnings are not suppressed when testing for the raised
...
DeprecationWarning.
2008-05-10 03:16:38 +00:00
Brett Cannon
d5a0985265
The Canvas module has been deprecated for removal in 3.0.
2008-05-10 03:14:32 +00:00
Brett Cannon
756bc0b722
Add a test for the deprecation of the compiler package.
2008-05-10 03:09:35 +00:00
Benjamin Peterson
5f9050a1c6
Add the examples in the json module docstring as a doctest
2008-05-10 03:08:17 +00:00
Brett Cannon
6192df10b6
Deprecate the compiler package for removal in 3.0.
2008-05-10 02:58:26 +00:00
Brett Cannon
af87804831
Also ignore package deprecations.
2008-05-10 02:57:03 +00:00
Brett Cannon
edb628f241
Suppress deprecations for packages as well when using
...
test.test_support.import_module().
2008-05-10 02:54:52 +00:00
Brett Cannon
768d44f54d
Deprecate the bsddb185 module for removal in 3.0.
2008-05-10 02:47:54 +00:00
Brett Cannon
4c1f881f13
Deprecate Bastion and rexec for 3.0.
2008-05-10 02:27:04 +00:00
Brett Cannon
9ac3974de8
Deprecate the pure module for 3.0.
2008-05-09 22:51:58 +00:00
Alexandre Vassalotti
1aed624f7c
Backport fast alternate io.BytesIO implementation.
...
Merged r62778, r62779, r62802, r62806, r62807, r62808, r62809, r62844,
r62846, r62952, r62956.
2008-05-09 21:49:43 +00:00
Mark Dickinson
f8476c1573
Issue #2487 . math.ldexp(x, n) raised OverflowError when n was large and
...
negative; fix to return an (appropriately signed) zero instead.
2008-05-09 17:54:23 +00:00
Brett Cannon
3c75914434
Deprecate test.testall for removal in 3.0.
2008-05-09 05:25:37 +00:00
Brett Cannon
d7265d6483
Deprecate the new module for removal in 3.0.
2008-05-09 05:18:40 +00:00
Benjamin Peterson
0893a0a961
Add Py3k warnings to os.path.walk
2008-05-09 00:27:01 +00:00
Benjamin Peterson
9ec4aa01f9
Replace instances of os.path.walk with os.walk
2008-05-08 22:09:54 +00:00
Brett Cannon
e3b1940eb9
Deprecate the user module for removal in 3.0.
2008-05-08 20:36:09 +00:00
Brett Cannon
be1501b976
Fix sys.flags to properly expose bytes_warning.
...
Closes issue #2790 .
2008-05-08 20:23:06 +00:00
Brett Cannon
5d023c3afa
Fix a bug introduced by the addition of the 'record' argument to
...
test.test_support.catch_warning() where showwarning() was not being set
properly.
2008-05-08 20:20:24 +00:00
Brett Cannon
bfb997d6a5
Make test.test_support.catch_warning() take an argument specifying if any
...
triggered warnings should be captured. This allows the context manager to be
used to just prevent the internal state of the 'warnings' framework and thus
allow triggered warnings to be displayed.
2008-05-08 19:50:51 +00:00
Brett Cannon
9d44182427
The mutex module has been deprecated for removal in 3.0.
2008-05-08 19:26:08 +00:00
Brett Cannon
80bb9d92e3
Deprecate the imputil module for removal in 3.0.
2008-05-08 18:15:14 +00:00
Christian Heimes
c2ca6db143
Disabled some unit tests for the upcoming release. See #2777
2008-05-06 23:42:58 +00:00
Brett Cannon
e5d2cbaeaf
Deprecate the audiodev module for 3.0.
2008-05-06 23:23:34 +00:00
Brett Cannon
79618239d1
When testing a module's __all__, we really don't care if it is deprecated.
2008-05-06 23:22:02 +00:00
Christian Heimes
af748c3ab8
Implemented PEP 370
2008-05-06 22:41:46 +00:00
Benjamin Peterson
d295032910
Fix logic error in Python/_warnings.c and add a test to verify
2008-05-06 22:18:11 +00:00
Brett Cannon
e3dcb01bfc
Fix a bug in the handling of the stacklevel argument in warnings.warn() where
...
the stack was being unwound by two levels instead of one each time.
2008-05-06 04:37:31 +00:00
Gregory P. Smith
24237ea8a1
Fix a bug introduced in r62627. see issue2760 and issue2632.
...
An assertion in readline() would fail as data was already in the
internal buffer even though the socket was in unbuffered read mode.
That case is now handled. More importantly, read() has been fixed to
not over-recv() and leave newly recv()d data in the _fileobject buffer.
The max() vs min() issue in read() is now gone. Neither was correct.
On bounded reads, always ask recv() for the exact amount of data we
still need.
Candidate for backporting to release25-maint along with r62627.
2008-05-05 21:53:45 +00:00
Brett Cannon
4b964f9c90
Add the 'json' package. Code taken from simplejson 1.9 and contributed by Bob
...
Ippolito.
Closes issue #2750 .
2008-05-05 20:21:38 +00:00
Martin v. Löwis
5f2e0e5ccb
Revert bogus checkin in r62724 to that file.
2008-05-05 17:54:01 +00:00
Martin v. Löwis
c3ad68c88a
Fix Unicode filename test.
2008-05-05 17:47:06 +00:00
Martin v. Löwis
471617d6d3
Issue #1734346 : Support Unicode file names for zipfiles.
2008-05-05 17:16:58 +00:00
Brett Cannon
8a232cc385
Add a DeprecationWarning for when warnings.showwarning() is set to a function
...
that lacks support for the new 'line' argument.
2008-05-05 05:32:07 +00:00
Benjamin Peterson
979395b7a8
Moved testing of builtin types out of test_builtin and into type specific modules
2008-05-03 21:35:18 +00:00
Amaury Forgeot d'Arc
7684f85297
In test_io, StatefulIncrementalDecoderTest was not part of the test suite.
...
And of course, the test failed:
a bytearray was used without reason in io.TextIOWrapper.tell().
The difference is that iterating over bytes (i.e. str in python2.6) returns 1-char bytes,
whereas bytearrays yield integers.
This code should still work with python3.0
2008-05-03 12:21:13 +00:00
Brett Cannon
64a4bbeb25
Fix the C implementation of 'warnings' to infer the filename of the module that
...
raised an exception properly when __file__ is not set, __name__ == '__main__',
and sys.argv[0] is a false value.
Closes issue2743.
2008-05-03 03:19:39 +00:00
Facundo Batista
ee340e501d
Fixed some test structures. Thanks Mark Dickinson.
2008-05-02 17:39:00 +00:00
Benjamin Peterson
95287fa951
Remove some from __future__ import with_statements
2008-04-30 21:25:55 +00:00
Benjamin Peterson
d8f2d0bdb3
make test_support's captured_output a bit more robust when exceptions happen
2008-04-30 21:03:58 +00:00
Georg Brandl
28e0873f1f
#2719 : backport next() from 3k.
2008-04-30 19:47:09 +00:00
Eric Smith
0a95063d73
Issue 2526, float.__format__ 'n' specifier does not support thousands grouping.
...
Implemented grouping, with tests.
Cleaned up PyOS_ascii_formatd by breaking reformatting into smaller functions.
2008-04-30 01:09:30 +00:00
Amaury Forgeot d'Arc
87da1278eb
test_sundry performs minimal tests (a simple import...) on modules that are not tested otherwise.
...
Some of them now have tests and can be removed.
Only 70 to go...
2008-04-28 21:07:06 +00:00
Brett Cannon
8dc4303297
Rename the test_traceback_print() function to traceback_print() to prevent
...
test_capi from automatically calling the function.
2008-04-28 04:50:06 +00:00
Brett Cannon
141534e56f
Fix a bug introduced by the warnings rewrite where tracebacks were being
...
improperly indented.
Closes issue #2699 .
2008-04-28 03:23:50 +00:00
Benjamin Peterson
14204ad982
Allow test_import to work when it is invoked directly
2008-04-25 21:43:56 +00:00
Mark Dickinson
fe536f53ea
Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill.
2008-04-25 16:59:09 +00:00
Armin Rigo
5364e2e46f
A new crasher.
2008-04-25 09:35:18 +00:00
Amaury Forgeot d'Arc
1c596d5604
Use absolute import for test package
2008-04-24 20:41:50 +00:00
Amaury Forgeot d'Arc
747720540c
Add a few tests for pydoc.
...
This is a modified version of a patch proposed by Humberto Diogenes
in the discussion of issue1883.
I will merge manually this change into the py3k branch: the tests must be adapted.
2008-04-24 20:22:26 +00:00
Amaury Forgeot d'Arc
48ebc264f8
Disable gc when running test_trace, or we may record the __del__ of collected objects.
...
See http://mail.python.org/pipermail/python-checkins/2008-April/068633.html
the extra events perfectly match several calls to socket._fileobject.__del__()
2008-04-24 20:10:26 +00:00
Amaury Forgeot d'Arc
5216721a53
Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0).
...
This happened only when 8 is the first digit.
Credits go to Lukas Meuser.
2008-04-24 18:07:05 +00:00
Amaury Forgeot d'Arc
9686585a82
Issue #2670 : urllib2.build_opener() failed when two handlers
...
derive the same default base class.
Will backport.
2008-04-22 21:14:41 +00:00
Andrew M. Kuchling
a5489d415e
Comment typo
2008-04-21 01:45:57 +00:00
Amaury Forgeot d'Arc
eac43afdc9
Correct an apparent refleak in test_pkgutil: zipimport._zip_directory_cache contains
...
info for all processed zip files, even when they are no longer used.
2008-04-20 21:02:21 +00:00
Mark Dickinson
d6d5148b44
Add test for tanh(-0.) == -0. on IEEE 754 systems
2008-04-20 20:38:48 +00:00
Mark Dickinson
cec3f138d8
Yet more explicit special case handling to make
...
math.pow behave on alpha Tru64. All IEEE 754
special values are now handled directly; only
the finite**finite case is handled by libm.
2008-04-20 04:13:13 +00:00
Mark Dickinson
9f99d70513
Report additional diagnostic information in
...
test_math, to help track down debian-alpha
buildbot failure.
2008-04-20 01:22:30 +00:00
Mark Dickinson
e941d97d12
Additional tests for math.pow, and extra special-case
...
handling code in math.pow, in the hope of making all
tests pass on the alpha Tru64 buildbot.
2008-04-19 18:51:48 +00:00
Christian Heimes
e74c8f2879
Added kill, terminate and send_signal to subprocess.Popen
...
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
2008-04-19 02:23:57 +00:00
Amaury Forgeot d'Arc
607bff1ebe
Some tests did not pass on repeated calls (regrtest -R::)
...
Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
2008-04-18 23:31:33 +00:00
Christian Heimes
6f34109384
I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
...
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
2008-04-18 23:13:07 +00:00
Skip Montanaro
b131f0468f
resolve issue 2014
2008-04-18 20:35:46 +00:00
Nick Coghlan
1e88992224
Add test file missing from rev 62350
2008-04-15 10:28:14 +00:00
Brett Cannon
c477427eba
Fix spliting on colons on Windows machines with a file path by limiting the
...
number of splits.
2008-04-13 17:41:31 +00:00
Brett Cannon
25bb8182c6
Add an explicit check for output in a test to try to diagnose a failure on
...
Windows.
2008-04-13 17:09:43 +00:00
Skip Montanaro
e3d3785e11
spelling
2008-04-13 03:17:30 +00:00
Brett Cannon
667bb4f236
Fix test_warnings by making the state of things more consistent for each test
...
when it is run.
2008-04-13 02:42:36 +00:00
Brett Cannon
e974689038
Re-implement the 'warnings' module in C. This allows for usage of the
...
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.
Closes issue #1631171 .
2008-04-12 23:44:07 +00:00
Neal Norwitz
36a59b4a08
Remove the test file before writing it in case there is no write permission.
...
This might help fix some of the failures on Windows box(es). It doesn't hurt
either way and ensure the tests are a little more self contained (ie have
less assumptions).
2008-04-10 05:46:39 +00:00
Gregory P. Smith
f108320055
better diagnostics
2008-04-09 23:11:56 +00:00
Jerry Seutter
8f80a6a5f9
Changed test so it no longer runs as a side effect of importing.
2008-04-09 05:07:58 +00:00
Trent Nelson
6c4a7c6821
Fix typo with regards to self.PORT shadowing class variables with the same name.
2008-04-09 00:34:53 +00:00
Gregory P. Smith
79e42a0e08
Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive.
...
It tried to allocate negative or zero memory. That fails.
2008-04-09 00:25:17 +00:00
Trent Nelson
e41b0061dd
- Issue #2550 : The approach used by client/server code for obtaining ports
...
to listen on in network-oriented tests has been refined in an effort to
facilitate running multiple instances of the entire regression test suite
in parallel without issue. test_support.bind_port() has been fixed such
that it will always return a unique port -- which wasn't always the case
with the previous implementation, especially if socket options had been
set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The
new implementation of bind_port() will actually raise an exception if it
is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or
SO_REUSEPORT socket option set. Furthermore, if available, bind_port()
will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed.
This currently only applies to Windows. This option prevents any other
sockets from binding to the host/port we've bound to, thus removing the
possibility of the 'non-deterministic' behaviour, as Microsoft puts it,
that occurs when a second SOCK_STREAM socket binds and accepts to a
host/port that's already been bound by another socket. The optional
preferred port parameter to bind_port() has been removed. Under no
circumstances should tests be hard coding ports!
test_support.find_unused_port() has also been introduced, which will pass
a temporary socket object to bind_port() in order to obtain an unused port.
The temporary socket object is then closed and deleted, and the port is
returned. This method should only be used for obtaining an unused port
in order to pass to an external program (i.e. the -accept [port] argument
to openssl's s_server mode) or as a parameter to a server-oriented class
that doesn't give you direct access to the underlying socket used.
Finally, test_support.HOST has been introduced, which should be used for
the host argument of any relevant socket calls (i.e. bind and connect).
The following tests were updated to following the new conventions:
test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib,
test_poplib, test_ftplib, test_telnetlib, test_socketserver,
test_asynchat and test_socket_ssl.
It is now possible for multiple instances of the regression test suite to
run in parallel without issue.
2008-04-08 23:47:30 +00:00
Amaury Forgeot d'Arc
4b798bdf8a
Issue2564: Prevent a hang in "import test.autotest", which runs the entire test
...
suite as a side-effect of importing the module.
- in test_capi, a thread tried to import other modules
- re.compile() imported sre_parse again on every call.
2008-04-08 21:27:42 +00:00
Gregory P. Smith
aa63d0d4af
Make file objects as thread safe as the underlying libc FILE* implementation.
...
close() will now raise an IOError if any operations on the file object
are currently in progress in other threads.
Most code was written by Antoine Pitrou (pitrou). Additional testing,
documentation and test suite cleanup done by me (gregory.p.smith).
Fixes issue 815646 and 595601 (as well as many other bugs and
references to this problem dating back to the dawn of Python).
2008-04-06 23:11:17 +00:00