Antoine Pitrou
95f5560b46
Try to fix test_tarfile issues on Windows buildbots by closing file
...
objects explicitly instead of letting them linger on.
2010-09-23 18:36:46 +00:00
Antoine Pitrou
7b9698435d
Issue #1675951 : Allow GzipFile to work with unseekable file objects.
...
Patch by Florian Festi.
2010-09-23 16:22:51 +00:00
Hirokazu Yamamoto
dda7fdf194
Skip estLoadWithUNC when UNC is not available.
2010-09-23 15:28:35 +00:00
Hirokazu Yamamoto
b3b390d7b3
Issue #9868 : locale was left changed after TestEnUSCollation#setUp raised
...
TestSkip exception.
2010-09-23 15:20:15 +00:00
Florent Xicluna
d12a420acc
Fix encoding for test case added in r84967.
2010-09-23 00:46:13 +00:00
Florent Xicluna
42d544505f
Fix typo and add test case.
2010-09-22 22:35:38 +00:00
Barry Warsaw
31c604d3a7
Issue 9916: Add some missing errno symbols.
2010-09-22 20:58:04 +00:00
Daniel Stutzbach
c944cfc793
Issue9131: Mark fragile test as CPython-specific
2010-09-21 21:08:09 +00:00
Antoine Pitrou
38425292fb
Issue #9908 : Fix os.stat() on bytes paths under Windows 7.
2010-09-21 18:19:07 +00:00
Alexander Belopolsky
3e62f78c4e
Fixed microsecond rounding in python version of utcfromtimestamp
2010-09-21 16:30:56 +00:00
Vinay Sajip
c84f016988
Added some methods to LoggerAdapter, and updated documentation.
2010-09-21 11:25:39 +00:00
Benjamin Peterson
26d64aeee4
rewrite nocaret test to not rely on a specific SyntaxError
2010-09-20 21:47:37 +00:00
Barry Warsaw
0646b4bb77
test_get_makefile_filename() is not compatible with Windows.
2010-09-20 19:12:07 +00:00
Barry Warsaw
ebbef6fef2
Issue 9877: expose sysconfig.get_makefile_filename() in the public API.
2010-09-20 15:29:53 +00:00
Vinay Sajip
b4a0809ad7
logging: Add hasHandlers() method to Logger.
2010-09-20 09:55:00 +00:00
Antoine Pitrou
3d8580f690
Try a more robust implementation of _kill_process
2010-09-20 01:33:21 +00:00
Antoine Pitrou
84e751a442
Try to fix buildbot failure ( #9902 )
2010-09-20 00:12:19 +00:00
Antoine Pitrou
7c08744f52
Make error more explicit in test_finalize_with_trace
2010-09-19 23:28:30 +00:00
Antoine Pitrou
fedd481596
Try to make signal-sending tests in test_subprocess more robust on slow machines
2010-09-19 23:06:53 +00:00
Antoine Pitrou
fb8db8f635
Try to fix test_subprocess on "x86 debian parallel 3.x" buildbot
2010-09-19 22:46:05 +00:00
Florent Xicluna
eb19dce085
Issue #1686 : Fix string.Template when overriding the pattern attribute.
2010-09-18 23:34:07 +00:00
Antoine Pitrou
98b46702d2
Issue #9854 : SocketIO objects now observe the RawIOBase interface in
...
non-blocking mode: they return None when an operation would block (instead
of raising an exception).
2010-09-18 22:59:00 +00:00
Antoine Pitrou
8db3027e6a
Issue #9895 : speed up test_subprocess
2010-09-18 22:38:48 +00:00
Brian Quinlan
81c4d36928
Initial implementation of PEP 3148
2010-09-18 22:35:02 +00:00
Antoine Pitrou
679e0f2328
Issue #9894 : Do not hardcode ENOENT in test_subprocess.
...
(GNU/Hurd is not dead)
2010-09-18 17:56:02 +00:00
Hirokazu Yamamoto
f2dec8d6f1
In Python3000, Tkinter was renamed to tkinter. And print is now function.
2010-09-18 04:42:41 +00:00
Hirokazu Yamamoto
2cdacd7495
Added missing BaseTest.tearDown(self). Fixed refleak.
2010-09-18 03:54:32 +00:00
Vinay Sajip
bc85d848f5
Temporarily commented out test which succeeds locally but fails on buildbots, while investigating.
2010-09-17 23:35:29 +00:00
Vinay Sajip
19ec67acf6
Issue #9441 : logging: Improved test coverage for rotating file handlers.
2010-09-17 18:57:36 +00:00
Raymond Hettinger
35c87f2b8e
Issue 9865: add __sizeof__ to OrderedDict.
2010-09-16 19:10:17 +00:00
Antoine Pitrou
aee47561fc
Relax test condition (fix failures on FreeBSD buildbots)
2010-09-16 15:04:49 +00:00
Antoine Pitrou
2e55fec14c
Make testDefaults in test.test_socket.BasicSocketPairTest more reliable.
2010-09-14 21:24:25 +00:00
Antoine Pitrou
328ec7455f
Issue #9854 : The default read() implementation in io.RawIOBase now
...
handles non-blocking readinto() returning None correctly.
2010-09-14 18:37:24 +00:00
Antoine Pitrou
9e0b864ac0
Issue #1552 : socket.socketpair() now returns regular socket.socket
...
objects supporting the whole socket API (rather than the "raw"
_socket.socket objects).
2010-09-14 18:00:02 +00:00
Antoine Pitrou
a468adc76d
Issue #9853 : Fix the signature of SSLSocket.recvfrom() and
...
SSLSocket.sendto() to match the corresponding socket methods.
2010-09-14 14:43:44 +00:00
Antoine Pitrou
2ed94eb520
Do not print additional shutdown message when gc.DEBUG_SAVEALL is set
2010-09-14 09:48:39 +00:00
Vinay Sajip
8552d1fc8f
Added test for QueueHandler.
2010-09-14 09:34:09 +00:00
Alexander Belopolsky
e1b6a9ac99
Added files missed in r84780. Thanks, Florent.
2010-09-14 01:11:35 +00:00
Raymond Hettinger
98a5f3f838
Issue 9840: Add reprlib.recursive_repr(), a decorator for handling recursive calls to __repr__ methods.
2010-09-13 21:36:00 +00:00
Daniel Stutzbach
9f0cbf1c72
Issue #9213 : Add index and count methods to range objects, needed to
...
meet the API of the collections.Sequence ABC.
2010-09-13 21:16:29 +00:00
Eric Smith
e4d6317c87
Issue 7994: Make object.__format__() raise a PendingDeprecationWarning
...
if the format string is not empty. Manually merge r79596 and r84772
from 2.x.
Also, apparently test_format() from test_builtin never made it into
3.x. I've added it as well. It tests the basic format()
infrastructure.
2010-09-13 20:48:43 +00:00
Alexander Belopolsky
d8642c3274
Removed debugging setting
2010-09-13 18:15:33 +00:00
Alexander Belopolsky
4d7701729c
Issue #9315 : Fix for the trace module to record correct class name
...
when tracing methods. Unit tests. Patch by Eli Bendersky.
2010-09-13 18:14:34 +00:00
Florent Xicluna
dc69e7217a
Make test.regrtest.__file__ absolute, this was not always the case when running profile or trace, for example. (issue #9323 )
2010-09-13 16:35:02 +00:00
Florent Xicluna
a87b383ac1
Reenable test_ucs4 and remove some duplicated lines.
2010-09-13 02:28:18 +00:00
Antoine Pitrou
6464d5ffdc
Issue #9837 : The read() method of ZipExtFile objects (as returned by
...
ZipFile.open()) could return more bytes than requested.
2010-09-12 14:51:20 +00:00
Benjamin Peterson
0b9489d21d
reenable test_nis on solaris #3402
2010-09-12 13:55:02 +00:00
Victor Stinner
4c7db315df
Issue #9738 , #9836 : Fix refleak introduced by r84704
2010-09-12 07:51:18 +00:00
Raymond Hettinger
dc08a143e0
Issue #9826 : Handle recursive repr in collections.OrderedDict.
2010-09-12 05:15:22 +00:00
Victor Stinner
ca6525afba
Issue #9819 : don't try to encode TESTFN_UNICODE on Windows
...
mbcs (Windows default filesystem encoding) is now strict by default, and
depending on the code page, TESTFN_UNICODE may not be encodable to bytes.
Remove also unused "encoded" argument from _do_directory() method.
2010-09-11 12:52:30 +00:00
Victor Stinner
1205f2774e
Issue #9738 : PyUnicode_FromFormat() and PyErr_Format() raise an error on
...
a non-ASCII byte in the format string.
Document also the encoding.
2010-09-11 00:54:47 +00:00
Victor Stinner
b4ba986a71
Issue #9402 : pyexpat uses Py_DECREF() instead of PyObject_DEL()
...
Fix a crash if Python is compiled in pydebug mode.
2010-09-10 22:25:19 +00:00
Victor Stinner
3d75d0cc92
Issue #8603 : Environ.data is now protected -> Environ._data
...
os.environ.data was a str dict in Python 3.1. In Python 3.2 on UNIX/BSD,
os.environ.data is now a bytes dict: mark it as protected to avoid confusion.
2010-09-10 22:18:16 +00:00
Victor Stinner
5b519e0201
Issue #9632 : Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
...
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.
2010-09-10 21:57:59 +00:00
Amaury Forgeot d'Arc
ba117ef7e9
#4617 : Previously it was illegal to delete a name from the local
...
namespace if it occurs as a free variable in a nested block. This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
This sample was valid in 2.6, but fails to compile in 3.x without this change::
>>> def f():
... def print_error():
... print(e)
... try:
... something
... except Exception as e:
... print_error()
... # implicit "del e" here
This sample has always been invalid in Python, and now works::
>>> def outer(x):
... def inner():
... return x
... inner()
... del x
There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
2010-09-10 21:39:53 +00:00
Amaury Forgeot d'Arc
fe7b40533c
The "if 1": trick seems cleaner that the one with regular expressions.
...
Use it here again.
2010-09-10 19:47:43 +00:00
Amaury Forgeot d'Arc
dfa9b294fa
Use the "if 1:" prefix so that quoted code appears nicely
...
nested inside the test suite.
def test_me():
exec("""if 1:
...code...
""")
No other change here.
2010-09-10 19:40:52 +00:00
Victor Stinner
8ce7df67de
Issue #9819 : fix TESTFN_UNENCODABLE for japanese code page
2010-09-10 11:19:59 +00:00
Daniel Stutzbach
460ff3dd1c
Skip socket tests that require the network, if the network resource is not enabled
2010-09-09 21:17:58 +00:00
Antoine Pitrou
4c7c421944
Remove workaround
2010-09-09 20:40:28 +00:00
Antoine Pitrou
e4a189274f
Issue #9804 : ascii() now always represents unicode surrogate pairs as
...
a single `\UXXXXXXXX`, regardless of whether the character is printable
or not. Also, the "backslashreplace" error handler now joins surrogate
pairs into a single character on UCS-2 builds.
2010-09-09 20:30:23 +00:00
Antoine Pitrou
ea99c5c949
Issue #9410 : Various optimizations to the pickle module, leading to
...
speedups up to 4x (depending on the benchmark). Mostly ported from
Unladen Swallow; initial patch by Alexandre Vassalotti.
2010-09-09 18:33:21 +00:00
Antoine Pitrou
350c7229be
Use transient_internet() where appropriate in test_ssl
...
(svn.python.org is sometimes unavailable)
2010-09-09 13:31:46 +00:00
Antoine Pitrou
6e6cc830c4
Issue #9757 : memoryview objects get a release() method to release the
...
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
2010-09-09 12:59:39 +00:00
Raymond Hettinger
bad3c88094
Have pprint() respect the order in an OrderedDict.
2010-09-09 12:31:00 +00:00
Raymond Hettinger
44d7b6ad60
Add docstring to cmd.Cmd.do_help()
2010-09-09 03:53:22 +00:00
Giampaolo Rodolà
b383dbb45e
Fix issue 9794: adds context manager protocol to socket.socket so that socket.create_connection() can be used with the 'with' statement.
2010-09-08 22:44:12 +00:00
Antoine Pitrou
7c9cf01238
gdb: fix representation of non-printable surrogate pairs, and workaround
...
a bug in ascii().
2010-09-08 21:57:37 +00:00
Antoine Pitrou
783eea722b
Issue #9707 : Rewritten reference implementation of threading.local which
...
is friendlier towards reference cycles. This change is not normally
visible since an optimized C implementation (_thread._local) is used
instead.
2010-09-07 22:06:17 +00:00
Antoine Pitrou
2673c5bf5e
Also catch some gaierrors
2010-09-07 21:43:31 +00:00
Amaury Forgeot d'Arc
4b6fdf3852
#6394 : Add os.getppid() support for Windows.
2010-09-07 21:31:17 +00:00
Antoine Pitrou
8bc09039ed
Improve transient_internet() again to detect more network errors,
...
and use it in test_robotparser. Fixes #8574 .
2010-09-07 21:09:09 +00:00
Antoine Pitrou
4b92b5fad3
Issue #9792 : In case of connection failure, socket.create_connection()
...
would swallow the exception and raise a new one, making it impossible
to fetch the original errno, or to filter timeout errors. Now the
original error is re-raised.
2010-09-07 21:05:49 +00:00
Antoine Pitrou
a88c83cbab
Issue #8574 : better implementation of test.support.transient_internet().
...
Original patch by Victor.
2010-09-07 20:42:19 +00:00
Antoine Pitrou
5e38aae91b
Issue #9758 : When fcntl.ioctl() was called with mutable_flag set to True,
...
and the passed buffer was exactly 1024 bytes long, the buffer wouldn't
be updated back after the system call. Original patch by Brian Brazil.
2010-09-07 16:30:09 +00:00
Raymond Hettinger
7f7561ebfc
Remove invalid test (it was supposed to fail on 64-bit machines.).
2010-09-07 15:38:33 +00:00
Raymond Hettinger
c585eecfb0
Fix test that depends on a particular implementation of random.choice().
2010-09-07 15:00:15 +00:00
Raymond Hettinger
dc4872eefe
Fix corner case for Random.choice() and add tests.
2010-09-07 10:06:56 +00:00
Raymond Hettinger
0515661314
Issues #7889 , #9025 and #9379 : Improvements to the random module.
2010-09-07 04:44:52 +00:00
Raymond Hettinger
f763a728ad
Document which part of the random module module are guaranteed.
2010-09-07 00:38:15 +00:00
Raymond Hettinger
f45abc97bf
Add method to OrderedDict for repositioning keys to the ends.
2010-09-06 21:26:09 +00:00
Brian Curtin
13a0db5ddb
Fix some errors that #7566 introduced on non-Windows platforms due to
...
an ImportError. Rearranged the import, faked out the implementation when
the import fails, and reorganized a test that depends on Win32 behavior.
2010-09-06 19:46:17 +00:00
Antoine Pitrou
972ee13e03
Issue #5506 : BytesIO objects now have a getbuffer() method exporting a
...
view of their contents without duplicating them. The view is both readable
and writable.
2010-09-06 18:48:21 +00:00
Brian Curtin
6285774f06
Implement #7566 - os.path.sameopenfile for Windows.
...
This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.
2010-09-06 17:07:27 +00:00
Brian Curtin
c734b312cb
Clean up the fix to #9324 with some of the suggestions raised on python-dev
...
in response to the original checkin.
Move the validation from the original loop into a switch statement,
and adjust a platform check in the tests.
2010-09-06 16:04:10 +00:00
Gregory P. Smith
13b55291ac
hashlib has two new constant attributes: algorithms_guaranteed and
...
algorithms_avaiable that respectively list the names of hash algorithms
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.
Renames the attribute new in 3.2a0 'algorithms' to 'algorithms_guaranteed'.
2010-09-06 08:30:23 +00:00
Antoine Pitrou
0d739d7047
Issue #9293 : I/O streams now raise `io.UnsupportedOperation` when an
...
unsupported operation is attempted (for example, writing to a file open
only for reading).
2010-09-05 23:01:12 +00:00
Éric Araujo
1138eba3df
Fix accidental suppression in r84537
2010-09-05 18:59:49 +00:00
Éric Araujo
23eae8646c
Make naming consistent
2010-09-05 18:43:07 +00:00
Raymond Hettinger
02566ec89f
Adopt more descriptive attribute names as suggested on python-dev.
2010-09-04 22:46:06 +00:00
Antoine Pitrou
0049249d63
Issue #8734 : Avoid crash in msvcrt.get_osfhandle() when an invalid file
...
descriptor is provided. Patch by Pascal Chambon.
2010-09-04 20:53:29 +00:00
Antoine Pitrou
d9107aaded
Issue #9777 : test_idna requires the "network" resource
2010-09-04 18:50:35 +00:00
Antoine Pitrou
3941a8fece
Issue #1100562 : Fix deep-copying of objects derived from the list and dict types.
...
Patch by Michele Orrù and Björn Lindqvist.
2010-09-04 17:40:21 +00:00
Antoine Pitrou
e5a9101519
Issue #9581 : Fix non-working PosixGroupsTester test case
...
(it only runs as root, which is why nobody bothered about the failure)
2010-09-04 17:32:06 +00:00
Fred Drake
cc645b9a59
add consistent support for the vars and default arguments on all
...
configuration parser classes
(http://bugs.python.org/issue9421 )
2010-09-04 04:35:34 +00:00
Florent Xicluna
edf5f0ddc0
Strengthen BytesWarning tests.
2010-09-03 20:00:37 +00:00
Daniel Stutzbach
06a3c8ae82
fromfd exists on Windows now
2010-09-03 11:11:43 +00:00
Raymond Hettinger
faf7b7f4ec
Issue 8420: Fix obscure set crashers.
2010-09-03 10:00:50 +00:00
Fred Drake
8844441ae6
fix output from RawConfigParser.write and ConfigParser.write for None
...
values (http://bugs.python.org/issue7005 )
(merged r84443 from the release27-mmaint branch, with changes to reflect
changes in Python 3)
2010-09-03 04:22:36 +00:00
Daniel Stutzbach
045b3ba184
Issue #9212 : Added the missing isdisjoint method to the dict_keys and
...
dict_items views. The method is required by the collections.Set ABC,
which the views register as supporting.
2010-09-02 15:06:06 +00:00