Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
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
docker-py
Commits
c9ee0222
Unverified
Kaydet (Commit)
c9ee0222
authored
Şub 05, 2018
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Şub 05, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1902 from docker/3.0.1-release
3.0.1 release
üst
91bc75cc
8649f48a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
9 deletions
+59
-9
daemon.py
docker/api/daemon.py
+1
-1
utils.py
docker/utils/utils.py
+7
-5
version.py
docker/version.py
+1
-1
change-log.md
docs/change-log.md
+14
-0
api_test.py
tests/unit/api_test.py
+18
-0
utils_test.py
tests/unit/utils_test.py
+18
-2
No files found.
docker/api/daemon.py
Dosyayı görüntüle @
c9ee0222
...
...
@@ -139,7 +139,7 @@ class DaemonApiMixin(object):
if
response
.
status_code
==
200
:
if
'auths'
not
in
self
.
_auth_configs
:
self
.
_auth_configs
[
'auths'
]
=
{}
self
.
_auth_configs
[
registry
or
auth
.
INDEX_NAME
]
=
req_data
self
.
_auth_configs
[
'auths'
][
registry
or
auth
.
INDEX_NAME
]
=
req_data
return
self
.
_result
(
response
,
json
=
True
)
def
ping
(
self
):
...
...
docker/utils/utils.py
Dosyayı görüntüle @
c9ee0222
...
...
@@ -97,16 +97,16 @@ def create_archive(root, files=None, fileobj=None, gzip=False):
for
path
in
files
:
full_path
=
os
.
path
.
join
(
root
,
path
)
if
os
.
lstat
(
full_path
)
.
st_mode
&
os
.
R_OK
==
0
:
raise
IOError
(
'Can not access file in context: {}'
.
format
(
full_path
)
)
i
=
t
.
gettarinfo
(
full_path
,
arcname
=
path
)
if
i
is
None
:
# This happens when we encounter a socket file. We can safely
# ignore it and proceed.
continue
# Workaround https://bugs.python.org/issue32713
if
i
.
mtime
<
0
or
i
.
mtime
>
8
**
11
-
1
:
i
.
mtime
=
int
(
i
.
mtime
)
if
constants
.
IS_WINDOWS_PLATFORM
:
# Windows doesn't keep track of the execute bit, so we make files
# and directories executable by default.
...
...
@@ -117,7 +117,9 @@ def create_archive(root, files=None, fileobj=None, gzip=False):
with
open
(
full_path
,
'rb'
)
as
f
:
t
.
addfile
(
i
,
f
)
except
IOError
:
t
.
addfile
(
i
,
None
)
raise
IOError
(
'Can not read file in context: {}'
.
format
(
full_path
)
)
else
:
# Directories, FIFOs, symlinks... don't need to be read.
t
.
addfile
(
i
,
None
)
...
...
docker/version.py
Dosyayı görüntüle @
c9ee0222
version
=
"3.0.
0
"
version
=
"3.0.
1
"
version_info
=
tuple
([
int
(
d
)
for
d
in
version
.
split
(
"-"
)[
0
]
.
split
(
"."
)])
docs/change-log.md
Dosyayı görüntüle @
c9ee0222
Change log
==========
3.
0.1
-----
[
List of PRs / issues for this release
](
https://github.com/docker/docker-py/milestone/43?closed=1
)
### Bugfixes
*
Fixed a bug where
`APIClient.login`
didn't populate the
`_auth_configs`
dictionary properly, causing subsequent
`pull`
and
`push`
operations to fail
*
Fixed a bug where some build context files were incorrectly recognized as
being inaccessible.
*
Fixed a bug where files with a negative mtime value would
cause errors when included in a build context
3.
0.0
-----
...
...
tests/unit/api_test.py
Dosyayı görüntüle @
c9ee0222
...
...
@@ -212,6 +212,24 @@ class DockerApiTest(BaseAPIClientTest):
timeout
=
DEFAULT_TIMEOUT_SECONDS
)
def
test_login
(
self
):
self
.
client
.
login
(
'sakuya'
,
'izayoi'
)
fake_request
.
assert_called_with
(
'POST'
,
url_prefix
+
'auth'
,
data
=
json
.
dumps
({
'username'
:
'sakuya'
,
'password'
:
'izayoi'
}),
timeout
=
DEFAULT_TIMEOUT_SECONDS
,
headers
=
{
'Content-Type'
:
'application/json'
}
)
assert
self
.
client
.
_auth_configs
[
'auths'
]
==
{
'docker.io'
:
{
'email'
:
None
,
'password'
:
'izayoi'
,
'username'
:
'sakuya'
,
'serveraddress'
:
None
,
}
}
def
test_events
(
self
):
self
.
client
.
events
()
...
...
tests/unit/utils_test.py
Dosyayı görüntüle @
c9ee0222
...
...
@@ -933,7 +933,10 @@ class TarTest(unittest.TestCase):
tar_data
=
tarfile
.
open
(
fileobj
=
archive
)
assert
sorted
(
tar_data
.
getnames
())
==
[
'bar'
,
'foo'
]
@pytest.mark.skipif
(
IS_WINDOWS_PLATFORM
,
reason
=
'No chmod on Windows'
)
@pytest.mark.skipif
(
IS_WINDOWS_PLATFORM
or
os
.
geteuid
()
==
0
,
reason
=
'root user always has access ; no chmod on Windows'
)
def
test_tar_with_inaccessible_file
(
self
):
base
=
tempfile
.
mkdtemp
()
full_path
=
os
.
path
.
join
(
base
,
'foo'
)
...
...
@@ -944,8 +947,9 @@ class TarTest(unittest.TestCase):
with
pytest
.
raises
(
IOError
)
as
ei
:
tar
(
base
)
assert
'Can not
access file in context: {}'
.
format
(
full_path
)
in
\
assert
'Can not
read file in context: {}'
.
format
(
full_path
)
in
(
ei
.
exconly
()
)
@pytest.mark.skipif
(
IS_WINDOWS_PLATFORM
,
reason
=
'No symlinks on Windows'
)
def
test_tar_with_file_symlinks
(
self
):
...
...
@@ -995,6 +999,18 @@ class TarTest(unittest.TestCase):
tar_data
=
tarfile
.
open
(
fileobj
=
archive
)
assert
sorted
(
tar_data
.
getnames
())
==
[
'bar'
,
'foo'
]
def
tar_test_negative_mtime_bug
(
self
):
base
=
tempfile
.
mkdtemp
()
filename
=
os
.
path
.
join
(
base
,
'th.txt'
)
self
.
addCleanup
(
shutil
.
rmtree
,
base
)
with
open
(
filename
,
'w'
)
as
f
:
f
.
write
(
'Invisible Full Moon'
)
os
.
utime
(
filename
,
(
12345
,
-
3600.0
))
with
tar
(
base
)
as
archive
:
tar_data
=
tarfile
.
open
(
fileobj
=
archive
)
assert
tar_data
.
getnames
()
==
[
'th.txt'
]
assert
tar_data
.
getmember
(
'th.txt'
)
.
mtime
==
-
3600
class
ShouldCheckDirectoryTest
(
unittest
.
TestCase
):
exclude_patterns
=
[
...
...
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