Branch merge

This commit is contained in:
Éric Araujo 2012-06-24 13:54:22 -04:00
commit 56261cff16
3 changed files with 8 additions and 4 deletions

View File

@ -1205,7 +1205,7 @@ features:
* For some functions, the *path* argument can be not only a string giving a path
name, but also a file descriptor. The function will then operate on the file
referred to by the descriptor. (For POSIX systems, this will use the ``f...``
versions of the function.)
version of the function.)
You can check whether or not *path* can be specified as a file descriptor on
your platform using :data:`os.supports_fd`. If it is unavailable, using it
@ -1220,7 +1220,7 @@ features:
should be a file descriptor referring to a directory, and the path to operate
on should be relative; path will then be relative to that directory. If the
path is absolute, *dir_fd* is ignored. (For POSIX systems, this will use the
``f...at`` versions of the function.)
``f...at`` version of the function.)
You can check whether or not *dir_fd* is supported on your platform using
:data:`os.supports_dir_fd`. If it is unavailable, using it will raise a
@ -1231,7 +1231,7 @@ features:
* For functions ith a *follow_symlinks* parameter: If *follow_symlinks* is
``False``, and the last element of the path to operate on is a symbolic link,
the function will operate on the symbolic link itself instead of the file the
link points to. (For POSIX systems, this will use the ``l...`` versions of
link points to. (For POSIX systems, this will use the ``l...`` version of
the function.)
You can check whether or not *follow_symlinks* is supported on your platform

View File

@ -214,7 +214,7 @@ Directory and files operations
Added a symlink attack resistant version that is used automatically
if platform supports fd-based functions.
.. data:: rmtree.avoids_symlink_attacks
.. attribute:: rmtree.avoids_symlink_attacks
Indicates whether the current platform and implementation provides a
symlink attack resistant version of :func:`rmtree`. Currently this is

View File

@ -21,10 +21,12 @@ class BaseTest(unittest.TestCase):
self.env_dir = tempfile.mkdtemp()
if os.name == 'nt':
self.bindir = 'Scripts'
self.pydocname = 'pydoc.py'
self.lib = ('Lib',)
self.include = 'Include'
else:
self.bindir = 'bin'
self.pydocname = 'pydoc'
self.lib = ('lib', 'python%s' % sys.version[:3])
self.include = 'include'
if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in os.environ:
@ -74,6 +76,8 @@ class BasicTest(BaseTest):
executable = sys.executable
path = os.path.dirname(executable)
self.assertIn('home = %s' % path, data)
data = self.get_text_file_contents(self.bindir, self.pydocname)
self.assertTrue(data.startswith('#!%s%s' % (self.env_dir, os.sep)))
fn = self.get_env_file(self.bindir, self.exe)
if not os.path.exists(fn): # diagnostics for Windows buildbot failures
bd = self.get_env_file(self.bindir)