Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d5c11f7a
Kaydet (Commit)
d5c11f7a
authored
Şub 26, 2017
tarafından
Sayan Chowdhury
Kaydeden (comit)
Berker Peksag
Şub 26, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-28624: Add a test that checks that cwd parameter of Popen() accepts PathLike objects (#157)
üst
6b4a5f45
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
subprocess.rst
Doc/library/subprocess.rst
+7
-3
test_subprocess.py
Lib/test/test_subprocess.py
+10
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/subprocess.rst
Dosyayı görüntüle @
d5c11f7a
...
...
@@ -466,9 +466,13 @@ functions.
The *pass_fds* parameter was added.
If *cwd* is not ``None``, the function changes the working directory to
*cwd* before executing the child. In particular, the function looks for
*executable* (or for the first item in *args*) relative to *cwd* if the
executable path is a relative path.
*cwd* before executing the child. *cwd* can be a :class:`str` and
:term:`path-like <path-like object>` object. In particular, the function
looks for *executable* (or for the first item in *args*) relative to *cwd*
if the executable path is a relative path.
.. versionchanged:: 3.6
*cwd* parameter accepts a :term:`path-like object`.
If *restore_signals* is true (the default) all signals that Python has set to
SIG_IGN are restored to SIG_DFL in the child process before the exec.
...
...
Lib/test/test_subprocess.py
Dosyayı görüntüle @
d5c11f7a
...
...
@@ -347,6 +347,16 @@ class ProcessTestCase(BaseTestCase):
temp_dir
=
self
.
_normalize_cwd
(
temp_dir
)
self
.
_assert_cwd
(
temp_dir
,
sys
.
executable
,
cwd
=
temp_dir
)
def
test_cwd_with_pathlike
(
self
):
temp_dir
=
tempfile
.
gettempdir
()
temp_dir
=
self
.
_normalize_cwd
(
temp_dir
)
class
_PathLikeObj
:
def
__fspath__
(
self
):
return
temp_dir
self
.
_assert_cwd
(
temp_dir
,
sys
.
executable
,
cwd
=
_PathLikeObj
())
@unittest.skipIf
(
mswindows
,
"pending resolution of issue #15533"
)
def
test_cwd_with_relative_arg
(
self
):
# Check that Popen looks for args[0] relative to cwd if args[0]
...
...
Misc/ACKS
Dosyayı görüntüle @
d5c11f7a
No preview for this file type
Misc/NEWS
Dosyayı görüntüle @
d5c11f7a
...
...
@@ -249,6 +249,9 @@ Extension Modules
Library
-------
- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
PathLike objects. Patch by Sayan Chowdhury.
- bpo-28518: Start a transaction implicitly before a DML statement.
Patch by Aviv Palivoda.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment