Skip to content

Commit

Permalink
bpo-35755: Remove current directory from posixpath.defpath (GH-11586)
Browse files Browse the repository at this point in the history
Document the change in a NEWS entry of the Security category.
  • Loading branch information
vstinner committed Apr 17, 2019
1 parent 228a3c9 commit 2c4c02f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/posixpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
extsep = '.'
sep = '/'
pathsep = ':'
defpath = ':/bin:/usr/bin'
defpath = '/bin:/usr/bin'
altsep = None
devnull = '/dev/null'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:func:`shutil.which` now uses ``os.confstr("CS_PATH")`` if available and if the
:envvar:`PATH` environment variable is not set. Remove also the current
directory from :data:`posixpath.defpath`. On Unix, :func:`shutil.which` and the
:mod:`subprocess` module no longer search the executable in the current
directory if the :envvar:`PATH` environment variable is not set.

0 comments on commit 2c4c02f

Please sign in to comment.