Benjamin Peterson
29d438c96c
remove non-ascii coding per PEP 8
2010-05-28 02:12:36 +00:00
Victor Stinner
03883624a4
Issue #8835 : test_support.transient_internet() catchs gaierror(EAI_NONAME) and
...
gaierror(EAI_NODATA)
2010-05-27 22:29:48 +00:00
Alexander Belopolsky
9292ee0667
Issue #7150 : Raise OverflowError if the result of adding or subtracting
...
timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
2010-05-27 20:55:27 +00:00
Alexander Belopolsky
58451d2dd7
Issue #7879 : Skip negative timestamps test on any Windows platform
...
using unittest.skipIf decorator.
2010-05-26 20:45:37 +00:00
Alexander Belopolsky
a26cf46dd4
Issue #7879 : Do not test negative timestamps on any Windows platform
...
including Windows CE.
2010-05-26 19:43:16 +00:00
Mark Dickinson
784a47f2c0
Issue #8825 : additional testcases for int(string, 0) and long(string, 0).
2010-05-26 19:06:33 +00:00
Victor Stinner
708c0727f9
Issue #7449 : Skip test_socketserver if threading support is disabled
2010-05-26 17:25:28 +00:00
Victor Stinner
c49dfcc8dc
Issue #3798 : Write sys.exit() message to sys.stderr to use stderr encoding and
...
error handler, instead of writing to the C stderr file in utf-8
2010-05-25 22:30:32 +00:00
Mark Dickinson
ecb8316885
Fix a NameError in test_enumerate.
2010-05-25 19:44:49 +00:00
Mark Dickinson
2066559913
Issue #8816 : Extra tests for some built-in functions. These tests are
...
ports of IronPython tests. Thanks Gregory Nofi.
2010-05-25 19:01:08 +00:00
R. David Murray
bfbdefe539
Issue 8143: sync unquote in urlparse with urllib; add comment about doing so.
...
unquote is duplicated in the two files to avoid a circular reference.
(This is fixed in Python3.) Updates keep getting made to the public unquote
without fixing the urlparse one, however, so this fix syncs the two
and adds a comment to both to make sure changes are applied to both.
2010-05-25 15:20:46 +00:00
Brian Curtin
b64c89bd7a
Fix #2810 - handle the case where some registry calls return
...
ERROR_MORE_DATA, requiring another call to get the remaining data.
Patch by Daniel Stutzbach
2010-05-25 15:06:15 +00:00
Victor Stinner
554a3b82e4
Issue #6662 : Fix parsing of malformatted charref (&#bad;)
2010-05-24 21:33:24 +00:00
Georg Brandl
f0757a2937
#8016 : add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.)
2010-05-24 21:29:07 +00:00
Steven Bethard
dce6e1bd5a
Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html
2010-05-24 03:45:26 +00:00
Benjamin Peterson
36cd75ab8d
Merged revisions 80937,81478 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r80937 | benjamin.peterson | 2010-05-07 14:10:58 -0500 (Fri, 07 May 2010) | 1 line
remove redundant unicode call
........
r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line
ensure doctests have some future_features
........
2010-05-22 18:52:21 +00:00
Victor Stinner
54b40ee929
Fix my last commit (r81471) about codecs
...
Rememder: don't touch the code just before a commit
2010-05-22 13:44:25 +00:00
Victor Stinner
7df55dad3b
Issue #6268 : More bugfixes about BOM, UTF-16 and UTF-32
...
* Fix seek() method of codecs.open(), don't write the BOM twice after seek(0)
* Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes
* test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by
Solaris or Windows, but does it really exist? I found it the in the issue.
2010-05-22 13:37:56 +00:00
Georg Brandl
a19baf58e6
Underscore the name of an internal utility function.
2010-05-22 11:31:16 +00:00
Georg Brandl
5d0ca2c832
Issue #3924 : Ignore cookies with invalid "version" field in cookielib.
2010-05-22 11:29:19 +00:00
Victor Stinner
262be5e70b
Issue #6268 : Fix seek() method of codecs.open(), don't read the BOM twice
...
after seek(0)
2010-05-22 02:11:07 +00:00
Victor Stinner
d6703b5e38
Issue #5640 : Fix Shift-JIS incremental encoder for error handlers different
...
than strict
2010-05-21 22:50:28 +00:00
Benjamin Peterson
26da187193
simplify and modernize updatecache()
2010-05-21 21:35:44 +00:00
Benjamin Peterson
b9e7c01294
remove debugging rubish
2010-05-21 21:32:49 +00:00
Benjamin Peterson
266e454866
ensure the last line has a trailing newline #8782
2010-05-21 21:31:24 +00:00
Benjamin Peterson
bd289dae35
fix name
2010-05-21 21:17:22 +00:00
Benjamin Peterson
6722ac2f00
use addCleanup
2010-05-21 21:16:12 +00:00
Benjamin Peterson
eb318d3b16
return NotImplemented from Mapping when comparing to a non-mapping #8729
2010-05-21 20:51:45 +00:00
Brett Cannon
eb3cd301ae
Turned out that if you used explicit relative import syntax
...
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.
Fixes issue #7902 . Thanks to Meador Inge for the patch.
2010-05-20 18:37:55 +00:00
Victor Stinner
b1556c537d
libpython.py: fix support of non-BMP unicode characters
...
Forward port some code from Python3:
* join surrogate pairs if sizeof(Py_UNICODE)==2
* Enable non-BMP test on narrow builds using u"\U0001D121" instead of
unichr(0x1D121)
2010-05-20 11:29:45 +00:00
Tarek Ziadé
8f692275e9
#8759 : Fixed user paths in sysconfig for posix and os2 schemes
2010-05-19 22:20:14 +00:00
Stefan Krah
8a6f3fe3b5
Fix typos in docstrings.
2010-05-19 15:46:39 +00:00
Giampaolo Rodolà
e3a84e857f
Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror.
2010-05-18 20:04:31 +00:00
Antoine Pitrou
83137c2e16
Issue #7079 : Fix a possible crash when closing a file object while using
...
it from another thread. Patch by Daniel Stutzbach.
2010-05-17 19:56:59 +00:00
Florent Xicluna
af87f9f09f
Issue #1285086 : Speed up urllib.quote and urllib.unquote for simple cases.
2010-05-17 13:35:09 +00:00
Tarek Ziadé
4fc2a008b8
upgraded distutils docs w.r.t. the manifest regeneration
2010-05-17 10:54:43 +00:00
Florent Xicluna
e127e24359
Slight style cleanup.
2010-05-17 10:39:07 +00:00
Tarek Ziadé
422545f0e7
Fixed #8688 : Distutils now recalculates MANIFEST everytime.
2010-05-17 10:06:20 +00:00
Victor Stinner
8a470d6039
Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()
...
fo is not set if the open() fails.
2010-05-16 00:34:40 +00:00
Benjamin Peterson
5b5134b8d1
use TestCase skip method
2010-05-15 17:48:55 +00:00
Stefan Krah
7622eba757
If the timeout is exceeded, count the tests as skipped instead of just
...
issuing a warning.
2010-05-15 09:31:08 +00:00
Victor Stinner
2b271f7e30
Fix regression introduced by r81154 (Issue #5099 , subprocess destructor)
2010-05-14 21:52:26 +00:00
Brett Cannon
42a0ba7b2c
subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
...
interpreter shutdown semantics. Same issue goes for the methods that __del__
called. Now all the methods capture the global objects it needs as default
values to private parameters (could have stuck them on the class object itself,
but since the objects have nothing directly to do with the class that seemed
wrong).
There is no test as making one that works is hard. This patch was
verified against a consistently failing test in Mercurial's test suite, though,
so it has been tested in some regard.
Closes issue #5099 . Thanks to Mary Stern for the bug report and Gabriel
Genellina for writing another patch for the same issue and attempting to write
a test.
2010-05-14 00:21:48 +00:00
Brett Cannon
da9af75d5f
test_site was failing under darwin for non-framework builds because a test was
...
assuming framework-specific site-packages directories were being used.
2010-05-13 23:59:41 +00:00
Florent Xicluna
b3d0554040
Revert changeset r81150 which helped diagnose issue #8423 on some OS X buildbot.
2010-05-13 23:46:48 +00:00
Florent Xicluna
9cf210f392
Improve test feedback to troubleshoot issue #8423 on OS X.
2010-05-13 21:41:05 +00:00
Florent Xicluna
9ac6114dc9
Better test skipping, with message in the log.
2010-05-13 21:40:01 +00:00
Florent Xicluna
8652f2e83e
Revert the additional OS X information (r81140). Keep the endianness information.
2010-05-13 18:16:06 +00:00
Florent Xicluna
b7d413f9bc
Add sensible information about the OS X platform to diagnose issue #8423 :
...
test_pep277 fails on "x86 Tiger" buildbot but not on "PPC Tiger".
2010-05-13 17:05:29 +00:00
Victor Stinner
37368163bd
Fix verb tense in skip message.
...
Ooops, merge also r80334 (patch by r.david.murray)
2010-05-13 16:22:15 +00:00
Victor Stinner
20c3258bf2
Issue #8422 , test_genericpath: skip the creation of a directory with an invalid
...
UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8
string).
Merge r80163 from py3k branch.
2010-05-13 16:18:14 +00:00
Senthil Kumaran
81a0450cb5
Fix Issue8657 - adding git and git+ssh as know schemes.
2010-05-13 03:25:21 +00:00
Mark Dickinson
62f7e8b0b8
Fix unused variable in test_factorial.
2010-05-12 19:53:36 +00:00
Giampaolo Rodolà
fd25594aa4
Removed the assertion that dispatcher.connected attribute must be False after a single connect() call. Solaris and FreeBSD buildbots failures showed how connect() can succeed even in a single call. All bo failures should definitively be fixed now.
2010-05-12 00:29:27 +00:00
Antoine Pitrou
fc3bfad2e0
Issue #8681 : Make the zlib module's error messages more informative when
...
the zlib itself doesn't give any detailed explanation.
2010-05-11 23:42:28 +00:00
Antoine Pitrou
37ffc3e3ba
Issue #8672 : Add a zlib test ensuring that an incomplete stream can be
...
handled by a decompressor object without errors (it returns incomplete
uncompressed data).
2010-05-11 23:32:31 +00:00
Michael Foord
72b1977221
Improving help message for python -m unittest. Issue 8303.
2010-05-10 20:21:16 +00:00
Giampaolo Rodolà
ff46d6e844
Issue #8490 : adds a more solid test suite for asyncore
2010-05-10 15:33:22 +00:00
Michael Foord
53a92eb3c3
Adding a test for unittest.BaseTestSuite.
2010-05-09 09:58:25 +00:00
Mark Dickinson
7000e9e01b
Issue #8644 : Improve accuracy of timedelta.total_seconds method.
...
(Backport of r80979 to py3k.) Thanks Alexander Belopolsky.
2010-05-09 09:30:06 +00:00
Gregory P. Smith
860852fdf4
Revert r81012. buildbot problems and its questionable of me to even
...
add this to trunk while we're on the way to 2.7rc1.
When fixed this can go into py3k first. Sorry.
2010-05-09 01:20:20 +00:00
Gregory P. Smith
56fe6569fd
Fixes [issue7245] Better Ctrl-C support in pdb.
2010-05-08 23:38:49 +00:00
Jean-Paul Calderone
e54ddf1ed2
Skip signal handler re-installation if it is not necessary. Issue 8354.
2010-05-08 20:06:02 +00:00
Benjamin Peterson
c251607d59
bump version to 2.7 beta 2
2010-05-08 17:08:17 +00:00
Michael Foord
9c164af6c3
unittest: issue 8301. Adding functions to test suites no longer crashes.
2010-05-08 17:06:25 +00:00
Benjamin Peterson
7daf0e4aa1
update pydoc-topics
2010-05-08 17:05:19 +00:00
Benjamin Peterson
f063d15873
run and fix enumerate start test cases #8636
2010-05-08 16:44:52 +00:00
Michael Foord
959c16d7a4
Updating documentation and adding docstrings to unittest.TestCase.assertRegexpMatches and assertNotRegexpMatches. Issue 8038.
2010-05-08 16:40:52 +00:00
Benjamin Peterson
7baf8627bd
add underscore
2010-05-08 15:42:29 +00:00
Benjamin Peterson
ac896ed177
r80967 introduced a new scheme
2010-05-08 15:41:44 +00:00
Antoine Pitrou
dac6aeb43c
Revert r80963 - it broke compilation everywhere
2010-05-08 15:23:57 +00:00
Michael Foord
22097e4e66
Issue 7780. Adding a test for unittest test discovery from a dotted path.
2010-05-08 13:20:07 +00:00
Ronald Oussoren
2f88bfdf96
Issue #8084 : ensure that the --user directory
...
conforms to platforms standars on OSX when
using a python framework.
2010-05-08 10:29:06 +00:00
Ronald Oussoren
d875d3c36e
Fix for issue #7724 : make it possible to build using
...
the OSX 10.4u SDK on MacOSX 10.6 by honoring the specified
SDK when looking for files.
2010-05-08 08:44:37 +00:00
Senthil Kumaran
18e4dd74e0
Fixing the errors trigerred in test_urllib2net. Related to issue8656.
2010-05-08 05:00:11 +00:00
Senthil Kumaran
6057ba1f97
Fix Issue8656 - urllib2 mangles file://-scheme URLs
2010-05-08 03:11:50 +00:00
Michael Foord
e6f5e22123
Issue 8547 - detecting and reporting that modules have been imported from the wrong location under test discovery.
2010-05-07 23:39:38 +00:00
Benjamin Peterson
1a0ce685ab
revert r80932; it breaks windows
2010-05-07 20:45:07 +00:00
Benjamin Peterson
5dfad9dc9a
Merged revisions 79911,79916-79917,80018,80418,80572-80573,80635-80639,80668,80922 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r79911 | benjamin.peterson | 2010-04-09 15:38:53 -0500 (Fri, 09 Apr 2010) | 1 line
use absolute import
........
r79916 | benjamin.peterson | 2010-04-09 16:05:21 -0500 (Fri, 09 Apr 2010) | 1 line
generalize detection of __future__ imports and attach them to the tree
........
r79917 | benjamin.peterson | 2010-04-09 16:11:44 -0500 (Fri, 09 Apr 2010) | 1 line
don't try to 'fix' relative imports when absolute_import is enabled #8858
........
r80018 | benjamin.peterson | 2010-04-12 16:12:12 -0500 (Mon, 12 Apr 2010) | 4 lines
prevent diffs from being mangled is multiprocess mode #6409
Patch by George Boutsioukis.
........
r80418 | benjamin.peterson | 2010-04-23 16:00:03 -0500 (Fri, 23 Apr 2010) | 1 line
remove unhelpful description
........
r80572 | benjamin.peterson | 2010-04-27 20:33:54 -0500 (Tue, 27 Apr 2010) | 1 line
use unicode literals
........
r80573 | jeffrey.yasskin | 2010-04-27 23:08:27 -0500 (Tue, 27 Apr 2010) | 6 lines
Don't transform imports that are already relative. 2to3 turned
from . import refactor
into
from .. import refactor
which broke the transformation of 2to3 itself.
........
r80635 | benjamin.peterson | 2010-04-29 16:02:23 -0500 (Thu, 29 Apr 2010) | 1 line
remove imports
........
r80636 | benjamin.peterson | 2010-04-29 16:02:41 -0500 (Thu, 29 Apr 2010) | 1 line
unicode literal
........
r80637 | benjamin.peterson | 2010-04-29 16:03:42 -0500 (Thu, 29 Apr 2010) | 1 line
must pass a string to Number
........
r80638 | benjamin.peterson | 2010-04-29 16:05:34 -0500 (Thu, 29 Apr 2010) | 1 line
unicode literals
........
r80639 | benjamin.peterson | 2010-04-29 16:06:09 -0500 (Thu, 29 Apr 2010) | 1 line
pass string to Number
........
r80668 | jeffrey.yasskin | 2010-04-30 18:02:47 -0500 (Fri, 30 Apr 2010) | 4 lines
Make 2to3 run under Python 2.5 so that the benchmark suite at
http://hg.python.org/benchmarks/ can use it and still run on implementations
that haven't gotten to 2.6 yet. Fixes issue 8566.
........
r80922 | benjamin.peterson | 2010-05-07 11:06:25 -0500 (Fri, 07 May 2010) | 1 line
prevent xrange transformation from wrapping range calls it produces in list
........
2010-05-07 18:58:23 +00:00
Michael Foord
ae4dde0858
Issue 8547 - detecting and reporting that modules have been imported from the wrong location under test discovery.
2010-05-07 18:16:19 +00:00
Antoine Pitrou
3843cd8e86
Issue #8571 : Fix an internal error when compressing or decompressing a
...
chunk larger than 1GB with the zlib module's compressor and decompressor
objects.
2010-05-07 16:50:34 +00:00
Michael Foord
4fedbce55a
Adding tests for unittest command line handling of buffer, catchbreak and failfast.
2010-05-07 15:52:05 +00:00
Michael Foord
215d394b82
Adding a test for unittest test discovery with dotted path name.
2010-05-07 15:34:08 +00:00
Senthil Kumaran
e41bb0bc2c
Testsuite for RFC3986 based parsing scenario. Related Issue1462525.
2010-05-07 04:07:29 +00:00
Giampaolo Rodolà
e4499a88c2
adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong
2010-05-06 20:19:32 +00:00
Giampaolo Rodolà
215b6b392d
provides a clearer warning message when cheap inheritance with the underlying socket object is used
2010-05-06 19:56:34 +00:00
Giampaolo Rodolà
f7454fa98d
Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__
2010-05-06 17:57:06 +00:00
Antoine Pitrou
1bbb68d37c
`self` doesn't exist here
2010-05-06 14:11:23 +00:00
Brian Curtin
11f8b9db79
Fix #7863 . Properly identify Windows 7 and Server 2008 R2.
...
Removed various unused code and added a way to correctly determine
server vs. workstation via the registry.
2010-05-06 02:54:44 +00:00
Mark Dickinson
481ab89b75
Issue #1533 : test_range in test_builtin: fix test comment and add test
...
for rejection of small floats. Thanks Alexander Belopolsky.
2010-05-05 22:42:51 +00:00
Tarek Ziadé
31a673da52
removed non needed lines
2010-05-05 22:41:25 +00:00
Tarek Ziadé
38f81223ae
Fixed #4265 : shutil.copyfile() was leaking file descriptors when disk fills
2010-05-05 22:15:31 +00:00
Ronald Oussoren
9545a23c7f
In a number of places code still revers
...
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).
Fixes issue #7908 for the trunk.
2010-05-05 19:09:31 +00:00
Antoine Pitrou
a8157183b8
Issue #8600 : fix test_gdb failures when gdb issues some spurious warnings.
2010-05-05 18:29:02 +00:00
R. David Murray
7d93221a5c
Issue #7472 : remove unused code from email.encoders.encode_7or8bit.
...
Yukihiro Nakadaira noticed a typo in encode_7or8bit that was trying
to special case iso-2022 codecs. It turns out that the code in
question is never used, because whereas it was designed to trigger
if the payload encoding was eight bit but its output encoding was
7 bit, in practice the payload is always converted to the 7bit
encoding before encode_7or8bit is called. Patch by Shawat Anand.
2010-05-05 17:31:03 +00:00
Barry Warsaw
43ad706ef4
Bug 7755: audiotest.au is arguably copyrighted material, but definitely makes
...
Debian unhappy. The actual contents of the audio clip are unimportant, so
replace it with something that we know is okay. Guido likes woodpeckers.
2010-05-05 16:15:09 +00:00
Ronald Oussoren
91165c0b42
Force exit using os._exit instead of sys.exit,
...
this makes sure that the child does not continue
testing.
2010-05-05 15:32:39 +00:00
Ronald Oussoren
3320696371
The C function used by uuid.uuid4 is broken on
...
OSX 10.6 in that after os.fork() the parent and
child generate the same sequence of UUIDs.
This patch falls back to the the Python implementation
on OSX 10.6 or later.
Fixes issue #8621 .
2010-05-05 14:48:37 +00:00
Victor Stinner
926fd4ee32
Issue #8313 : traceback.format_exception_only() encodes unicode message to
...
ASCII with backslashreplace error handler if str(value) failed
2010-05-05 12:40:49 +00:00
Mark Dickinson
3b0b4ff19e
Fix test_gzip failure on OS X. The failure was a result of trying to fflush
...
a file that wasn't open for writing. Patch by Antoine Pitrou.
2010-05-04 18:45:27 +00:00