Commit Graph

14820 Commits

Author SHA1 Message Date
Mark Dickinson 5cfa8044ff Issue #6857: Fix Decimal formatting to be consistent with existing float
formatting:  both are now right-aligned by default.
2009-09-08 20:20:19 +00:00
Mark Dickinson 968f1690d3 #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. 2009-09-07 18:04:58 +00:00
Mark Dickinson 491ea55f28 Issue #6850: Fix bug in Decimal._parse_format_specifier for formats
with no type specifier.
2009-09-07 16:17:41 +00:00
Ronald Oussoren 626faeb77b Fix for issue 4937 2009-09-06 12:23:18 +00:00
Mark Dickinson c8a7c7c3b9 Issue #6846: bytearray.pop was returning ints in the range [-128, 128)
instead of [0, 256).  Thanks Hagen Fürstenau for the report and fix.
2009-09-06 10:03:31 +00:00
Ronald Oussoren 2596758cb4 Fix build issues on OSX 10.6 (issue 6802) 2009-09-06 10:00:26 +00:00
Chris Withers 68c6e92fd4 Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. 2009-09-04 16:12:32 +00:00
Georg Brandl ed4ca821f1 #5101: add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups. 2009-09-04 11:19:34 +00:00
Georg Brandl d22b9519d1 Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. 2009-09-04 08:17:04 +00:00
Georg Brandl 2e1308f520 Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. 2009-09-04 06:59:20 +00:00
Brett Cannon e7e941e7f7 test_platform fails on OS X Snow Leopard because the UNIX command to get the
canonical version, sw_vers, leaves off trailing zeros in the version number
(e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros
for the test comparison.

Fixes issue #6806.
2009-09-03 21:25:21 +00:00
Armin Rigo ffd0dc1e8b Sorry, sorry! Ignore my previous two commits. I mixed up the version
of python with which I tried running the crashers.  They don't crash
the current HEAD.
2009-09-03 19:45:27 +00:00
Armin Rigo f866fbb303 Does not terminate: consume all memory without responding to Ctrl-C.
I am not too sure why, but you can surely find out by gdb'ing a bit...
2009-09-03 19:42:03 +00:00
Armin Rigo f416690490 Found the next crasher by thinking about this logic in PyPy. 2009-09-03 19:40:07 +00:00
Benjamin Peterson 6fcf9b50bc remove the check that classmethod's argument is a callable 2009-09-01 22:27:57 +00:00
Amaury Forgeot d'Arc fff896b309 #6750: TextIOWrapped could duplicate output when several threads write to it.
this affect text files opened with io.open(), and the print() function of py3k
2009-08-29 18:14:40 +00:00
Lars Gustäbel f7cda5287d Issue #6054: Do not normalize stored pathnames.
No longer use tarfile.normpath() on pathnames. Store pathnames
unchanged, i.e. do not remove "./", "../" and "//" occurrences.
However, still convert absolute to relative paths.
2009-08-28 19:23:44 +00:00
Benjamin Peterson cc54622651 remove more code for restricted execution 2009-08-28 16:49:56 +00:00
Benjamin Peterson f6348f4589 restricted environments are no more 2009-08-28 16:48:03 +00:00
Mark Dickinson 7a7739d75e Issue #6794: Fix handling of NaNs in Decimal.compare_total and
Decimal.compare_total_mag.
2009-08-28 13:25:02 +00:00
Kristján Valur Jónsson 429677ec38 Issue 6654
Allow the XML-RPC server to use the HTTP request path when dispatching.  Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests.
2009-08-27 23:13:18 +00:00
Kristján Valur Jónsson e2a77980b6 issue 6275
Add an "exc_value" attribute to the _AssertRaisesContext context manager in the unittest package.  This allows further tests on the exception that was raised after the context manager exits.
2009-08-27 22:20:21 +00:00
Kristján Valur Jónsson 68b0731b94 issue 6769
fix a mistake in instantiatiating the HTTPSConnection class.
2009-08-24 11:39:31 +00:00
Tarek Ziadé 764fc235a6 #6693: New functions in site.py to get user/global site packages paths. 2009-08-20 21:23:13 +00:00
Gregory P. Smith 77db0165eb comment typo fix 2009-08-20 09:38:43 +00:00
Gregory P. Smith e2ae86a19e Revert the changes from r74463, they were causing test_xmlrpc to fail.
We do not need to force a close when using socket buffering on a
httplib.HTTPRequest as the library does not support streaming requests
so there should never been extra data beyond the end of the current
request to have left over in the requests socket buffer.

see http://bugs.python.org/issue6724
2009-08-19 05:33:48 +00:00
Guilherme Polo 6f1fa214c5 Added missing static option for OptionMenu. Issue #5961. 2009-08-18 16:39:36 +00:00
Guilherme Polo 7b50c4fa7c Issue #1356969: Add missing info methods in Tix.HList. 2009-08-18 14:46:57 +00:00
Guilherme Polo 397bd1e740 Fixes for Tix.Grid from issue #1522587. 2009-08-18 14:34:44 +00:00
Guilherme Polo 6b3c7098f3 Issue #1522587: New constants and methods for the Tix.Grid widget. 2009-08-18 14:23:00 +00:00
Guilherme Polo 57f9b7298a Mark the "radio" option of Tix.CheckList as static. 2009-08-18 13:33:30 +00:00
Guilherme Polo 6c823f8720 Issue #1250469: Fix the return value of Tix.PanedWindow.panes. 2009-08-18 13:29:20 +00:00
Guilherme Polo d3e6e4bb8f Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText. 2009-08-18 13:23:08 +00:00
Tarek Ziadé 9132916efb fixed typo 2009-08-18 08:21:49 +00:00
Tarek Ziadé 1c8c9d1264 added more test coverage for distutils.filelist to prevent regressions when fnmatch or re are changed 2009-08-18 08:16:33 +00:00
Tarek Ziadé e2f35c3588 module cleanup 2009-08-17 21:48:22 +00:00
Tarek Ziadé 98026f1521 fixed how fnmatch.translate is used (since it has changed in r74475 for #6665). Now the code is not harcoding the usage of $ anymore 2009-08-17 21:28:34 +00:00
Gregory P. Smith 99954c9c45 Clean up the C library import code (based on suggestions in issue6281). 2009-08-16 21:54:45 +00:00
Frank Wierzbicki df756775f5 Add test of file.write(array) extracted from Jython. 2009-08-16 20:22:51 +00:00
Gregory P. Smith b98d6b2cbc Issue 6665: Fix fnmatch to properly match filenames with newlines in them. 2009-08-16 18:52:58 +00:00
Benjamin Peterson c0ba828857 better col_offsets for "for" statements with tuple unpacking #6704
Patch from Frank Wierzbicki.
2009-08-15 22:59:21 +00:00
Gregory P. Smith 8cabfa352b Force the http connection to close after any request returned when
buffering=True as our buffered data is not known to the HTTPConnection and may
contain data needed by a future request if the connection were left open.

See http://bugs.python.org/issue2576 and http://bugs.python.org/issue4879.
2009-08-15 22:39:03 +00:00
Benjamin Peterson 4c6e8088f5 #6707 fix a crash with dir() on an uninitialized module 2009-08-15 13:16:38 +00:00
Guilherme Polo 75e1f9985a Clarifying Entry.selection_present's docstring. 2009-08-14 14:43:43 +00:00
Guilherme Polo e45f017023 Issue #1135: Add the XView and YView mix-ins to avoid duplicating
the xview* and yview* methods.
2009-08-14 14:36:45 +00:00
Guilherme Polo f198ac2db2 Issue #3926: Fix the usage of the new showwarnings and formatwarning. 2009-08-14 14:03:07 +00:00
Guilherme Polo 86b882f3a6 Issue #3344: Replace itertools.count by enumerate. 2009-08-14 13:53:41 +00:00
Brett Cannon 764465f315 Expat could crash if given the wrong kind of input by never stopping its
tokenizing step.

Thanks to Ivan Krstić for the patch.
2009-08-13 19:27:12 +00:00
Gregory P. Smith c4ad0345cf Fix issue1628205: Socket file objects returned by socket.socket.makefile() now
properly handles EINTR within the read, readline, write & flush methods.
The socket.sendall() method now properly handles interrupted system calls.
2009-08-13 18:54:50 +00:00
Antoine Pitrou 20e1f932fa Issue #6629: Fix a data corruption issue in the new `io` package, which could
occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
"wb+" mode) after having buffered a certain amount of data for reading. This
bug was not present in the pure Python implementation.

Yes, this is a serious issue.
2009-08-06 20:18:29 +00:00
Jesse Noller 8497efeb40 Fix issue 4660: spurious task_done errors in multiprocessing, remove doc note for from_address 2009-08-06 02:05:56 +00:00
Guilherme Polo 175e0bf8ca Typo. 2009-08-05 23:48:26 +00:00
Guilherme Polo 3d75555b2b Easier reference to find (at least while svn continues being used). 2009-08-05 16:51:41 +00:00
Mark Dickinson 4b45673473 Issue #6620: Slightly safer code for _grouping_intervals in the locale
module.  Fixes a 'possible use before assignment' warning from pylint.
Thanks Vincent Legoll.
2009-08-04 21:56:04 +00:00
Raymond Hettinger 8fdab95260 Issue 6637: defaultdict.copy() failed with an empty factory. 2009-08-04 19:08:05 +00:00
Frank Wierzbicki 6c0f337904 Adding tests derived from the Jython project. These are primarily tests of
'single' statements with partial sentences (so they test things like "try:" in
interactive mode).  Others tests hit areas that previously failed in Jython. A
couple still fail in Jython, mainly due to the difficulty of parsing partial
sentences (but should be fixed by Jython 2.6).
2009-08-02 20:37:48 +00:00
Mark Dickinson 9a6d6c93b4 Issue #6619: Remove duplicate 'isgenerator' function from inspect module.
Thanks Vincent Legoll.
2009-08-02 15:40:11 +00:00
Mark Dickinson 4326ad8f72 Issue #6595: Allow Decimal constructor to accept non-European decimal
digits, as recommended by the specification.  (Backport of r74279 from
py3k.)
2009-08-02 10:59:36 +00:00
Amaury Forgeot d'Arc 3e5b027a64 #6511: ZipFile will now raise BadZipfile when opening an empty or tiny file,
like it does for larger invalid files.
2009-07-28 22:15:30 +00:00
Amaury Forgeot d'Arc e55df1fa2a "Fix" for the refleak report: the ABC classes are now in the _pyio module 2009-07-28 20:47:55 +00:00
Mark Dickinson fe67bd9168 Issue #6561: '\d' regular expression should not match characters of
category [No]; only those of category [Nd].  (Backport of r74237
from py3k.)
2009-07-28 20:35:03 +00:00
Raymond Hettinger c2b9e1a134 Issue 6573: Fix set.union() for cases where self is in the argument chain. 2009-07-27 20:32:04 +00:00
Michael Foord fb0e0570f7 Issue 6581. Michael Foord 2009-07-26 21:12:14 +00:00
Amaury Forgeot d'Arc 74b3016783 #6553: crash in cPickle.load(), when given a StringIO with incomplete data.
Will backport to 2.6, 3.x already fixed a similar issue with issue4298.
2009-07-23 19:26:02 +00:00
Benjamin Peterson 39186bcda0 use bools for autoraise 2009-07-23 14:19:08 +00:00
R. David Murray 46ca2f25eb Backport of fix for issue 6542: make sure
test_os.TestInvalidFD.test_closerange does not close any
valid file descriptors.
2009-07-22 17:22:58 +00:00
Georg Brandl ec812caf5d Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. 2009-07-22 11:57:15 +00:00
Tarek Ziadé af2406f215 Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O 2009-07-22 08:55:19 +00:00
Thomas Heller d8431ae3bd Revert rev 74134, as it does not completely fixx issue #6493. 2009-07-21 19:04:02 +00:00
Thomas Heller 6adda9641d Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits
wide.
2009-07-21 06:27:14 +00:00
Benjamin Peterson 4d4b7398a2 Merged revisions 74121-74122 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r74121 | benjamin.peterson | 2009-07-20 15:40:59 -0500 (Mon, 20 Jul 2009) | 1 line

  try to make warning tests more robust
........
  r74122 | benjamin.peterson | 2009-07-20 15:44:14 -0500 (Mon, 20 Jul 2009) | 1 line

  platform compat
........
2009-07-20 21:09:45 +00:00
Benjamin Peterson 4879c907ce the Slice in x[::] has to have step as None to help the interpreter 2009-07-20 20:28:08 +00:00
Benjamin Peterson a2514f4ce9 Merged revisions 74116 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r74116 | benjamin.peterson | 2009-07-20 12:22:35 -0500 (Mon, 20 Jul 2009) | 1 line

  placate windows
........
2009-07-20 17:24:30 +00:00
Benjamin Peterson 840077cd31 Merged revisions 73771,73811,73840,73842,73848-73849,73861,73957-73960,73964-73969,73972-73974,73977,73981,73984,74065,74113 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r73771 | benjamin.peterson | 2009-07-02 10:56:55 -0500 (Thu, 02 Jul 2009) | 1 line

  force the imports fixer to be run after the import one #6400
........
  r73811 | benjamin.peterson | 2009-07-03 09:03:14 -0500 (Fri, 03 Jul 2009) | 1 line

  check for sep, not pathsep when looking for a subpackage #6408
........
  r73840 | benjamin.peterson | 2009-07-04 09:52:28 -0500 (Sat, 04 Jul 2009) | 1 line

  don't print diffs by default; it's annoying
........
  r73842 | benjamin.peterson | 2009-07-04 09:58:46 -0500 (Sat, 04 Jul 2009) | 1 line

  complain when not showing diffs or writing
........
  r73848 | alexandre.vassalotti | 2009-07-04 23:38:19 -0500 (Sat, 04 Jul 2009) | 2 lines

  Fix test_refactor_stdin to handle print_output() method with 4 arguments.
........
  r73849 | alexandre.vassalotti | 2009-07-04 23:43:18 -0500 (Sat, 04 Jul 2009) | 5 lines

  Issue 2370: Add fixer for the removal of operator.isCallable() and
  operator.sequenceIncludes().

  Patch contributed by Jeff Balogh (and updated by me).
........
  r73861 | benjamin.peterson | 2009-07-05 09:15:53 -0500 (Sun, 05 Jul 2009) | 1 line

  cleanup and use unicode where appropiate
........
  r73957 | benjamin.peterson | 2009-07-11 15:49:56 -0500 (Sat, 11 Jul 2009) | 1 line

  fix calls to str() with unicode()
........
  r73958 | benjamin.peterson | 2009-07-11 15:51:51 -0500 (Sat, 11 Jul 2009) | 1 line

  more str() -> unicode()
........
  r73959 | benjamin.peterson | 2009-07-11 16:40:08 -0500 (Sat, 11 Jul 2009) | 1 line

  add tests for refactor_dir()
........
  r73960 | benjamin.peterson | 2009-07-11 16:44:32 -0500 (Sat, 11 Jul 2009) | 1 line

  don't parse files just because they end with 'py' (no dot)
........
  r73964 | benjamin.peterson | 2009-07-11 17:30:15 -0500 (Sat, 11 Jul 2009) | 1 line

  simplify
........
  r73965 | benjamin.peterson | 2009-07-11 17:31:30 -0500 (Sat, 11 Jul 2009) | 1 line

  remove usage of get_prefix()
........
  r73966 | benjamin.peterson | 2009-07-11 17:33:35 -0500 (Sat, 11 Jul 2009) | 1 line

  revert unintended change in 73965
........
  r73967 | benjamin.peterson | 2009-07-11 17:34:44 -0500 (Sat, 11 Jul 2009) | 1 line

  avoid expensive checks and assume the node did change
........
  r73968 | benjamin.peterson | 2009-07-11 20:46:46 -0500 (Sat, 11 Jul 2009) | 1 line

  use a regular dict for the heads to avoid adding lists in the loop
........
  r73969 | benjamin.peterson | 2009-07-11 20:50:43 -0500 (Sat, 11 Jul 2009) | 1 line

  prefix headnode functions with '_'
........
  r73972 | benjamin.peterson | 2009-07-11 21:25:45 -0500 (Sat, 11 Jul 2009) | 1 line

  try to make the head node dict as sparse as possible
........
  r73973 | benjamin.peterson | 2009-07-11 21:59:49 -0500 (Sat, 11 Jul 2009) | 1 line

  a better idea; add an option to *not* print diffs
........
  r73974 | benjamin.peterson | 2009-07-11 22:00:29 -0500 (Sat, 11 Jul 2009) | 1 line

  add space
........
  r73977 | benjamin.peterson | 2009-07-12 10:16:07 -0500 (Sun, 12 Jul 2009) | 1 line

  update get_headnode_dict tests for recent changes
........
  r73981 | benjamin.peterson | 2009-07-12 12:06:39 -0500 (Sun, 12 Jul 2009) | 4 lines

  detect when "from __future__ import print_function" is given

  Deprecate the 'print_function' option and the -p flag
........
  r73984 | benjamin.peterson | 2009-07-12 16:16:37 -0500 (Sun, 12 Jul 2009) | 1 line

  add tests for Call; thanks Joe Amenta
........
  r74065 | benjamin.peterson | 2009-07-17 12:52:49 -0500 (Fri, 17 Jul 2009) | 1 line

  pathname2url and url2pathname are in urllib.request not urllib.parse #6496
........
  r74113 | benjamin.peterson | 2009-07-20 08:56:57 -0500 (Mon, 20 Jul 2009) | 1 line

  fix deprecation warnings in tests
........
2009-07-20 15:33:09 +00:00
Kristján Valur Jónsson c0379437fc http://bugs.python.org/issue6499
gzip.GzipFile may not exist as a parent class
2009-07-19 22:35:44 +00:00
Kristján Valur Jónsson 6d755900f6 http://bugs.python.org/issue6499
zlib/gzip may not be present for all builds.  Make xmlrpclib gracefully not supporg gzip encoding in this case
2009-07-19 22:14:00 +00:00
Benjamin Peterson d7b0eebcae split unittest.py into a package 2009-07-19 20:18:21 +00:00
Senthil Kumaran 5fee460bfa Fix for issue5102, timeout value propages between redirects, proxy, digest and
auth handlers. Fixed tests to reflect the same.
2009-07-19 02:43:43 +00:00
Mark Dickinson 88a0a2e47f Issue #6431: Fix Fraction comparisons with unknown types, and with
float infinities and nans.  Backport of r74078 from py3k.
2009-07-18 15:18:18 +00:00
Hirokazu Yamamoto e78e5d2e51 Issue #6415: Fixed warnings.warn sagfault on bad formatted string. 2009-07-17 06:20:46 +00:00
Georg Brandl 3e8b869c9c Revert r74028. 2009-07-16 21:47:51 +00:00
Georg Brandl 3601a38029 #6482: simplify "except: raise" to "finally:". 2009-07-16 19:24:48 +00:00
Tarek Ziadé a99dedfce2 #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) 2009-07-16 15:35:45 +00:00
Jesse Noller 7530e47948 Issue 6433: multiprocessing.pool.map hangs on empty list 2009-07-16 14:23:04 +00:00
Georg Brandl d77faaf48f #5910: fix kqueue for calls with more than one event. 2009-07-16 07:18:07 +00:00
Amaury Forgeot d'Arc b9ee881f8b #6076 Add a title to the IDLE Preferences window. 2009-07-15 21:29:27 +00:00
Ezio Melotti d5a23e322f methods' names pep8ification 2009-07-15 17:07:04 +00:00
Michael Foord 91dcd93beb Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418. 2009-07-14 17:58:12 +00:00
Marc-André Lemburg cecaa65f65 Use a different VER command output parser to address the localization
issues mentioned in #3410.

Prepare for Windows 7 (still commented out).
2009-07-13 21:28:33 +00:00
Marc-André Lemburg 19e5b3f9d1 Use a new global DEV_NULL instead of hard-coding /dev/null into the system
command helper functions.

See #6479 for some motivation.
2009-07-13 20:23:49 +00:00
Amaury Forgeot d'Arc 70dda76cde #1616979: Add the cp720 (Arabic DOS) encoding.
Since there is no official mapping file from unicode.org,
the codec file is generated on Windows with the new genwincodec.py script.
2009-07-13 20:01:11 +00:00
Vinay Sajip cbb24b35a0 Issue #6314: logging: Extra checks on the "level" argument in more places. 2009-07-13 11:21:05 +00:00
Kristján Valur Jónsson 0369ba2a4a http://bugs.python.org/issue6267
Add more tests for the xlmrpc.ServerProxy
2009-07-12 22:42:08 +00:00
Hirokazu Yamamoto 6633a6606b Fixed distutils test. 2009-07-12 02:04:47 +00:00
Benjamin Peterson 9bd39c119e put downloaded test support files in Lib/test/data instead of the cwd 2009-07-11 22:15:13 +00:00
Tarek Ziadé 51f32c00e8 reverted changes for #6459 (doesn't apply on 2.x) 2009-07-11 17:21:00 +00:00
Amaury Forgeot d'Arc 74b8d333b7 #2622 Import errors in email.message, from a py2app standalone application.
Patch by Mads Kiilerich, Reviewed by Barry Warsaw.
2009-07-11 14:33:51 +00:00
Tarek Ziadé 23a3775cc8 fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' 2009-07-11 10:55:27 +00:00
Tarek Ziadé 51c045d6b4 cleaned up distutils.build_ext module 2009-07-11 10:48:31 +00:00
Amaury Forgeot d'Arc 9175742ef0 Add basic tests for the return value of os.popen().close().
According to #6358, python 3.0 has a different implementation that behaves differently.
2009-07-11 09:09:59 +00:00