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
Jeffrey Yasskin
2d873bd68b
Issue 4597: Fix several cases in EvalFrameEx where an exception could be
...
"raised" without setting x, err, or why to let the eval loop know.
2008-12-08 18:55:24 +00:00
Antoine Pitrou
ae5beceb35
Issue #4509 : bugs in bytearray with exports (buffer protocol)
2008-12-06 21:29:24 +00:00
Mark Dickinson
826f3fefe5
Issue #4445 : save 3 bytes (on average, on a typical machine) per
...
string allocation.
2008-12-05 21:55:28 +00:00
Georg Brandl
fe879e8a23
#4529 : fix parser's validation for try-except-finally statements.
2008-12-05 12:09:41 +00:00
Georg Brandl
a07435d3e3
#4458 : recognize "-" as an argument, not a malformed option in gnu_getopt().
2008-12-05 09:23:14 +00:00
Gregory P. Smith
26576801a6
rename the new check_call_output to check_output. its less ugly.
2008-12-05 02:27:01 +00:00
Gregory P. Smith
97f49f4be7
Adds a subprocess.check_call_output() function to return the output from a
...
process on success or raise an exception on error.
2008-12-04 20:21:09 +00:00
Fred Drake
5248103ef9
Issue #1055234 : cgi.parse_header(): Fixed parsing of header parameters to
...
support unusual filenames (such as those containing semi-colons) in
Content-Disposition headers.
2008-12-04 18:25:17 +00:00
Vinay Sajip
213faca204
Issue #4384 : Added logging integration with warnings module using captureWarnings(). This change includes a NullHandler which does nothing; it will be of use to library developers who want to avoid the "No handlers could be found for logger XXX" message which can appear if the library user doesn't configure logging.
2008-12-03 23:22:58 +00:00
Raymond Hettinger
7989a4dccb
Backport r67478
2008-12-03 15:42:10 +00:00
Jeremy Hylton
21d2e59ab1
Reflow long lines.
2008-11-29 00:09:16 +00:00
Jeremy Hylton
8942011db1
Add unittests that verify documented behavior of public methods in Transport
...
class.
These methods can be overridden. The tests verify that the overridden
methods are called, and that changes to the connection have a visible
effect on the request.
2008-11-24 22:00:29 +00:00
Benjamin Peterson
9dfe6a8862
#4396 make the parser module correctly validate the with syntax
2008-11-24 04:09:03 +00:00
Benjamin Peterson
bfc51567f5
backport r67325: make FileIO.mode always contain 'b'
2008-11-22 01:59:15 +00:00
Benjamin Peterson
c078f929cb
don't segfault when \N escapes are used and unicodedata fails to load
...
Fixes #4367
2008-11-21 22:27:24 +00:00
Amaury Forgeot d'Arc
322656596a
Fixed issue #4233 .
...
Changed semantic of _fileio.FileIO's close() method on file objects with closefd=False.
The file descriptor is still kept open but the file object behaves like a closed file.
The FileIO object also got a new readonly attribute closefd.
Approved by Barry
Backport of r67106 from the py3k branch
2008-11-20 23:34:31 +00:00
Benjamin Peterson
ad100c3acb
backport r67300
2008-11-20 22:06:22 +00:00
Benjamin Peterson
d3b5a7985d
oops! didn't mean to disable that test
2008-11-20 21:44:23 +00:00
Benjamin Peterson
46cc6d1102
make sure that bytearray methods return a new bytearray even if there is no change
...
Fixes #4348
Reviewed by Brett
2008-11-19 21:49:09 +00:00
Amaury Forgeot d'Arc
7cfe7ea745
#4317 : Fix an Array Bounds Read in imageop.rgb2rgb8.
...
Will backport to 2.4.
2008-11-18 22:19:37 +00:00
Benjamin Peterson
273c233c78
when __getattr__ is a descriptor, call it correctly; fixes #4230
...
patch from Ziga Seilnacht
2008-11-17 22:39:09 +00:00
Benjamin Peterson
2c98faada6
check for assignment to __debug__ during AST generation
...
Also, give assignment to None a better error message
2008-11-08 18:38:54 +00:00
Benjamin Peterson
81e92e582e
move a FileIO test to test_fileio
2008-11-03 22:34:57 +00:00
Benjamin Peterson
6624a9fddd
#4048 make the parser module accept relative imports as valid
2008-11-03 15:14:51 +00:00
Benjamin Peterson
dcee09d920
make sure the parser flags and passed onto the compiler
...
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
2008-10-31 02:16:05 +00:00
Christian Heimes
ab5f879022
Issue #4237 : io.FileIO() was raising invalid warnings caused by insufficient initialization of PyFileIOObject struct members.
2008-10-30 21:26:15 +00:00
Amaury Forgeot d'Arc
69a9c5b539
Issue #4176 : Pickle would crash the interpreter when a __reduce__ function
...
does not return an iterator for the 4th and 5th items.
(sequence-like and mapping-like state)
A list is not an iterator...
Will backport to 2.6 and 2.5.
2008-10-30 21:18:34 +00:00
Thomas Heller
1fac5a4505
Fixed a modulefinder crash on certain relative imports.
2008-10-30 20:18:13 +00:00
Armin Rigo
581eb1e498
Fix one of the tests: it relied on being present in an "output test" in
...
order to actually test what it was supposed to test, i.e. that the code
in the __del__ method did not crash. Use instead the new helper
test_support.captured_output().
2008-10-28 17:01:21 +00:00
Benjamin Peterson
260f5bae70
add forgotten test for r67030
2008-10-26 20:33:19 +00:00
Benjamin Peterson
bdca942ffc
fix __future__ imports when multiple features are given
2008-10-26 20:21:13 +00:00
Benjamin Peterson
399b1fe8df
give a py3k warning when 'nonlocal' is used as a variable name
2008-10-25 02:53:28 +00:00
Hirokazu Yamamoto
592c275567
Issue #4183 : Some tests didn't run with pickle.HIGHEST_PROTOCOL.
2008-10-23 00:37:33 +00:00
Amaury Forgeot d'Arc
fbc0b0ca29
#4157 move two test functions out of platform.py.
...
Turn them into unit tests, and correct an obvious typo:
(("a", "b") ("c", "d") ("e", "f"))
compiles even with the missing commas, but does not execute very well...
2008-10-21 22:01:38 +00:00
Benjamin Peterson
77c2f93663
make sure to call iteritems()
2008-10-21 20:51:13 +00:00
Benjamin Peterson
76f71a52d7
give poplib a real test suite
...
#4088 from Giampaolo Rodola'x
2008-10-11 17:25:36 +00:00
Georg Brandl
f3776a17ef
#3935 : properly support list subclasses in the C impl. of bisect.
...
Patch reviewed by Raymond.
2008-10-08 18:47:17 +00:00
Amaury Forgeot d'Arc
d78b9dcbc3
#4069 : aSet.remove(otherSet) would always report the empty frozenset([]) as the missing key.
...
Now it correctly refers to the initial otherset.
Reviewed by Raymond. Will backport to 2.6.
2008-10-07 20:32:10 +00:00
Hirokazu Yamamoto
39defbe6a9
more intensive test on dbm.
2008-10-07 18:10:47 +00:00
Skip Montanaro
7d9d7a2659
save/restore stdout/stderr instead of relying on __*__ versions
2008-10-07 15:03:40 +00:00
Skip Montanaro
0d8372bdb9
Simplify individual tests by defining setUp and tearDown methods.
2008-10-07 01:55:20 +00:00
Hirokazu Yamamoto
18c4e8734c
More strict test. Consider the case sys.executable itself is symlink.
2008-10-06 02:41:59 +00:00
Hirokazu Yamamoto
6e5e50104c
Added the test for issue3762.
2008-10-06 01:57:03 +00:00
Andrew M. Kuchling
081bb457ab
Typo fix
2008-10-03 16:42:52 +00:00
Hirokazu Yamamoto
b7df32e620
Fixed following error when DocXMLRPCServer failed.
...
UnboundLocalError: local variable 'serv' referenced before assignment
2008-10-03 16:18:42 +00:00
Andrew MacIntyre
bf24401a1f
fix for issue 3862: test_array fails FreeBSD 7 amd64
...
FreeBSD 7's underlying malloc() is behaves differently to earlier versions
and seriously overcommits available memory on amd64. This may affect
other 64bit platforms in some circumstances, so the scale of the
problematic test is wound back.
Patch by Mark Dickinson, reviewed by Martin von Loewis.
2008-10-01 03:25:25 +00:00
Gregory P. Smith
0806749e63
Works around issue3863: freebsd4/5/6 and os2emx are known to have OS bugs when
...
calling fork() from a child thread. This disables that unit test (with a note
printed to stderr) on those platforms.
A caveat about buggy platforms is added to the os.fork documentation.
2008-09-30 20:41:13 +00:00
Benjamin Peterson
8d77d448a5
fix security issue 2: imageop's poor validation of arguments could result in segfaults
...
patch by Victor Stinner
reviewed by myself and Brett
2008-09-30 01:31:49 +00:00
Jesse Noller
37040cdace
issue3770: if SEM_OPEN is 0, disable the mp.synchronize module, rev. Nick Coghlan, Damien Miller
2008-09-30 00:15:45 +00:00
Bill Janssen
eb257ac97d
fix for release blocker 3910, 2.6 regression in socket.ssl method
2008-09-29 18:56:38 +00:00
Brett Cannon
b2d61bde28
The _lsprof module could crash the interpreter if it was given an external
...
timer that did not return a float and a timer was still running when the
Profiler object was garbage collected.
Fixes issue 3895.
Code review by Benjamin Peterson.
2008-09-29 03:41:21 +00:00
Benjamin Peterson
e14267bbad
merge in the fix for test_ftplib on some bots [reviewed by Georg]
2008-09-28 20:57:21 +00:00
Benjamin Peterson
003d7463dd
enable refactor tests
2008-09-27 21:12:20 +00:00
Benjamin Peterson
3c0c483af4
give ftplib a real test suite
...
A asyncore based mock ftp server is used to test the protocol.
This is all thanks to Giampaolo Rodola #3939
(Barry gave me permission to do this before final on IRC.)
2008-09-27 02:49:54 +00:00
Amaury Forgeot d'Arc
fc5ea39289
#3967 : Correct a crash in count() and find() methods of string-like objects.
...
For example:
"".count("xxxx", sys.maxint, 0)
Reviewed by Benjamin Peterson.
Will port to 2.5 and 3.0.
2008-09-26 22:34:08 +00:00
Raymond Hettinger
6ee7bc04f7
Fix namedtuple bug reported by Glenn Linderman. Template did not form correctly if the field names were input in Unicode.
2008-09-25 23:31:52 +00:00
Amaury Forgeot d'Arc
17617a07d1
#3965 : on Windows, open() crashes if the filename or the mode is invalid,
...
and if the filename is a unicode string.
Reviewed by Martin von Loewis.
2008-09-25 20:52:56 +00:00
Benjamin Peterson
a74d675fac
backport the atexit test for r66563
2008-09-23 20:43:09 +00:00
Andrew MacIntyre
41c56b5ea1
build_os2emx.patch in issue 3868 - update OS/2 EMX makefile and config files
...
Part of source_os2emx.patch in issue 3868:
Include/pystrcmp.h: OS/2 has same C APIs as Windows
Lib/test/test_io.py: OS/2 has same behaviour as Windows for this test
Reviewed by Amaury Forgeot d'Arc
2008-09-22 14:23:45 +00:00
Benjamin Peterson
2c7470d951
#3879 fix a regression in urllib.getproxies_environment
...
reviewers: Benjamin, Georg
2008-09-21 21:27:51 +00:00
Hirokazu Yamamoto
56d380de1d
Issue #3838 : TarFile object assigned to self.tar should be closed explicitly.
...
Reviewed by Lars Gustäbel.
2008-09-21 11:44:23 +00:00
Benjamin Peterson
8c2b7dc463
fix possible integer overflows in _hashopenssl #3886
2008-09-18 01:22:16 +00:00
Nick Coghlan
d2e0938362
Issue #3781 : Final cleanup of warnings.catch_warnings and its usage in the test suite. Closes issue w.r.t. 2.6 (R: Brett Cannon)
2008-09-11 12:11:06 +00:00
Martin v. Löwis
4dd3a50ca4
Read unidata_version from unicodedata module.
...
Delete old NormalizationTest.txt if it doesn't match
unidata_version.
2008-09-10 19:16:35 +00:00
Martin v. Löwis
6d5ec2474d
Update to test Unicode 5.1.
2008-09-10 18:43:49 +00:00
Guido van Rossum
e3c4fd9cc0
- Issue #3629 : Fix sre "bytecode" validator for an end case.
...
Reviewed by Amaury.
2008-09-10 14:27:00 +00:00
Martin v. Löwis
24329ba176
Issue #3811 : The Unicode database was updated to 5.1.
...
Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
2008-09-10 13:38:12 +00:00
Benjamin Peterson
97179b0f58
Fix #3634 invalid return value from _weakref.ref(Exception).__init__
...
Reviewers: Amaury, Antoine, Benjamin
2008-09-09 20:55:01 +00:00
Vinay Sajip
844f741039
Issue #3809 : Fixed spurious 'test.blah' file left behind by test_logging.
2008-09-09 13:42:08 +00:00
Amaury Forgeot d'Arc
d3ffb8974f
#3777 : long(4.2) returned an int, and broke backward compatibility.
...
the __long__ slot is allowed to return either int or long, but the behaviour of
float objects should not change between 2.5 and 2.6.
Reviewed by Benjamin Peterson
2008-09-09 07:24:30 +00:00
Brett Cannon
672237dc6c
warnings.catch_warnings() now returns a list or None instead of the custom
...
WarningsRecorder object. This makes the API simpler to use as no special object
must be learned.
Closes issue 3781.
Review by Benjamin Peterson.
2008-09-09 00:49:16 +00:00
Hirokazu Yamamoto
631be01252
Issue #3806 : LockTests in test_imp should be skipped when thread is not available.
...
Reviewed by Benjamin Peterson.
2008-09-08 23:38:42 +00:00
Hirokazu Yamamoto
74ce88fd67
Issue #3804 : Added test for Issue #2222 .
...
Reviewed by Benjamin Peterson.
2008-09-08 23:03:47 +00:00
Bill Janssen
61c001a939
incorporate fixes from issue 3162; SSL doc patch
2008-09-08 16:37:24 +00:00
Facundo Batista
ace0bcf669
Issue 3801. Fixing a dumb error in the deprecated parse_qsl()
...
function. Tests added.
2008-09-08 00:20:28 +00:00
Benjamin Peterson
a853a89dc3
fix missing module
2008-09-06 23:19:15 +00:00
Amaury Forgeot d'Arc
feb8cade4d
#3796 : A test class was not run in test_float.
...
Reviewed by Benjamin.
2008-09-06 20:53:51 +00:00
Antoine Pitrou
187ac1bda4
#3601 : test_unicode.test_raiseMemError fails in UCS4
...
Reviewed by Benjamin Peterson on IRC.
2008-09-05 22:04:54 +00:00
Brett Cannon
32476fc5a8
Deprecate bsddb for removal in Python 3.0.
...
Closes issue 3776.
Review by Nick Coghlan.
2008-09-05 18:33:51 +00:00
Vinay Sajip
65d66e1006
Issue #3772 : Fixed regression problem in StreamHandler.emit().
2008-09-04 07:31:21 +00:00
Brett Cannon
a0b7444f68
test_py3kwarn had been overlooked when test.test_support.catch_warning() was
...
re-implemented to use warnings.catch_warnings() and had its API improved.
Closes issue #3768 .
Code review by Benjamin Peterson.
2008-09-03 22:45:11 +00:00
Facundo Batista
c585df9476
Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
...
to the urlparse one. Added a PendingDeprecationWarning in the old
module, it will be deprecated in the future. Docs and tests updated.
2008-09-03 22:35:50 +00:00
Vinay Sajip
6a2fd81316
Issue #3726 : Allowed spaces in separators in logging configuration files.
2008-09-03 09:20:05 +00:00
Hirokazu Yamamoto
3e7dd78344
Issue #3759 : test_asyncore.py leaked handle.
...
Reviewed by Amaury Forgeot d'Arc
2008-09-02 20:36:44 +00:00
Gregory P. Smith
d712203d17
Issue #3708 : os.urandom no longer goes into an infinite loop when passed a
...
non-integer floating point number.
2008-09-02 05:36:11 +00:00
Brett Cannon
1eaf0742d8
Move test.test_support.catch_warning() to the warnings module, rename it
...
catch_warnings(), and clean up the API.
While expanding the test suite, a bug was found where a warning about the
'line' argument to showwarning() was not letting functions with '*args' go
without a warning.
Closes issue 3602.
Code review by Benjamin Peterson.
2008-09-02 01:25:16 +00:00
Benjamin Peterson
973e6c2cf3
remove py3k warnings about the threading api; update docs
...
Reviewer: Benjamin Peterson
2008-09-01 23:12:58 +00:00
Amaury Forgeot d'Arc
3571fbfed7
Issue #3751 : str.rpartition would perform a left-partition when called with
...
a unicode argument.
will backport.
2008-09-01 19:52:00 +00:00
Benjamin Peterson
f22c26ecf4
#3703 unhelpful _fileio.FileIO error message when trying to open a directory
...
Reviewer: Gregory P. Smith
2008-09-01 14:13:43 +00:00
Armin Rigo
dcde494114
A collection of crashers, all variants of the idea
...
of issue #3720 .
2008-08-29 21:21:52 +00:00
Antoine Pitrou
0668c62677
Issue #2534 : speed up isinstance() and issubclass() by 50-70%, so as to
...
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
mechanism. In the process, fix a bug where isinstance() and issubclass(),
when given a tuple of classes as second argument, were looking up
__instancecheck__ / __subclasscheck__ on the tuple rather than on each
type object.
Reviewed by Benjamin Peterson and Raymond Hettinger.
2008-08-26 22:42:08 +00:00
Neal Norwitz
e39be53c3c
Try to reduce the flakiness of this test
2008-08-25 03:52:40 +00:00
Neal Norwitz
2a7767a173
Use bytes as return type from recv_bytes() methods. Not sure why this only
...
affects some buildbots.
R=Brett
TESTED=./python -E -tt ./Lib/test/regrtest.py test_multiprocessing
2008-08-25 03:03:25 +00:00
Neal Norwitz
0c519b3a5e
Fix problem reported by pychecker where AuthenticationError wasn't imported.
...
Add some test coverage to this code. More tests should be added (TODO added).
R=Brett
TESTED=./python -E -tt ./Lib/test/regrtest.py test_multiprocessing
2008-08-25 01:50:24 +00:00
Neal Norwitz
901e4715bd
#3662 : Fix segfault introduced when fixing memory leaks.
...
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
2008-08-24 22:03:05 +00:00
Georg Brandl
30de77b97d
#3654 : fix duplicate test method name. Review by Benjamin P.
2008-08-24 18:11:07 +00:00
Benjamin Peterson
712ee92309
generate py3k warnings on __getslice__, __delslice__, and __setslice__
...
Reviewer: Brett Cannon
2008-08-24 18:10:20 +00:00
Mark Hammond
69ed524045
Fix bug 3625: test issues on 64bit windows. r=pitrou
2008-08-23 00:59:14 +00:00
Mark Dickinson
892429b08b
Fix float.fromhex test to give additional information on failure. This
...
change is aimed at diagnosing issue 3633 (test_float fails on Solaris).
Reviewed by Benjamin Peterson
2008-08-21 20:02:24 +00:00
Hirokazu Yamamoto
cd3b74d4e8
Reverted r65900. See http://mail.python.org/pipermail/python-checkins/2008-August/073116.html
2008-08-20 16:15:28 +00:00
Hirokazu Yamamoto
ccfdcd0cb2
fixed get_file_system in test_os.py ('path' is unicode on py3k and ansi on trunk)
2008-08-20 04:13:28 +00:00
Benjamin Peterson
e977ad4d7b
deprecate some useless, noop methods in symtable
2008-08-20 01:42:01 +00:00
Amaury Forgeot d'Arc
67f24f1ed6
follow-up of issue3473: update the compiler package to recognize the new syntax.
2008-08-20 00:08:47 +00:00
Benjamin Peterson
bd6a05fe81
check that the parser module can handle the new keyword syntax
2008-08-19 22:06:11 +00:00
Benjamin Peterson
80f0ed5bb1
allow keyword args to be passed in after *args #3473
2008-08-19 19:52:46 +00:00
Jesse Noller
5bc9f4c09c
issue3352: clean up the multiprocessing API to remove many get_/set_ methods and convert them to properties. Update the docs and the examples included.
2008-08-19 19:06:19 +00:00
Benjamin Peterson
6ee1a31e9b
add py3k warnings for old threading APIs
...
they will still live in 3.0 but it can't hurt
2008-08-18 21:53:29 +00:00
Benjamin Peterson
26f521668a
fix old API names in test_ssl
2008-08-18 18:39:57 +00:00
Benjamin Peterson
82aa201022
patch up multiprocessing until it's API can be changed too
2008-08-18 18:31:58 +00:00
Benjamin Peterson
a9b2222de4
change a few uses of the threading APIs
2008-08-18 18:01:43 +00:00
Benjamin Peterson
cbae869759
backport threading property changes
2008-08-18 17:45:09 +00:00
Benjamin Peterson
d8a8972ca9
change threading.getIdent to a property
...
This is new in 2.6 so now need to worry about backwards compatibility :)
2008-08-18 16:40:03 +00:00
Benjamin Peterson
541f7da3a9
add a test for reduce's move
2008-08-18 02:12:23 +00:00
Antoine Pitrou
954ea64753
#3580 : fix a failure in test_os
2008-08-17 20:15:07 +00:00
Benjamin Peterson
7dd854725b
get the symtable module back in working order
...
- Fix broken functions
- Add (hopefully) extensive tests
- Modernize a little
2008-08-17 17:13:26 +00:00
Antoine Pitrou
fd7c43e7be
#3556 : test_raiseMemError consumes an insane amount of memory
2008-08-17 17:01:49 +00:00
Antoine Pitrou
bebb18bef5
backport r65723: strengthen test_os.test_closerange
2008-08-17 14:43:41 +00:00
Antoine Pitrou
1e45c58a55
Make test_ossaudiodev work.
2008-08-17 00:36:03 +00:00
Benjamin Peterson
0847332716
include filename and line number in SyntaxError
2008-08-16 22:11:33 +00:00
Facundo Batista
eb90b788f4
Issue #2776 : fixed small issue when handling an URL with double slash
...
after a 302 response in the case of not going through a proxy.
2008-08-16 14:44:07 +00:00
Antoine Pitrou
11ec65d82b
Issue #3476 : make BufferedReader and BufferedWriter thread-safe
2008-08-14 21:04:30 +00:00
Facundo Batista
67d1981c51
Issue 1432. Fixes a bug caused because of the evolution
...
of the RFC that describes the behaviour. Note that we now
have the same behaviour than the current browsers.
2008-08-14 16:51:00 +00:00
Bill Janssen
39295c2650
remove duplicate close() from ssl.py; expose unwrap and add test for it
2008-08-12 16:31:21 +00:00
Nick Coghlan
48361f5cbf
Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
2008-08-11 15:45:58 +00:00
Georg Brandl
1e13ea94a3
- Issue #3537 : Fix an assertion failure when an empty but presized dict
...
object was stored in the freelist.
2008-08-11 09:07:59 +00:00
Brett Cannon
83e818415a
Copy reduce() to _functools so to have functools.reduce() not raise a warning
...
from usage under -3.
2008-08-09 23:30:55 +00:00
Skip Montanaro
a032bf41f6
accept issue 3436
2008-08-08 22:52:51 +00:00
Brett Cannon
3aa2a49ec9
Add imp.reload(). This to help with transitioning to 3.0 the reload() built-in
...
has been removed there.
2008-08-06 22:28:09 +00:00
Mark Dickinson
c777a412f1
Remove duplicate import
2008-08-06 21:36:57 +00:00
Andrew M. Kuchling
10288e19bf
Bug 3228: take a test from Niels Gustaebel's patch, and based on his patch, check for having os.stat available
2008-08-05 01:00:57 +00:00
Mark Dickinson
b646757e01
Issue #1481296 : (again!) Make conversion of a float NaN to an int or
...
long raise ValueError instead of returning 0. Also, change the error
message for conversion of an infinity to an integer, replacing 'long' by
'integer', so that it's appropriate for both long(float('inf')) and
int(float('inf')).
2008-08-04 21:30:09 +00:00
Andrew M. Kuchling
70a6dbd46e
Bug 3228: Explicitly supply the file mode to avoid creating executable files,
...
and add corresponding tests.
Possible 2.5 backport candidate
2008-08-04 01:43:43 +00:00
Antoine Pitrou
92a6240198
Preemptively backport the relevant parts of r65420
2008-08-02 21:58:05 +00:00
Amaury Forgeot d'Arc
06847b13ca
Correct a crash when two successive unicode allocations fail with a MemoryError:
...
the freelist contained half-initialized objects with freed pointers.
The comment
/* XXX UNREF/NEWREF interface should be more symmetrical */
was copied from tupleobject.c, and appears in some other places.
I sign the petition.
2008-07-31 23:39:05 +00:00
Amaury Forgeot d'Arc
ad9604003c
Remove a dummy test that was checked in by mistake
2008-07-31 21:35:03 +00:00
Amaury Forgeot d'Arc
39fd672dfe
#3479 : unichr(2**32) used to return u'\x00'.
...
The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int.
(why doesn't gcc issue a truncation warning in this case?)
2008-07-31 21:28:03 +00:00
Neal Norwitz
e7d8be80ba
Security patches from Apple: prevent int overflow when allocating memory
2008-07-31 17:17:14 +00:00
Mark Dickinson
0f6414a0d6
Rename testSum to testFsum and move it to proper place in test_math.py
2008-07-31 14:48:32 +00:00
Brett Cannon
cda5ce24ed
Backport test.support.fcmp() from 3.0 to silence -3 warnings.
2008-07-31 03:00:53 +00:00
Raymond Hettinger
f080e6d7e0
Alter recipe to show how to call izip_longest() with
...
both a keyword argument and star arguments.
2008-07-31 01:19:50 +00:00
Amaury Forgeot d'Arc
246daedd11
#2542 : now that issubclass() may call arbitrary code,
...
make sure that PyErr_ExceptionMatches returns 0 when an exception occurs there.
2008-07-31 00:42:16 +00:00
Benjamin Peterson
b8827c00b8
I mess up again; BufferError inherits StandardError
2008-07-30 23:49:28 +00:00
Benjamin Peterson
67ebfefef5
add BufferError to the exception hieracrchy
2008-07-30 19:35:27 +00:00
Mark Dickinson
fef6b13c32
Rename math.sum to math.fsum
2008-07-30 16:20:10 +00:00
Raymond Hettinger
efdf706a9f
Neaten-up the itertools recipes.
2008-07-30 07:27:30 +00:00
Mark Dickinson
ff5f16e4e5
More modifications to tests for math.sum: replace the Python
...
version of msum by a version using a different algorithm, and
use the new float.fromhex method to specify test results exactly.
2008-07-29 18:45:38 +00:00
Mark Dickinson
3e9c60c5fe
Remove math.sum tests related to overflow, special values, and behaviour
...
near the extremes of the floating-point range. (The behaviour of math.sum
should be regarded as undefined in these cases.)
2008-07-27 07:15:29 +00:00
Mark Dickinson
fe84cce668
Issue #3449 : Update decimal module to use most recent specification
...
(v. 1.68) and tests (v. 2.58) from IBM.
2008-07-27 06:39:07 +00:00
Skip Montanaro
1ef19f0de1
Close issue 3437 - missing state change when Allow lines are processed.
...
Adds test cases which use Allow: as well.
2008-07-27 00:49:02 +00:00
Antoine Pitrou
36897e1ff9
disable some failing tests in test_locale due to a bug in locale.py.
...
this should fix the failures on the solaris buildbot.
2008-07-26 13:49:13 +00:00
Antoine Pitrou
6327e8482e
Fix more buildbot failures on test_locale.
2008-07-26 11:56:37 +00:00
Antoine Pitrou
524f4135dc
try to fix most buildbot failures on test_locale + add a debug output for the solaris buildbot
2008-07-26 10:29:43 +00:00
Antoine Pitrou
ba54edadb3
convert test_locale to unittest, and add a mechanism to override localconv() results for further testing ( #1864 , #1222 )
2008-07-25 20:40:19 +00:00
Antoine Pitrou
5fdfa3e36d
#3394 : zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix
2008-07-25 19:42:26 +00:00
Raymond Hettinger
8c664e8628
Issue 1592: Better error reporting for operations on closed shelves.
2008-07-25 18:43:33 +00:00
Antoine Pitrou
4982d5d04a
#2242 : utf7 decoding crashes on bogus input on some Windows/MSVC versions
2008-07-25 17:45:59 +00:00
Benjamin Peterson
30e208d525
remove unneeded import
2008-07-22 23:44:37 +00:00
Benjamin Peterson
f5574a0c29
don't use assert statement
2008-07-21 22:05:34 +00:00
Amaury Forgeot d'Arc
e4921fec01
Issue2378: pdb would delete free variables when stepping into a class statement.
...
The problem was introduced by r53954, the correction is to restore the symmetry between
PyFrame_FastToLocals and PyFrame_LocalsToFast
2008-07-21 22:00:38 +00:00
Georg Brandl
fa267829e7
Save the whole of sys.modules instead of using an import tracker.
...
This, when merged to py3k, will fix the spurious buildbot failure
in test_urllib2 ("<urlopen error unknown url type: do>").
2008-07-20 23:18:55 +00:00
Neal Norwitz
be3ff9cdc9
Fix misspeeld method name (negative)
2008-07-20 20:39:36 +00:00
Raymond Hettinger
f1f46f0350
Clean-up itertools docs and recipes.
2008-07-19 23:58:47 +00:00
Raymond Hettinger
39e0eb766f
Fix compress() recipe in docs to use itertools.
2008-07-19 23:21:57 +00:00
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