Commit Graph

13741 Commits

Author SHA1 Message Date
Chris Withers 9c33cbfbef Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. 2009-09-04 17:04:16 +00:00
Georg Brandl 4cb97d03a8 Recorded merge of revisions 74650 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74650 | georg.brandl | 2009-09-04 13:19:34 +0200 (Fr, 04 Sep 2009) | 1 line

  #5101: add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups.
........
2009-09-04 11:20:54 +00:00
Georg Brandl 9cf32a12a1 Turn some comments into docstrings. 2009-09-04 08:28:01 +00:00
Georg Brandl 4eff9f7ff7 Remove pseudo-end markers from http.cookies. 2009-09-04 08:22:00 +00:00
Georg Brandl 85477afcb6 Remove backwards compatibility stuff from profile/cProfile. 2009-09-04 08:09:32 +00:00
Georg Brandl 395ed24589 #5221: fix related topics: SEQUENCEMETHODS[12] doesnt exist any more. 2009-09-04 08:07:32 +00:00
Brett Cannon 353411dd3a Merged revisions 74640 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74640 | brett.cannon | 2009-09-03 14:25:21 -0700 (Thu, 03 Sep 2009) | 7 lines

  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:29:20 +00:00
Brett Cannon 23cf5743ae Rework importlib benchmarks so that they measure number of executions within a
second instead of some fixed number.

Keeps benchmark faster by putting a cap on total execution time. Before a run
using importlib took longer by some factor, but now it takes roughly the
same amount of time as using the built-in __import__.
2009-09-03 20:45:21 +00:00
Jack Diederich f31f7bb1a7 - apply issue 6582 to test all the write methods of telnetlib
- add patch author to ACKS
- possibly fix test timeouts on non-linux platforms
2009-09-03 20:37:58 +00:00
Georg Brandl 0bb1cc72c8 Use true booleans and a bit more PEP8. 2009-09-02 20:34:14 +00:00
Georg Brandl 7837a968e2 Use true kwonly arg instead of **kwds hackaround. 2009-09-02 20:33:30 +00:00
Brett Cannon d95863f6f3 Clarify why test_import is failing under importlib. 2009-08-30 23:41:40 +00:00
Brett Cannon 17c9b4a9d6 Loosen an exception test in test_import to not require an explicit message but instead just the proper exception. 2009-08-30 22:22:21 +00:00
Brett Cannon 1c1dcbfd5d Trying to import a submodule from another module and not a package was raising
AttributeError in importlib when it should be an ImportError.

Found when running importlib against test_runpy.
2009-08-30 20:22:21 +00:00
Brett Cannon 82a23fe392 test_pep3120 is no longer a problem for importlib as the test was tweaked. 2009-08-30 20:08:15 +00:00
Brett Cannon 2dd66ce828 Make the exception message check for malformed UTF-8 source looser so that SyntaxError triggered from UnicodeDecodeError is also acceptable. 2009-08-30 20:07:38 +00:00
Brett Cannon de4ebfe559 When the globals argument to importlib.__import__() contained any value for
__package__, it was used. This was incorrect since it could be set to None to
represent the fact that a proper value was unknown. Now None will trigger the
calculation for __package__.

Discovered when running importlib against test_importhooks.
2009-08-30 19:53:48 +00:00
Brett Cannon ce7d4cbc3b Turn on verbose2 for importlib.test.regrtest so as to see failures when they occur. 2009-08-30 19:44:32 +00:00
Brett Cannon 6afbaef2fd Raise TypeError if the name given to importlib.__import__() lacks an rpartition
attribute. Was throwing AttributeError before. Discovered when running
test_builtin against importlib.

This exception change is specific to importlib.__import__() and does not apply to
import_module() as it is being done for compatibility reasons only.
2009-08-30 19:08:58 +00:00
Brett Cannon 44b28a9f32 Fix the importlib_only test decorator to work again; don't capture the flag variable as it might change later. 2009-08-30 18:59:21 +00:00
Brett Cannon a6503606f9 Use the public API, not a private one. 2009-08-30 18:40:23 +00:00
Brett Cannon 9e0e1a63c8 Allow importlib.__import__ to accept any iterable for fromlist. Discovered when
running importlib against test___all__.
2009-08-30 18:28:46 +00:00
Brett Cannon 12c3fc9343 Provide module docstrings for the two main test drivers in importlib that
explain what they are for and how to use command-line arguments to tweak
semantics.
2009-08-30 08:39:57 +00:00
Brett Cannon 6cc8310ded Tweak importlib.test.regrtest to only specify the implicit tests to exclude
when running entire test suite. Allows normal command-line arguments normally
given to test.regrtest to work (e.g. specifying a single test).
2009-08-30 08:30:35 +00:00
Brett Cannon 4d75fc1ce9 Have importlib raise ImportError if None is found in sys.modules. This matches
current import semantics.
2009-08-30 03:47:36 +00:00
Amaury Forgeot d'Arc ccd686a473 Merged revisions 74581 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74581 | amaury.forgeotdarc | 2009-08-29 20:14:40 +0200 (sam., 29 août 2009) | 3 lines

  #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 23:00:38 +00:00
Lars Gustäbel bfdfdda106 Merged revisions 74571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74571 | lars.gustaebel | 2009-08-28 21:23:44 +0200 (Fri, 28 Aug 2009) | 7 lines

  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:59:59 +00:00
Mark Dickinson d314e1b929 Merged revisions 74564 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74564 | mark.dickinson | 2009-08-28 14:25:02 +0100 (Fri, 28 Aug 2009) | 3 lines

  Issue #6794:  Fix handling of NaNs in Decimal.compare_total and
  Decimal.compare_total_mag.
........
2009-08-28 13:39:53 +00:00
Brett Cannon 5e129dbc16 Add a test file to importlib that runs regrtest using importlib.__import__.
The file must be run using runpy. Certain tests are currently excluded from
being run as they have known failures based on golden value checks that fail
for various reasons (typically because __loader__ is not expected to be set on
modules). Running the tests with this file does discover some incompatibilites
in importlib that will be fixed in the near future (as noted currently in the
docstring).
2009-08-27 23:52:35 +00:00
Brett Cannon 5c26eaad23 Add support for a --builtin argument to importlib.test to trigger running
import-specific tests with __import__ instead of importlib.
2009-08-27 23:49:56 +00:00
Brett Cannon 2153dc001f Move over to using assertRaises as a context manager for importlib tests.
Obviously one shouldn't do whole sale conversions like this, but I was already
going through the test code and I was bored at the airport.
2009-08-27 23:49:21 +00:00
Brett Cannon c5951fc996 Make __package__ setting tests specific to importlib. Also move to assertRaises context manager. 2009-08-27 23:46:38 +00:00
Brett Cannon 6d2bb7f5aa Move a test-skipping decorator over to unittest.skipIf. 2009-08-27 23:44:18 +00:00
Tarek Ziadé 4a608c0619 Merged revisions 74526 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74526 | tarek.ziade | 2009-08-20 23:23:13 +0200 (Thu, 20 Aug 2009) | 1 line

  #6693: New functions in site.py to get user/global site packages paths.
........
2009-08-20 21:28:05 +00:00
Guilherme Polo bcd03df1bd Merged revisions 74507-74511,74517 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r74507 | guilherme.polo | 2009-08-18 10:23:08 -0300 (Tue, 18 Aug 2009) | 1 line

  Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText.
........
  r74508 | guilherme.polo | 2009-08-18 10:29:20 -0300 (Tue, 18 Aug 2009) | 1 line

  Issue #1250469: Fix the return value of Tix.PanedWindow.panes.
........
  r74509 | guilherme.polo | 2009-08-18 10:33:30 -0300 (Tue, 18 Aug 2009) | 1 line

  Mark the "radio" option of Tix.CheckList as static.
........
  r74510 | guilherme.polo | 2009-08-18 11:23:00 -0300 (Tue, 18 Aug 2009) | 1 line

  Issue #1522587: New constants and methods for the Tix.Grid widget.
........
  r74511 | guilherme.polo | 2009-08-18 11:34:44 -0300 (Tue, 18 Aug 2009) | 1 line

  Fixes for Tix.Grid from issue #1522587.
........
  r74517 | guilherme.polo | 2009-08-18 11:46:57 -0300 (Tue, 18 Aug 2009) | 1 line

  Issue #1356969: Add missing info methods in Tix.HList.
........
2009-08-18 15:35:57 +00:00
Tarek Ziadé 6173285361 Merged revisions 74501 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74501 | tarek.ziade | 2009-08-18 10:16:33 +0200 (Tue, 18 Aug 2009) | 1 line

  added more test coverage for distutils.filelist to prevent regressions when fnmatch or re are changed
........
2009-08-18 08:23:10 +00:00
Tarek Ziadé de550558ca Merged revisions 74495 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74495 | tarek.ziade | 2009-08-17 23:48:22 +0200 (Mon, 17 Aug 2009) | 1 line

  module cleanup
........
2009-08-17 21:50:37 +00:00
Tarek Ziadé 74c23ac08d Merged revisions 74493 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74493 | tarek.ziade | 2009-08-17 23:28:34 +0200 (Mon, 17 Aug 2009) | 1 line

  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:35:46 +00:00
Gregory P. Smith d8fe8bf67e Merged revisions 74479 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74479 | gregory.p.smith | 2009-08-16 14:54:45 -0700 (Sun, 16 Aug 2009) | 2 lines

  Clean up the C library import code (based on suggestions in issue6281).
........
2009-08-16 22:08:56 +00:00
Frank Wierzbicki 176834327f Merged revisions 74477 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74477 | frank.wierzbicki | 2009-08-16 16:22:51 -0400 (Sun, 16 Aug 2009) | 2 lines

  Add test of file.write(array) extracted from Jython.
........
2009-08-16 20:30:12 +00:00
Gregory P. Smith 01099707db Merged revisions 74475 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74475 | gregory.p.smith | 2009-08-16 11:52:58 -0700 (Sun, 16 Aug 2009) | 2 lines

  Issue 6665: Fix fnmatch to properly match filenames with newlines in them.
........
2009-08-16 18:58:46 +00:00
Senthil Kumaran f70ce68c9c Fixing Issue6711 - macurl2path has typos that raise AttributeError 2009-08-16 06:43:50 +00:00
Benjamin Peterson 1432771d55 Merged revisions 74457 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line

  #6707 fix a crash with dir() on an uninitialized module
........
2009-08-15 13:23:05 +00:00
Guilherme Polo 1fff008326 Merged revisions 74446-74449 via svnmerge from
svn+ssh://pythondev/python/trunk

........
  r74446 | guilherme.polo | 2009-08-14 10:53:41 -0300 (Fri, 14 Aug 2009) | 1 line

  Issue #3344: Replace itertools.count by enumerate.
........
  r74447 | guilherme.polo | 2009-08-14 11:03:07 -0300 (Fri, 14 Aug 2009) | 1 line

  Issue #3926: Fix the usage of the new showwarnings and formatwarning.
........
  r74448 | guilherme.polo | 2009-08-14 11:36:45 -0300 (Fri, 14 Aug 2009) | 3 lines

  Issue #1135: Add the XView and YView mix-ins to avoid duplicating
  the xview* and yview* methods.
........
  r74449 | guilherme.polo | 2009-08-14 11:43:43 -0300 (Fri, 14 Aug 2009) | 1 line

  Clarifying Entry.selection_present's docstring.
........
2009-08-14 15:05:30 +00:00
Brett Cannon 2f82738988 Backport of r77429. Not merged/blocked as svnmerge.py is not liking me right now. 2009-08-13 19:58:01 +00:00
Georg Brandl d07ac64024 #6126: fix pdb stepping and breakpoints by giving the executed code the correct filename; this used execfile() in 2.x which did this automatically. 2009-08-13 07:50:57 +00:00
Antoine Pitrou a0ceb731fb Merged revisions 74336 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74336 | antoine.pitrou | 2009-08-06 22:18:29 +0200 (jeu., 06 août 2009) | 8 lines

  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:29:56 +00:00
Mark Dickinson ea1158f9f3 Issue #6622: Fix 'variable referenced before assignment' bug in POP3.apop.
Thanks Vincent Legoll.
2009-08-06 16:06:25 +00:00
Alexandre Vassalotti ba5c74329d Issue 5449: Fix io.BytesIO to not accept arbitrary keywords
Patch contributed by Erick Tryzelaar.
2009-08-04 23:19:13 +00:00
Mark Dickinson bbffb25c69 Merged revisions 74312 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74312 | mark.dickinson | 2009-08-04 22:56:04 +0100 (Tue, 04 Aug 2009) | 4 lines

  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:57:18 +00:00