Skip to content

Commit 35b694d

Browse files
committed
Merge pull request #493 from docker/1.0.0-release
1.0.0 release
2 parents ec642f3 + 0f1bd81 commit 35b694d

File tree

4 files changed

+163
-157
lines changed

4 files changed

+163
-157
lines changed

docker/client.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import re
1818
import shlex
1919
import struct
20-
import warnings
2120
from datetime import datetime
2221

2322
import requests
@@ -140,12 +139,6 @@ def _attach_websocket(self, container, params=None):
140139
def _create_websocket_connection(self, url):
141140
return websocket.create_connection(url)
142141

143-
def _warn_deprecated(self, arg_name, version):
144-
warning_message = (
145-
'{0!r} is deprecated for API version >= {1}'
146-
).format(arg_name, version)
147-
warnings.warn(warning_message, DeprecationWarning)
148-
149142
def _get_raw_response_socket(self, response):
150143
self._raise_for_status(response)
151144
if six.PY3:
@@ -221,6 +214,10 @@ def _multiplexed_response_stream_helper(self, response):
221214
break
222215
yield data
223216

217+
@property
218+
def api_version(self):
219+
return self._version
220+
224221
def attach(self, container, stdout=True, stderr=True,
225222
stream=False, logs=False):
226223
if isinstance(container, dict):

docker/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.7.3-dev"
1+
version = "1.0.0"

docs/change_log.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
Change Log
22
==========
33

4+
1.0.0
5+
-----
6+
7+
### Features
8+
9+
* Added new `Client.rename` method (`docker rename`)
10+
* Added now `Client.stats` method (`docker stats`)
11+
* Added `read_only` param support to `utils.create_host_config` and
12+
`Client.start` (`docker run --read-only`)
13+
* Added `pid_mode` param support to `utils.create_host_config` and
14+
`Client.start` (`docker run --pid='host'`)
15+
* Added `since`, `until` and `filters` params to `Client.events`.
16+
* Added `decode` parameter to `Client.stats` and `Client.events` to decode
17+
JSON objects on the fly (False by default).
18+
19+
### Bugfixes
20+
21+
* Fixed a bug that caused `Client.build` to crash when the provided source was
22+
a remote source.
23+
24+
### Miscellaneous
25+
26+
* Default API version has been bumped to 1.17 (Docker Engine 1.5.0)
27+
* `Client.timeout` is now a public attribute, and users are encouraged to use it
28+
when request timeouts need to be changed at runtime.
29+
* Added `Client.api_version` as a read-only property.
30+
* The `memswap_limit` argument in `Client.create_container` now accepts string
31+
type values similar to `mem_limit` ('6g', '120000k', etc.)
32+
* Improved documentation
433

534
0.7.2
635
-----

tests/fake_stat.py

Lines changed: 129 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,133 @@
11
OBJ = {
2-
"read": "2015-02-11T19:20:46.667237763+02:00",
3-
"network": {
4-
"rx_bytes": 567224,
5-
"rx_packets": 3773,
6-
"rx_errors": 0,
7-
"rx_dropped": 0,
8-
"tx_bytes": 1176,
9-
"tx_packets": 13,
10-
"tx_errors": 0,
11-
"tx_dropped": 0
12-
},
13-
"cpu_stats": {
14-
"cpu_usage": {
15-
"total_usage": 157260874053,
16-
"percpu_usage": [
17-
52196306950,
18-
24118413549,
19-
53292684398,
20-
27653469156
21-
],
22-
"usage_in_kernelmode": 37140000000,
23-
"usage_in_usermode": 62140000000
2+
"read": "2015-02-11T19:20:46.667237763+02:00",
3+
"network": {
4+
"rx_bytes": 567224,
5+
"rx_packets": 3773,
6+
"rx_errors": 0,
7+
"rx_dropped": 0,
8+
"tx_bytes": 1176,
9+
"tx_packets": 13,
10+
"tx_errors": 0,
11+
"tx_dropped": 0
2412
},
25-
"system_cpu_usage": 3.0881377e+14,
26-
"throttling_data": {
27-
"periods": 0,
28-
"throttled_periods": 0,
29-
"throttled_time": 0
30-
}
31-
},
32-
"memory_stats": {
33-
"usage": 179314688,
34-
"max_usage": 258166784,
35-
"stats": {
36-
"active_anon": 90804224,
37-
"active_file": 2195456,
38-
"cache": 3096576,
39-
"hierarchical_memory_limit": 1.844674407371e+19,
40-
"inactive_anon": 85516288,
41-
"inactive_file": 798720,
42-
"mapped_file": 2646016,
43-
"pgfault": 101034,
44-
"pgmajfault": 1207,
45-
"pgpgin": 115814,
46-
"pgpgout": 75613,
47-
"rss": 176218112,
48-
"rss_huge": 12582912,
49-
"total_active_anon": 90804224,
50-
"total_active_file": 2195456,
51-
"total_cache": 3096576,
52-
"total_inactive_anon": 85516288,
53-
"total_inactive_file": 798720,
54-
"total_mapped_file": 2646016,
55-
"total_pgfault": 101034,
56-
"total_pgmajfault": 1207,
57-
"total_pgpgin": 115814,
58-
"total_pgpgout": 75613,
59-
"total_rss": 176218112,
60-
"total_rss_huge": 12582912,
61-
"total_unevictable": 0,
62-
"total_writeback": 0,
63-
"unevictable": 0,
64-
"writeback": 0
13+
"cpu_stats": {
14+
"cpu_usage": {
15+
"total_usage": 157260874053,
16+
"percpu_usage": [
17+
52196306950,
18+
24118413549,
19+
53292684398,
20+
27653469156
21+
],
22+
"usage_in_kernelmode": 37140000000,
23+
"usage_in_usermode": 62140000000
24+
},
25+
"system_cpu_usage": 3.0881377e+14,
26+
"throttling_data": {
27+
"periods": 0,
28+
"throttled_periods": 0,
29+
"throttled_time": 0
30+
}
31+
},
32+
"memory_stats": {
33+
"usage": 179314688,
34+
"max_usage": 258166784,
35+
"stats": {
36+
"active_anon": 90804224,
37+
"active_file": 2195456,
38+
"cache": 3096576,
39+
"hierarchical_memory_limit": 1.844674407371e+19,
40+
"inactive_anon": 85516288,
41+
"inactive_file": 798720,
42+
"mapped_file": 2646016,
43+
"pgfault": 101034,
44+
"pgmajfault": 1207,
45+
"pgpgin": 115814,
46+
"pgpgout": 75613,
47+
"rss": 176218112,
48+
"rss_huge": 12582912,
49+
"total_active_anon": 90804224,
50+
"total_active_file": 2195456,
51+
"total_cache": 3096576,
52+
"total_inactive_anon": 85516288,
53+
"total_inactive_file": 798720,
54+
"total_mapped_file": 2646016,
55+
"total_pgfault": 101034,
56+
"total_pgmajfault": 1207,
57+
"total_pgpgin": 115814,
58+
"total_pgpgout": 75613,
59+
"total_rss": 176218112,
60+
"total_rss_huge": 12582912,
61+
"total_unevictable": 0,
62+
"total_writeback": 0,
63+
"unevictable": 0,
64+
"writeback": 0
65+
},
66+
"failcnt": 0,
67+
"limit": 8039038976
6568
},
66-
"failcnt": 0,
67-
"limit": 8039038976
68-
},
69-
"blkio_stats": {
70-
"io_service_bytes_recursive": [
71-
{
72-
"major": 8,
73-
"minor": 0,
74-
"op": "Read",
75-
"value": 72843264
76-
},
77-
{
78-
"major": 8,
79-
"minor": 0,
80-
"op": "Write",
81-
"value": 4096
82-
},
83-
{
84-
"major": 8,
85-
"minor": 0,
86-
"op": "Sync",
87-
"value": 4096
88-
},
89-
{
90-
"major": 8,
91-
"minor": 0,
92-
"op": "Async",
93-
"value": 72843264
94-
},
95-
{
96-
"major": 8,
97-
"minor": 0,
98-
"op": "Total",
99-
"value": 72847360
100-
}
101-
],
102-
"io_serviced_recursive": [
103-
{
104-
"major": 8,
105-
"minor": 0,
106-
"op": "Read",
107-
"value": 10581
108-
},
109-
{
110-
"major": 8,
111-
"minor": 0,
112-
"op": "Write",
113-
"value": 1
114-
},
115-
{
116-
"major": 8,
117-
"minor": 0,
118-
"op": "Sync",
119-
"value": 1
120-
},
121-
{
122-
"major": 8,
123-
"minor": 0,
124-
"op": "Async",
125-
"value": 10581
126-
},
127-
{
128-
"major": 8,
129-
"minor": 0,
130-
"op": "Total",
131-
"value": 10582
132-
}
133-
],
134-
"io_queue_recursive": [
135-
136-
],
137-
"io_service_time_recursive": [
138-
139-
],
140-
"io_wait_time_recursive": [
141-
142-
],
143-
"io_merged_recursive": [
144-
145-
],
146-
"io_time_recursive": [
147-
148-
],
149-
"sectors_recursive": [
150-
151-
]
152-
}
69+
"blkio_stats": {
70+
"io_service_bytes_recursive": [
71+
{
72+
"major": 8,
73+
"minor": 0,
74+
"op": "Read",
75+
"value": 72843264
76+
}, {
77+
"major": 8,
78+
"minor": 0,
79+
"op": "Write",
80+
"value": 4096
81+
}, {
82+
"major": 8,
83+
"minor": 0,
84+
"op": "Sync",
85+
"value": 4096
86+
}, {
87+
"major": 8,
88+
"minor": 0,
89+
"op": "Async",
90+
"value": 72843264
91+
}, {
92+
"major": 8,
93+
"minor": 0,
94+
"op": "Total",
95+
"value": 72847360
96+
}
97+
],
98+
"io_serviced_recursive": [
99+
{
100+
"major": 8,
101+
"minor": 0,
102+
"op": "Read",
103+
"value": 10581
104+
}, {
105+
"major": 8,
106+
"minor": 0,
107+
"op": "Write",
108+
"value": 1
109+
}, {
110+
"major": 8,
111+
"minor": 0,
112+
"op": "Sync",
113+
"value": 1
114+
}, {
115+
"major": 8,
116+
"minor": 0,
117+
"op": "Async",
118+
"value": 10581
119+
}, {
120+
"major": 8,
121+
"minor": 0,
122+
"op": "Total",
123+
"value": 10582
124+
}
125+
],
126+
"io_queue_recursive": [],
127+
"io_service_time_recursive": [],
128+
"io_wait_time_recursive": [],
129+
"io_merged_recursive": [],
130+
"io_time_recursive": [],
131+
"sectors_recursive": []
132+
}
153133
}

0 commit comments

Comments
 (0)