Commit Graph

15034 Commits

Author SHA1 Message Date
Benjamin Peterson 42d26d94cc Merged revisions 76160-76161,76250,76252,76447,76506 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r76160 | benjamin.peterson | 2009-11-08 18:53:48 -0600 (Sun, 08 Nov 2009) | 1 line

  undeprecate the -p option; it's useful for converting python3 sources
........
  r76161 | benjamin.peterson | 2009-11-08 19:05:37 -0600 (Sun, 08 Nov 2009) | 1 line

  simplify condition
........
  r76250 | benjamin.peterson | 2009-11-13 16:56:48 -0600 (Fri, 13 Nov 2009) | 1 line

  fix handling of a utf-8 bom #7313
........
  r76252 | benjamin.peterson | 2009-11-13 16:58:36 -0600 (Fri, 13 Nov 2009) | 1 line

  remove pdb turd
........
  r76447 | benjamin.peterson | 2009-11-22 18:17:40 -0600 (Sun, 22 Nov 2009) | 1 line

  #7375 fix nested transformations in fix_urllib
........
  r76506 | benjamin.peterson | 2009-11-24 18:34:31 -0600 (Tue, 24 Nov 2009) | 1 line

  use generator expressions in any()
........
2009-11-25 18:16:46 +00:00
Vinay Sajip 2ed8813f22 logging: Issue 6615: Changed handler prepend to append. 2009-11-25 14:12:03 +00:00
Vinay Sajip 17e94e052f logging: made _handlers a WeakValueDictionary. 2009-11-25 09:22:47 +00:00
Vinay Sajip c470d68d39 Issue #6615: logging: Used weak references in internal handler list. Thanks to flox (Florent Xicluna) for the patch. 2009-11-25 09:03:30 +00:00
Alexandre Vassalotti 8b2d713d32 Issue 7128: Removed reference to the non-existent copyreg module.
The reference to copyreg was a unnoticed leftover from the compatibility
support for the grand renaming of the standard library in Python 3. The
compatibility support was reverted in r63493, but not completely as this
patch shows.

Based on a patch by Amaury Forgeot d'Arc.
2009-11-24 17:53:23 +00:00
Vinay Sajip 1d2c16db7e Made logging classes new-style and added name property to handlers. 2009-11-24 15:53:25 +00:00
Mark Dickinson 3e5354934e Issue #7117: Update float formatting testcases to match those in py3k. 2009-11-24 15:12:20 +00:00
Jesse Noller 9a03f2fd03 comment out test added in r76438, which caused refleaks 2009-11-24 14:17:29 +00:00
Mark Dickinson bce783757f round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this. 2009-11-24 10:54:58 +00:00
Mark Dickinson 9dd5e16c5d Issue #7117, continued: Remove substitution of %g-style formatting for
%f-style formatting, which used to occur at high precision.  Float formatting
should now be consistent between 2.7 and 3.1.
2009-11-23 20:54:09 +00:00
Mark Dickinson 18cfada1ea Remove restriction on precision when formatting floats. This is the
first step towards removing the %f -> %g switch (see issues 7117,
5859).
2009-11-23 18:46:41 +00:00
Senthil Kumaran 5c456e6f45 Fix for issue1488943 - difflib.Differ() doesn't always add hints for tab
characters.
2009-11-23 18:41:31 +00:00
Mark Dickinson e13dc3e6d5 Issue #7379: Fix incorrect doctest for Fraction.limit_denominator. 2009-11-23 16:23:43 +00:00
Lars Gustäbel 12adc655c8 Add a testcase that checks if the TarFile constructor successfully
closes the internal file object in case of an error (issue #7341).
2009-11-23 15:46:19 +00:00
Lars Gustäbel dd866d57af Issue #6123: Fix opening empty archives and files.
(Note that an empty archive is not the same as an empty file. An
empty archive contains no members and is correctly terminated with an
EOF block full of zeros. An empty file contains no data at all.)

The problem was that although tarfile was able to create empty
archives, it failed to open them raising a ReadError. On the other
hand, tarfile opened empty files without error in most read modes and
presented them as empty archives. (However, some modes still raised
errors: "r|gz" raised ReadError, but "r:gz" worked, "r:bz2" even
raised EOFError.)

In order to get a more fine-grained control over the various internal
error conditions I now split up the HeaderError exception into a
number of meaningful sub-exceptions. This makes it easier in the
TarFile.next() method to react to the different conditions in the
correct way.

The visible change in its behaviour now is that tarfile will open
empty archives correctly and raise ReadError consistently for empty
files.
2009-11-22 18:30:53 +00:00
Jesse Noller 814d02dcd1 issue6615: Additional test for logging support in multiprocessing 2009-11-21 14:38:23 +00:00
Jesse Noller 7bdd8d946b revert unintended change to multiprocessing/queues.py 2009-11-21 14:06:24 +00:00
Jesse Noller 6c3767445c issue5738: The distribution example was confusing, and out of date. It's too large to include inline in the docs as well. It belongs in an addons module outside the stdlib. Removing. 2009-11-21 14:01:56 +00:00
Mark Dickinson c4920e86ef Issue #7272: Add configure test to detect whether sem_open works
properly, and use this to skip test_multiprocessing on platforms
where sem_open raises a signal.  This should fix some FreeBSD buildbot
failures for test_multiprocessing.
2009-11-20 19:30:22 +00:00
Benjamin Peterson 246ec332fd avoid doing an uneeded import in a function 2009-11-20 02:56:43 +00:00
Benjamin Peterson 99a5023c80 improve several corner cases related with argument names in parenthesis
- Fix #7362: give a good error message for parenthesized arguments with
  defaults.

- Add a py3k warning for any parenthesized arguments since those are not allowed
  in Py3.  This warning is not given in tuple unpacking, since that incurs the
  tuple unpacking warning.
2009-11-19 22:54:57 +00:00
Tarek Ziadé 39de1fc5c8 dragfullwindows can have value 2 2009-11-19 05:33:16 +00:00
Benjamin Peterson dc3c239b1e #5037 proxy __unicode__ correctly 2009-11-19 03:00:02 +00:00
Lars Gustäbel 355538e5f5 Issue #7341: Close the internal file object in the TarFile
constructor in case of an error.
2009-11-18 20:24:54 +00:00
Mark Dickinson bd15a06fd3 Issue #7117, continued: Change round implementation to use the correctly-rounded
string <-> float conversions;  this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
2009-11-18 19:33:35 +00:00
Nick Coghlan 815521fca0 Correctly escape arbitrary error message text in the runpy unit tests 2009-11-18 11:27:53 +00:00
Tarek Ziadé acccafcf70 #7293: distutils.test_msvc9compiler now uses a key that exists on any fresh windows install 2009-11-18 08:46:56 +00:00
Philip Jenvey fab8be2f99 #1757126: fix typo with the cyrillic_asian alias 2009-11-17 02:42:26 +00:00
Nick Coghlan 4b953bac94 Allow for backslashes in file paths passed to the regex engine 2009-11-16 03:57:32 +00:00
Nick Coghlan 4976e3287a Account for another cache when hunting ref leaks 2009-11-16 03:55:51 +00:00
Nick Coghlan 11db64e5fd Issue #7328: don't corrupt sys.path when running pydoc with the -m switch 2009-11-15 22:36:47 +00:00
Antoine Pitrou ccd5e02d2b Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using
TLS or SSL.  Patch by Giampaolo Rodola'.
2009-11-15 17:22:09 +00:00
Antoine Pitrou d5b34d4597 Issue #4969: The mimetypes module now reads the MIME database from
the registry under Windows.  Patch by Gabriel Genellina.
2009-11-15 14:10:48 +00:00
Mark Dickinson 009ae861f2 Avoid signed overflow in some xrange calculations, and extend
xrange tests to cover some special cases that caused problems
in py3k.  This is a partial backport of r76292-76293 (see
issue #7298.)
2009-11-15 12:31:13 +00:00
Senthil Kumaran 20eb4f0782 Fix for Issue4683 - urllib2.HTTPDigestAuthHandler fails on third hostname?.
Resolution: Reset the nonce value for each unique nonce (as per RFC 2617)
2009-11-15 08:36:20 +00:00
Nick Coghlan 49868cb686 Issue #6816: expose the zipfile and directory execution mechanism to Python code via the runpy module. Also consolidated some script execution functionality in the test harness into a helper module and removed some implementation details from the runpy module documentation. 2009-11-15 07:30:34 +00:00
Senthil Kumaran 51200277b2 Addition of some details in the code comments. 2009-11-15 06:10:30 +00:00
R. David Murray 4653b8c2de Remove 'g' from regrtest getopt argument string, since there's no
handler for it.
2009-11-15 00:07:00 +00:00
R. David Murray da82689daa Issue 7324: add a sanity check to regrtest argument parsing to
catch the case of an option with no handler.
2009-11-15 00:04:32 +00:00
R. David Murray ca020bb7a7 Turn the bsddb replication startup timeout test into a
warning, to improve buildbot stability.
2009-11-14 17:43:16 +00:00
R. David Murray 7f7eea651f Issue #7312 (new feature): Add a -F flag to run the selected tests in
a loop until a test fails.  Can be combined with -j.  Patch by Antoine
Pitrou.
2009-11-14 15:18:22 +00:00
Antoine Pitrou c562ca4625 Issue #7318: multiprocessing now uses a timeout when it fails to establish
a connection with another process, rather than looping endlessly. The
default timeout is 20 seconds, which should be amply sufficient for
local connections.
2009-11-13 22:31:18 +00:00
Benjamin Peterson ccd640525b this main is much more useful 2009-11-12 23:42:23 +00:00
Benjamin Peterson e36199b49d fix several compile() issues by translating newlines in the tokenizer 2009-11-12 23:39:44 +00:00
Antoine Pitrou 310c9fec1a Issue #7295: Do not use a hardcoded file name in test_tarfile. 2009-11-11 20:55:07 +00:00
R. David Murray fdd53545a1 I got the relative magnitudes of the timeout increases reversed, so
I'm bumping up the longer test to the 60 seconds I intended to make it.
If this doesn't cure the intermittent buildbot timeouts, I'm going to
turn that test into a warning rather than a failure.
2009-11-11 18:07:27 +00:00
Senthil Kumaran 5dff3544f3 Fixing the NameError on Windows - issue1235 2009-11-11 17:22:35 +00:00
Senthil Kumaran 3a145a18c8 CGIHTTPRequestHandler.run_cgi() to use subprocess for Non Unix platforms. Fix
based on Issue1235.
2009-11-11 01:34:44 +00:00
Antoine Pitrou 47dded644f Backport micro-fix from the py3k svnmerge 2009-11-10 21:39:25 +00:00
Antoine Pitrou 0734c632d5 Issue #7197: Allow unittest.TextTestRunner objects to be pickled and
unpickled. This fixes crashes under Windows when trying to run
test_multiprocessing in verbose mode.

Additionally, Test_TextTestRunner hadn't been enabled in test_unittest.
2009-11-10 20:49:30 +00:00