Commit Graph

121 Commits

Author SHA1 Message Date
Brian Curtin a87d586fd6 branch merge? 2011-06-13 16:10:32 -05:00
Brian Curtin d25aef55c8 Fix #12084. os.stat on Windows wasn't working properly with relative symlinks.
Use of DeviceIoControl to obtain the symlink path via the reparse tag was
removed. The code now uses GetFinalPathNameByHandle in the case of a
symbolic link and works properly given the added test which creates a symbolic
link and calls os.stat on it from multiple locations.

Victor Stinner also noticed an issue with os.lstat following the os.stat
code path when being passed bytes. The posix_lstat function was adjusted to
properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
2011-06-13 15:16:04 -05:00
Victor Stinner 62ec61fb6a test.support: can_symlink() removes the temporary symbolic link 2011-06-07 12:17:15 +02:00
Victor Stinner 88701e27e9 Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes, the file
descriptor of a pipe closed in the parent process is valid in the child process
according to fstat(), but the mode of the file descriptor is invalid, and read
or write raise an error.

Add also requires_mac_ver() decorator to test.support.
2011-06-01 13:13:04 +02:00
Ezio Melotti 07352b084c Update __all__ and docstring. 2011-05-14 14:51:18 +03:00
Ezio Melotti e728d72d8a #7960: merge with 3.1. 2011-05-14 08:43:25 +03:00
Ezio Melotti fc778fd067 #7960: fix docstrings for captured_output and captured_stdout. 2011-05-14 08:22:47 +03:00
Ezio Melotti 6b60fb9148 #5723: merge with 3.1. 2011-05-14 06:47:51 +03:00
Ezio Melotti 3c0d8a1cc7 #5723: Improve json tests to be executed with and without accelerations. 2011-05-14 06:38:03 +03:00
Ezio Melotti 3659f27ad3 Merge with 3.1. 2011-05-14 06:23:20 +03:00
Ezio Melotti fec3ad1036 Change import_fresh_module to work with packages. 2011-05-14 06:02:25 +03:00
Ezio Melotti 313fa9d365 #11910: merge with 3.1. 2011-05-09 06:43:14 +03:00
Ezio Melotti 199e0857f9 #11910: change import_fresh_module to return None when one of the "fresh" modules can not be imported. 2011-05-09 06:41:55 +03:00
Benjamin Peterson 31dc3735a5 merge 3.1 2011-05-08 15:34:24 -05:00
Benjamin Peterson 262c5827a5 put import_fresh_module in __all__ 2011-05-08 15:32:46 -05:00
Antoine Pitrou 390ea0f25d Add WSANO_DATA to possible errors triggered by getaddrinfo (Windows) 2011-04-29 00:44:33 +02:00
Antoine Pitrou e870623e96 Merge fix for issue #11501 2011-03-15 21:05:36 +01:00
Antoine Pitrou 2c50a09ac4 On behalf of Tarek: Issue #11501: disutils.archive_utils.make_zipfile no
longer fails if zlib is not installed. Instead, the zipfile.ZIP_STORED
compression is used to create the ZipFile. Patch by Natalia B. Bidart.
2011-03-15 21:02:59 +01:00
Antoine Pitrou 9e719b6eba Merged revisions 88460,88464,88466,88486,88511,88652 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88460 | antoine.pitrou | 2011-02-21 19:03:13 +0100 (lun., 21 févr. 2011) | 4 lines

  Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
  larger than 4GB.  Patch by Nadeem Vawda.
........
  r88464 | antoine.pitrou | 2011-02-21 20:05:08 +0100 (lun., 21 févr. 2011) | 3 lines

  Fix issues on 32-bit systems introduced by r88460
........
  r88466 | antoine.pitrou | 2011-02-21 20:28:40 +0100 (lun., 21 févr. 2011) | 3 lines

  Fix compile error under MSVC introduced by r88460.
........
  r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines

  Issue #4681: Allow mmap() to work on file sizes and offsets larger than
  4GB, even on 32-bit builds.  Initial patch by Ross Lagerwall, adapted for
  32-bit Windows.
........
  r88511 | antoine.pitrou | 2011-02-22 22:42:56 +0100 (mar., 22 févr. 2011) | 4 lines

  Issue #11277: finally fix Snow Leopard crash following r88460.
  (probably an OS-related issue with mmap)
........
  r88652 | antoine.pitrou | 2011-02-26 16:58:05 +0100 (sam., 26 févr. 2011) | 4 lines

  Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
  Patch by Hirokazu Yamamoto.
........
2011-02-28 23:48:16 +00:00
Antoine Pitrou 4914f9e4e2 Merged revisions 88652 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88652 | antoine.pitrou | 2011-02-26 16:58:05 +0100 (sam., 26 févr. 2011) | 4 lines

  Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
  Patch by Hirokazu Yamamoto.
........
2011-02-26 16:49:08 +00:00
Antoine Pitrou 78ae1fb1b9 Merged revisions 87968,87971-87975 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87968 | antoine.pitrou | 2011-01-12 21:46:37 +0100 (mer., 12 janv. 2011) | 4 lines

  Fix the expected memory use of utf-8 encoding.  Also, release the
  one reference to a huge object even when an exception is raised.
........
  r87971 | antoine.pitrou | 2011-01-12 22:19:59 +0100 (mer., 12 janv. 2011) | 3 lines

  Make test skipping message nicer, and remove the rather useless "overhead" parameter.
........
  r87972 | antoine.pitrou | 2011-01-12 22:40:20 +0100 (mer., 12 janv. 2011) | 3 lines

  Fix @bigmemtest when no limit is given by the user (oops)
........
  r87973 | antoine.pitrou | 2011-01-12 22:50:44 +0100 (mer., 12 janv. 2011) | 3 lines

  More informative skip message in @bigaddrspace
........
  r87974 | antoine.pitrou | 2011-01-12 22:58:39 +0100 (mer., 12 janv. 2011) | 3 lines

  A better message again
........
  r87975 | antoine.pitrou | 2011-01-12 23:02:45 +0100 (mer., 12 janv. 2011) | 3 lines

  Fix test_bigaddrspace (some tests didn't trigger the expected MemoryError)
........
2011-01-14 20:19:57 +00:00
Antoine Pitrou 98c62bd1c8 A better message again 2011-01-12 21:58:39 +00:00
Antoine Pitrou e0d3f8a654 More informative skip message in @bigaddrspace 2011-01-12 21:50:44 +00:00
Antoine Pitrou 9dd1171305 Fix @bigmemtest when no limit is given by the user (oops) 2011-01-12 21:40:20 +00:00
Antoine Pitrou aca5fa7010 Make test skipping message nicer, and remove the rather useless "overhead" parameter. 2011-01-12 21:19:59 +00:00
Eric Smith a3e8f3d85f Typo. 2011-01-11 10:24:34 +00:00
Nick Coghlan 90be5fb817 Issue 10556: test_zipimport_support implicitly imports too many modules (including _ssl) to safely clobber sys.modules after each test 2011-01-11 10:05:20 +00:00
Antoine Pitrou 50778ab4c2 Merged revisions 87861,87863 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87861 | antoine.pitrou | 2011-01-08 11:23:29 +0100 (sam., 08 janv. 2011) | 3 lines

  Fix test_ssl after r87849
........
  r87863 | antoine.pitrou | 2011-01-08 11:28:11 +0100 (sam., 08 janv. 2011) | 3 lines

  Add EHOSTUNREACH ('No route to host') to the errnos trapped by transient_internet().
........
2011-01-08 10:31:09 +00:00
Antoine Pitrou 5d938cb366 Add EHOSTUNREACH ('No route to host') to the errnos trapped by transient_internet(). 2011-01-08 10:28:11 +00:00
Antoine Pitrou f50a6b6b6d Merged revisions 87695 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87695 | antoine.pitrou | 2011-01-03 19:23:55 +0100 (lun., 03 janv. 2011) | 5 lines

  Issue #10806, issue #9905: Fix subprocess pipes when some of the standard
  file descriptors (0, 1, 2) are closed in the parent process.  Initial
  patch by Ross Lagerwall.
........
2011-01-03 18:36:36 +00:00
Brian Curtin 57160d7204 Fix #9333 on Windows XP, where os.symlink is not a possibility. 2010-12-29 02:04:28 +00:00
Brian Curtin 3b4499c5c7 Fix #9333. The symlink function is always available now, raising OSError
when the user doesn't hold the symbolic link privilege rather than hiding it.
2010-12-28 14:31:47 +00:00
Nick Coghlan 6b22f3fa17 Issue #10188 (partial resolution): tidy up some behaviour in the new tempfile.TemporaryDirectory context manager 2010-12-12 15:24:21 +00:00
Vinay Sajip 40e86f0df2 Fied typo 2010-12-10 09:11:23 +00:00
Vinay Sajip 129fd04440 test.support: Added TestHandler and Matcher classes for better support of assertions about logging. 2010-12-10 08:19:38 +00:00
Eric Smith 44588b45d2 More issue #10624: Add requires_IEEE_754 to __all__. 2010-12-04 17:12:41 +00:00
Eric Smith f24a0d90a9 Issue #10624: Move requires_IEEE_754 into test.support. I'll fix up other uses of it shortly. 2010-12-04 13:32:18 +00:00
Brian Curtin 52173d4959 Fix #9333. Expose os.symlink on Windows only when usable.
In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege
is an account privilege that is required to be held by the user. Not only
must the privilege be enabled for the account, the activated privileges for
the currently running application must be adjusted to enable the requested
privilege.

Rather than exposing an additional function to be called prior to the user's
first os.symlink call, we handle the AdjustTokenPrivileges Windows API call
internally and only expose os.symlink when the privilege escalation was
successful.

Due to the change of only exposing os.symlink when it's available, we can
go back to the original test skipping methods of checking via `hasattr`.
2010-12-02 18:29:18 +00:00
Antoine Pitrou 64474542eb PY_CFLAGS doesn't exist under Windows 2010-10-31 11:34:47 +00:00
Benjamin Peterson 65c66ab255 make gdb skip expected 2010-10-29 21:31:35 +00:00
Antoine Pitrou 31e08a4df6 Make check_warnings error messages more informative 2010-10-29 11:54:03 +00:00
Antoine Pitrou 2731494720 Merged revisions 85482 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85482 | antoine.pitrou | 2010-10-14 17:34:31 +0200 (jeu., 14 oct. 2010) | 4 lines

  Replace the "compiler" resource with the more generic "cpu", so
  as to mark CPU-heavy tests.
........
2010-10-14 15:41:23 +00:00
Antoine Pitrou 5bc4fa7a49 Replace the "compiler" resource with the more generic "cpu", so
as to mark CPU-heavy tests.
2010-10-14 15:34:31 +00:00
Antoine Pitrou 1b03f2ca83 Inherit interpreter flags in parallel testing 2010-10-14 11:12:00 +00:00
Victor Stinner d24fc5d7c4 test_sys: Remove workaround #8611
It looks like it is no more needed: Python 3.2 is slowly able to support
non-ascii paths with an ascii locale.
2010-10-13 23:41:57 +00:00
Victor Stinner 0ea31a9355 Recorded merge of revisions 83987 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83987 | victor.stinner | 2010-08-14 00:23:24 +0200 (sam., 14 août 2010) | 2 lines

  Fix a typo: TESTFN_UNENCODEABLE => TESTFN_UNENCODABLE
........
2010-09-10 12:32:58 +00:00
Victor Stinner 0d823ed434 Merged revisions 84666 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84666 | victor.stinner | 2010-09-10 13:19:59 +0200 (ven., 10 sept. 2010) | 2 lines

  Issue #9819: fix TESTFN_UNENCODABLE for japanese code page
........
2010-09-10 12:19:37 +00:00
Victor Stinner 8ce7df67de Issue #9819: fix TESTFN_UNENCODABLE for japanese code page 2010-09-10 11:19:59 +00:00
Antoine Pitrou dae0c63fc8 Merged revisions 84604 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84604 | antoine.pitrou | 2010-09-07 23:43:31 +0200 (mar., 07 sept. 2010) | 3 lines

  Also catch some gaierrors
........
2010-09-07 21:44:17 +00:00
Antoine Pitrou 2673c5bf5e Also catch some gaierrors 2010-09-07 21:43:31 +00:00