Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56261cf

Browse files
committed
Branch merge
2 parents 19c4e5b + 544e13d commit 56261cf

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

Doc/library/os.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ features:
12051205
* For some functions, the *path* argument can be not only a string giving a path
12061206
name, but also a file descriptor. The function will then operate on the file
12071207
referred to by the descriptor. (For POSIX systems, this will use the ``f...``
1208-
versions of the function.)
1208+
version of the function.)
12091209

12101210
You can check whether or not *path* can be specified as a file descriptor on
12111211
your platform using :data:`os.supports_fd`. If it is unavailable, using it
@@ -1220,7 +1220,7 @@ features:
12201220
should be a file descriptor referring to a directory, and the path to operate
12211221
on should be relative; path will then be relative to that directory. If the
12221222
path is absolute, *dir_fd* is ignored. (For POSIX systems, this will use the
1223-
``f...at`` versions of the function.)
1223+
``f...at`` version of the function.)
12241224

12251225
You can check whether or not *dir_fd* is supported on your platform using
12261226
:data:`os.supports_dir_fd`. If it is unavailable, using it will raise a
@@ -1231,7 +1231,7 @@ features:
12311231
* For functions ith a *follow_symlinks* parameter: If *follow_symlinks* is
12321232
``False``, and the last element of the path to operate on is a symbolic link,
12331233
the function will operate on the symbolic link itself instead of the file the
1234-
link points to. (For POSIX systems, this will use the ``l...`` versions of
1234+
link points to. (For POSIX systems, this will use the ``l...`` version of
12351235
the function.)
12361236

12371237
You can check whether or not *follow_symlinks* is supported on your platform

Doc/library/shutil.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Directory and files operations
214214
Added a symlink attack resistant version that is used automatically
215215
if platform supports fd-based functions.
216216

217-
.. data:: rmtree.avoids_symlink_attacks
217+
.. attribute:: rmtree.avoids_symlink_attacks
218218

219219
Indicates whether the current platform and implementation provides a
220220
symlink attack resistant version of :func:`rmtree`. Currently this is

Lib/test/test_venv.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ def setUp(self):
2121
self.env_dir = tempfile.mkdtemp()
2222
if os.name == 'nt':
2323
self.bindir = 'Scripts'
24+
self.pydocname = 'pydoc.py'
2425
self.lib = ('Lib',)
2526
self.include = 'Include'
2627
else:
2728
self.bindir = 'bin'
29+
self.pydocname = 'pydoc'
2830
self.lib = ('lib', 'python%s' % sys.version[:3])
2931
self.include = 'include'
3032
if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in os.environ:
@@ -74,6 +76,8 @@ def test_defaults(self):
7476
executable = sys.executable
7577
path = os.path.dirname(executable)
7678
self.assertIn('home = %s' % path, data)
79+
data = self.get_text_file_contents(self.bindir, self.pydocname)
80+
self.assertTrue(data.startswith('#!%s%s' % (self.env_dir, os.sep)))
7781
fn = self.get_env_file(self.bindir, self.exe)
7882
if not os.path.exists(fn): # diagnostics for Windows buildbot failures
7983
bd = self.get_env_file(self.bindir)

0 commit comments

Comments
 (0)