Raymond Hettinger
d6fc2623c5
Validate that __length_hint__ returns a usable result.
2009-02-03 02:23:19 +00:00
Raymond Hettinger
b516370bcb
Issue 1242657: list(obj) can swallow KeyboardInterrupt.
2009-02-02 21:50:13 +00:00
Guilherme Polo
3b331dd3ea
Restore Tkinter.Tk._loadtk so this test doesn't fail for problems
...
related to ttk.
2009-02-01 02:56:16 +00:00
Gregory P. Smith
de1a8b720a
- Issue #5104 : The socket module now raises OverflowError when 16-bit port and
...
protocol numbers are supplied outside the allowed 0-65536 range on bind()
and getservbyport().
2009-01-31 22:57:30 +00:00
Mark Dickinson
f709ab8526
Add an extra test for long <-> float hash equivalence.
2009-01-31 16:44:04 +00:00
Benjamin Peterson
1de05e9b2a
check the errno in bad fd cases
2009-01-31 01:42:55 +00:00
Benjamin Peterson
b3619be995
make _tkinter._flatten check the result of PySequence_Size for errors #3880
2009-01-30 02:24:39 +00:00
Antoine Pitrou
707c593761
Issue #2047 : shutil.move() could believe that its destination path was
...
inside its source path if it began with the same letters (e.g. "src" vs.
"src.new").
2009-01-29 20:19:34 +00:00
Raymond Hettinger
f779e6f51b
Issue 4920: Fixed next() vs __next__() issues in the ABCs
...
for Iterator and MutableSet. Also added thorough test for
required abstractmethods.
2009-01-28 23:02:26 +00:00
Guilherme Polo
b1a98de25e
Issue #5083 : New 'gui' resource for regrtest.
2009-01-28 20:03:26 +00:00
Guilherme Polo
7a77ee88af
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
...
* Added ttk tests to the expected skips mapping just like where test_tcl
was expected to be skipped too.
2009-01-28 19:28:04 +00:00
Guilherme Polo
cda93aafde
Added the ttk module. See issue #2983 : Ttk support for Tkinter.
2009-01-28 13:09:03 +00:00
Raymond Hettinger
560f9a8a90
Add more tests for the powerset() recipe.
2009-01-27 13:26:35 +00:00
Raymond Hettinger
2f6c2e03a8
More exhaustive combinatoric checks.
2009-01-27 10:36:14 +00:00
Raymond Hettinger
f93f3032c6
Stronger tests for combinatoric relationships.
2009-01-27 09:52:35 +00:00
Raymond Hettinger
2976aaa396
Add tests to verify combinatoric relationships.
2009-01-27 09:33:06 +00:00
Raymond Hettinger
d081abc8be
Promote combinations_with_replacement() from a recipe to a regular itertool.
2009-01-27 02:58:49 +00:00
Brett Cannon
93881c6c58
Backport importlib in the form of providing importlib.import_module(). This has
...
been done purely to help transitions from 2.7 to 3.1.
2009-01-26 01:16:50 +00:00
Raymond Hettinger
68d919e4d6
Improved itertools recipe for generating powerset().
2009-01-25 21:31:47 +00:00
Raymond Hettinger
2bcb8e9b0d
Promote compress() from a recipe to being a regular itertool.
2009-01-25 21:04:14 +00:00
Tarek Ziadé
1af3b5a9a4
Issue #4863 , removing remaining bits
2009-01-25 19:29:10 +00:00
Benjamin Peterson
78821ddf8c
fix building the core with --disable-unicode
...
I changed some bytearray methods to use strings instead of unicode like bytes_repr
Also, bytearray.fromhex() can take strings as well as unicode
2009-01-25 17:15:10 +00:00
Mark Dickinson
a3ecd2c668
Issue #1672332 : Fix unpickling of subnormal floats, which was raising
...
ValueError on some platforms as a result of the platform strtod setting
errno on underflow.
2009-01-24 16:40:29 +00:00
Mark Dickinson
c187d11af3
Issue #5025 : Fix occasional test_kqueue failure on OS X.
2009-01-24 16:17:27 +00:00
Martin v. Löwis
0dfcfc8b59
Issue #4710 : Extract directories properly in the zipfile module;
...
allow adding directories to a zipfile.
2009-01-24 14:00:33 +00:00
Kristján Valur Jónsson
89e759d462
Add a test for UNC import paths, see issue 3677
2009-01-24 10:52:26 +00:00
Raymond Hettinger
0a1f7b8f72
Tighten-up the docs for Counter().
2009-01-21 23:12:51 +00:00
Raymond Hettinger
4571f347f9
Simplify explanation of multiset operations by removing restrictions on negative inputs.
2009-01-21 20:31:50 +00:00
Jesse Noller
7314b38168
Issue 5009: multiprocessing: failure in manager._debug_info()
2009-01-21 02:08:17 +00:00
Antoine Pitrou
e741cc607c
Issue #5008 : When a file is opened in append mode with the new IO library,
...
do an explicit seek to the end of file (so that e.g. tell() returns the
file size rather than 0). This is consistent with the behaviour of the
traditional 2.x file object.
2009-01-21 00:45:36 +00:00
Raymond Hettinger
933d3a7a54
Issue 4998: __slots__ on Fractions was useless.
2009-01-20 20:34:19 +00:00
Benjamin Peterson
e18ef194d9
allow unicode keyword arguments for the ** syntax #4978
2009-01-20 14:21:16 +00:00
Raymond Hettinger
bad1eb2ff3
Build-outs for Counter() class:
...
* Constructor and update() support keyword args (like their dict counterparts).
* The 'del' statement no longer raises KeyError for missing values.
* Add multiset operations: __add__, __sub__, __and__, __or__.
2009-01-20 01:19:26 +00:00
Benjamin Peterson
1f01cd013f
I'm sick of these deprecations warnings in test_os
2009-01-19 21:08:37 +00:00
Benjamin Peterson
5539c78391
make bad file descriptor tests more robust
2009-01-19 17:37:42 +00:00
Jesse Noller
9a5b2ad38d
Resolve issue 3321: (segfault) _multiprocessing.Connection() doesn't check handle
2009-01-19 15:12:22 +00:00
Kristján Valur Jónsson
2e659ce36f
Issue 4957
...
Let os.ftruncate raise OSError like documented.
2009-01-19 13:10:27 +00:00
Benjamin Peterson
5848d1ff35
raise an OSError for invalid fds #4991
2009-01-19 00:08:08 +00:00
Benjamin Peterson
910f216260
fix test that wasn't working as expected #4990
2009-01-18 21:11:38 +00:00
Kristján Valur Jónsson
60e79ced94
issue 4293: make test_capi.py more robutst, it times out on some platforms, presumably waiting for threads. Lower the thread count to 16.
2009-01-18 10:58:44 +00:00
Jesse Noller
6ab22154dd
Resolve issue 4449: AssertionError in mp_benchmarks.py
2009-01-18 02:45:38 +00:00
Benjamin Peterson
5e5fbb612d
fix inspect.isclass() on instances with a custom __getattr__ #1225107
2009-01-17 22:27:54 +00:00
Benjamin Peterson
f320c22701
trying to find some fpathconf() settings that all unixs support...
2009-01-17 04:39:05 +00:00
Benjamin Peterson
b3af601b22
compare with == not is #4946
2009-01-16 02:55:24 +00:00
Kristján Valur Jónsson
4f69b7e33b
Make all the invalid fd tests for os subject to the function being available.
2009-01-15 22:46:26 +00:00
Kristján Valur Jónsson
71ba215d6b
Fix two test cases in test_os. ftruncate raises IOError unlike all the others which raise OSError. And close() on some platforms doesn't complain when given an invalid file descriptor.
2009-01-15 22:40:03 +00:00
Mark Dickinson
0e15182a38
Comment typo
2009-01-15 14:58:28 +00:00
Mark Dickinson
e82cdae58f
Issue #4397 . Fix occasional test_socket failure on OS X.
2009-01-15 14:54:37 +00:00
Kristján Valur Jónsson
8adc0b54d4
Fix recently introduced test cases.
...
For datetime, gentoo didn't seem to mind the %e format for strftime. So, we just excercise those instead making sure that we don't crash.
For test_os, two cases were incorrect.
2009-01-15 09:09:13 +00:00
Kristján Valur Jónsson
018760e3dc
Re-enable all tests for windows platforms.
...
Also, explicitly connect to the IPV4 address. On windows platforms supporting AF_INET6, the SocketProxy would connect using socket.create_connection('localhost', port) which would cycle through all address families and try to connect. It would try connecting using AF_INET6 first and this would cause a delay of up to a second.
2009-01-14 10:50:57 +00:00
Raymond Hettinger
afd112baef
Add tests for __init__() and update() with no args.
2009-01-14 01:15:06 +00:00
Amaury Forgeot d'Arc
b54447f31c
#1162154 : inspect.getmembers() now skips attributes that raise AttributeError,
...
e.g. a __slots__ attribute which has not been set.
2009-01-13 23:39:22 +00:00
Georg Brandl
b24c9519b4
Use assertRaises.
2009-01-13 22:14:01 +00:00
Armin Ronacher
dd53e114ef
ast.literal_eval can properly evaluate complex numbers now. This fixes issue4907.
2009-01-13 11:52:23 +00:00
Raymond Hettinger
aaa6e630f8
Simplify Counter() API. Replace items keyword argument
...
with a mapping. Makes Counter() idempotent, makes update()
API the same as Counter.__init__(), makes a more readable
repr, makes the API more dict-like, and allows Steven
Bethard's update() example to work.
2009-01-13 01:05:03 +00:00
Amaury Forgeot d'Arc
a40d573664
#3720 : Interpreter crashes when an evil iterator removes its own next function.
...
Now the slot is filled with a function that always raises.
Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
2009-01-12 23:36:55 +00:00
Raymond Hettinger
f94d7fa5fb
Issue 1696199: Add collections.Counter().
2009-01-12 22:58:41 +00:00
Kristján Valur Jónsson
1c62b650d0
Add tests for invalid format specifiers in strftime, and for handling of invalid file descriptors in the os module.
2009-01-12 18:09:27 +00:00
Kristján Valur Jónsson
3c43fcba8b
Issue 4879: Allow buffering for HTTPResponse
2009-01-11 16:23:37 +00:00
Mark Dickinson
da62f81d1d
Remove an unnecessary check from test_decimal.
2009-01-10 19:14:55 +00:00
Antoine Pitrou
b74fc2b5fe
Issue #3860 : GzipFile and BZ2File now support the context manager protocol.
2009-01-10 16:13:45 +00:00
Kristján Valur Jónsson
0e2d8c36e3
Issue 4293: Make Py_AddPendingCall() thread safe
...
Add test cases and documentation
2009-01-09 21:35:16 +00:00
Raymond Hettinger
5b913e31a1
Forward port r68394 for issue 4816.
2009-01-08 06:39:04 +00:00
Antoine Pitrou
09cafb6335
Use shutil.rmtree rather than os.rmdir.
2009-01-06 18:34:08 +00:00
Antoine Pitrou
e96d4ea4e2
Issue #1180193 : When importing a module from a .pyc (or .pyo) file with
...
an existing .py counterpart, override the co_filename attributes of all
code objects if the original filename is obsolete (which can happen if the
file has been renamed, moved, or if it is accessed through different paths).
Patch by Ziga Seilnacht and Jean-Paul Calderone.
2009-01-06 18:10:47 +00:00
Antoine Pitrou
f0d2c3f730
Issue #4272 : Add an optional argument to the GzipFile constructor to override the timestamp in the gzip stream.
2009-01-04 21:29:23 +00:00
Georg Brandl
fe427895b5
Manually merge r68095,68186,68187,68188,68190 from 2.6 branch.
2009-01-03 22:03:11 +00:00
Raymond Hettinger
f4d8597a59
Issue 4796: Add from_float methods to the decimal module.
2009-01-03 19:02:23 +00:00
Raymond Hettinger
44e1581df3
Issue #4615 . Document how to use itertools for de-duping.
2009-01-02 21:26:45 +00:00
Ronald Oussoren
0238497e93
Fix for issue1594
2009-01-02 14:10:20 +00:00
Antoine Pitrou
733dc74442
fill in actual issue number in tests
2009-01-01 15:38:03 +00:00
Antoine Pitrou
aa687902f2
Issue #3680 : Reference cycles created through a dict, set or deque iterator did not get collected.
2009-01-01 14:11:22 +00:00
Georg Brandl
6269fec171
#4228 : Pack negative values the same way as 2.4
...
in struct's L format.
2009-01-01 12:15:31 +00:00
Nick Coghlan
180e400766
Issue #4701 : implicitly call PyType_Ready from PyObject_Hash
2008-12-30 01:18:48 +00:00
Benjamin Peterson
7af65568ff
#4764 in io.open, set IOError.filename when trying to open a directory on POSIX platforms
2008-12-29 17:56:58 +00:00
Benjamin Peterson
fe231b07e4
#4764 set IOError.filename when trying to open a directory on POSIX platforms
2008-12-29 17:47:42 +00:00
Antoine Pitrou
697ca3d0cb
Issue #4444 : Allow assertRaises() to be used as a context handler.
2008-12-28 14:09:36 +00:00
Georg Brandl
6425a2fa8f
Backport r67974:
...
#4759 : allow None as first argument of bytearray.translate(), for consistency with bytes.translate().
Also fix segfault for bytearray.translate(x, None) -- will backport this part to 3.0 and 2.6.
2008-12-28 11:54:53 +00:00
Benjamin Peterson
8d5934b25d
#4748 lambda generators shouldn't return values
2008-12-27 18:24:11 +00:00
Antoine Pitrou
6f193e0e95
Issue #4756 : zipfile.is_zipfile() now supports file-like objects.
...
Patch by Gabriel Genellina.
2008-12-27 15:43:12 +00:00
Alexandre Vassalotti
e57e9990e7
Fix bogus unicode tests in pickletester.
2008-12-27 10:02:59 +00:00
Alexandre Vassalotti
f852bf97ef
Fix issue #4730 : cPickle corrupts high-unicode strings.
...
Update outdated copy of PyUnicode_EncodeRawUnicodeEscape.
Add a test case.
2008-12-27 07:08:47 +00:00
Hirokazu Yamamoto
0fc0747586
Issue #4740 : Use HIGHEST_PROTOCOL in pickle test.
...
(There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2)
2008-12-27 04:19:48 +00:00
Benjamin Peterson
54686e3c29
#4736 BufferRWPair.closed shouldn't try to call another property as a function
2008-12-24 15:10:27 +00:00
Skip Montanaro
f205c13fac
As a result of a regression that snuck into 2.5.3 add a test case that
...
ensures that when you try to read from a file opened for writing an IOError
is raised.
2008-12-23 03:30:15 +00:00
Benjamin Peterson
f09925da67
add py3k warnings to frame.f_exc_*
2008-12-22 20:16:25 +00:00
Mark Dickinson
1a707981c8
Issue #3439 : add bit_length method to int and long.
...
Thanks Fredrik Johansson and Victor Stinner for code,
Raymond Hettinger for review.
2008-12-17 16:14:37 +00:00
Antoine Pitrou
d0c3515bc5
Issue #2183 : Simplify and optimize bytecode for list comprehensions.
2008-12-17 00:38:28 +00:00
Amaury Forgeot d'Arc
31949b9108
#3954 : Fix error handling code in _hotshot.logreader
...
Will port to 2.6. hotshot was deleted from python 3.
2008-12-15 21:47:57 +00:00
Nick Coghlan
68060013ea
Issue #4197 : Fix the remaining part of the doctest-in-zipfile problem by giving linecache access to the module globals when available
2008-12-15 11:41:05 +00:00
Antoine Pitrou
cc5b64a70a
modify other occurrence of test_bad_address
2008-12-15 00:39:51 +00:00
Antoine Pitrou
122388a5a5
try to fix failure in test_bad_address on some buildbots
2008-12-14 22:33:55 +00:00
Antoine Pitrou
655fbf1806
Backport r67759 (fix io.IncrementalNewlineDecoder for UTF-16 et al.).
2008-12-14 17:40:51 +00:00
Nick Coghlan
bbba3f0cec
Add file that was missed from r67750
2008-12-14 11:09:40 +00:00
Nick Coghlan
a2053475bb
Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
2008-12-14 10:54:50 +00:00
Antoine Pitrou
74af3bbfbd
Issue #4163 : Use unicode-friendly word splitting in the textwrap functions when given an unicode string.
2008-12-13 23:12:30 +00:00
Lars Gustäbel
3b02742f7d
Issue #4616 : TarFile.utime(): Restore directory times on Windows.
2008-12-12 13:58:03 +00:00
Facundo Batista
e29d435e0c
Issue #4084 : Fix max, min, max_mag and min_mag Decimal methods to
...
give correct results in the case where one argument is a quiet NaN
and the other is a finite number that requires rounding.
Thanks Mark Dickinson.
2008-12-11 04:19:46 +00:00
Amaury Forgeot d'Arc
ad9b5992e3
#4559 : When a context manager's __exit__() method returns an object whose
...
conversion to bool raises an exception, 'with' loses that exception.
Reviewed by Jeffrey Yasskin.
Already ported to 2.5, will port to 2.6 and 3.0
2008-12-10 23:22:49 +00:00
Jeremy Hylton
1868d7c221
Add simple unittests for Request
2008-12-09 21:03:10 +00:00