Commit graph

13930 commits

Author SHA1 Message Date
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
b6e112bd95 fix encoding cookie case 2009-01-18 22:47:04 +00:00
Benjamin Peterson
910f216260 fix test that wasn't working as expected #4990 2009-01-18 21:11:38 +00:00
Jesse Noller
438195fc11 issue 4301: patch logging to add processName, remove the old _check_logger_class code 2009-01-18 21:04:36 +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
Amaury Forgeot d'Arc
2407ac9a4b follow-up of #3997: since 0xFFFF numbers are not enough to indicate a zip64 format,
always try to read the "zip64 end of directory structure".
2009-01-17 22:43:50 +00:00
Benjamin Peterson
5e5fbb612d fix inspect.isclass() on instances with a custom __getattr__ #1225107 2009-01-17 22:27:54 +00:00
Amaury Forgeot d'Arc
d25f87ae36 #3997: zipfiles generated with more than 65536 files could not be opened
with other applications.

Reviewed by Martin, will backport to 2.6 and 3.0
2009-01-17 16:40:17 +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
9109f91c6b use enumerate 2009-01-17 04:28:57 +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
Kristján Valur Jónsson
51a035e383 Issue 4929: Handle socket errors when receiving 2009-01-15 17:20:21 +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
Benjamin Peterson
717c083e8d fix test_xmlrpc failures #4939 2009-01-13 23:43:50 +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
2d21d50c10 Issue 4922: Incorrect comments for MutableSet.add() and MutableSet.discard().
Needs to be backported to 2.6 and forward ported to 3.0 and 3.1.
2009-01-13 09:08:32 +00:00
Raymond Hettinger
35288c6b6c Speed-up __repr__. Eliminate duplicate tests. Use a from-irmport. 2009-01-13 04:50:35 +00:00
Raymond Hettinger
783d73fc2f Fixup and simplify docstrings and doctests. 2009-01-13 04:13:53 +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
Raymond Hettinger
b5bc33cdab Optimize heapq.nsmallest/nlargest for cases where n==1 or n>=size. 2009-01-12 10:37:32 +00:00
Kristján Valur Jónsson
3c43fcba8b Issue 4879: Allow buffering for HTTPResponse 2009-01-11 16:23:37 +00:00
Benjamin Peterson
164b0455b6 make tests fail if they can't be imported 2009-01-10 22:42:10 +00:00
Mark Dickinson
da62f81d1d Remove an unnecessary check from test_decimal. 2009-01-10 19:14:55 +00:00
Matthias Klose
43723e2ad8 - Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on
biarch systems. Try to rely on ldconfig only, without using objdump and gcc.
2009-01-10 17:00:42 +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
Kristján Valur Jónsson
84040dbe81 Issue 4336: Let users of HTTPConnection.endheaders() submit a message body to the function if required. 2009-01-09 20:27:16 +00:00
Kristján Valur Jónsson
7e876f5e93 Issue 4336: HTTPRequest._send_output() now deals with the case of the message body not being a string. This allows clients to use endheaders(message_body) instead of endheaders() + send(message_body) without making any extra checks. 2009-01-09 20:23:16 +00:00
Benjamin Peterson
25f221b0cb Merged revisions 68306-68308,68340,68368,68422 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r68306 | benjamin.peterson | 2009-01-04 12:27:19 -0600 (Sun, 04 Jan 2009) | 1 line

  fix_urllib: add mappings for the url parsing functions
........
  r68307 | benjamin.peterson | 2009-01-04 12:30:01 -0600 (Sun, 04 Jan 2009) | 1 line

  remove duplicated function
........
  r68308 | benjamin.peterson | 2009-01-04 12:50:34 -0600 (Sun, 04 Jan 2009) | 1 line

  turtle is no longer renamed
........
  r68340 | georg.brandl | 2009-01-05 02:11:39 -0600 (Mon, 05 Jan 2009) | 2 lines

  Fix undefined locals in parse_tokens().
........
  r68368 | benjamin.peterson | 2009-01-06 17:56:10 -0600 (Tue, 06 Jan 2009) | 1 line

  fix typo (thanks to Robert Lehmann)
........
  r68422 | benjamin.peterson | 2009-01-08 20:01:03 -0600 (Thu, 08 Jan 2009) | 1 line

  run the imports fixers after fix_import, so fix_import doesn't try to make stdlib renames into relative imports #4876
........
2009-01-09 02:13:34 +00:00
Tarek Ziadé
1a240fb9f0 fixed #4394 make the storage of the password optional in .pypirc 2009-01-08 23:56:31 +00:00
Raymond Hettinger
5b913e31a1 Forward port r68394 for issue 4816. 2009-01-08 06:39:04 +00:00
Mark Dickinson
e6dc53120d Issue #4869: clarify documentation for random.expovariate. 2009-01-07 17:48:33 +00:00
Hirokazu Yamamoto
fde5b803d8 Issue #4864: test_msvc9compiler failed on VC6/7.
Reviewed by Amaury Forgeot d'Arc.
2009-01-07 09:42:28 +00:00
Antoine Pitrou
09cafb6335 Use shutil.rmtree rather than os.rmdir. 2009-01-06 18:34:08 +00:00