diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_static/custom.css | 5 | ||||
-rw-r--r-- | docs/change-log.md | 236 | ||||
-rw-r--r-- | docs/conf.py | 43 | ||||
-rw-r--r-- | docs/index.rst | 2 | ||||
-rw-r--r-- | docs/tls.rst | 2 |
5 files changed, 257 insertions, 31 deletions
diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 5d711ee..b0b2e5d 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,3 +1,8 @@ dl.hide-signature > dt { display: none; } + +dl.field-list > dt { + /* prevent code blocks from forcing wrapping on the "Parameters" header */ + word-break: initial; +} diff --git a/docs/change-log.md b/docs/change-log.md index b10cfd5..5927728 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,6 +1,235 @@ -Change log +Changelog ========== +6.0.0 +----- + +### Upgrade Notes +- Minimum supported Python version is 3.7+ +- When installing with pip, the `docker[tls]` extra is deprecated and a no-op, + use `docker` for same functionality (TLS support is always available now) +- Native Python SSH client (used by default / `use_ssh_client=False`) will now + reject unknown host keys with `paramiko.ssh_exception.SSHException` +- Short IDs are now 12 characters instead of 10 characters (same as Docker CLI) + +### Features +- Python 3.10 support +- Automatically negotiate most secure TLS version +- Add `platform` (e.g. `linux/amd64`, `darwin/arm64`) to container create & run +- Add support for `GlobalJob` and `ReplicatedJobs` for Swarm +- Add `remove()` method on `Image` +- Add `force` param to `disable()` on `Plugin` + +### Bugfixes +- Fix install issues on Windows related to `pywin32` +- Do not accept unknown SSH host keys in native Python SSH mode +- Use 12 character short IDs for consistency with Docker CLI +- Ignore trailing whitespace in `.dockerignore` files +- Fix IPv6 host parsing when explicit port specified +- Fix `ProxyCommand` option for SSH connections +- Do not spawn extra subshell when launching external SSH client +- Improve exception semantics to preserve context +- Documentation improvements (formatting, examples, typos, missing params) + +### Miscellaneous +- Upgrade dependencies in `requirements.txt` to latest versions +- Remove extraneous transitive dependencies +- Eliminate usages of deprecated functions/methods +- Test suite reliability improvements +- GitHub Actions workflows for linting, unit tests, integration tests, and + publishing releases + +5.0.3 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/76?closed=1) + +### Features +- Add `cap_add` and `cap_drop` parameters to service create and ContainerSpec +- Add `templating` parameter to config create + +### Bugfixes +- Fix getting a read timeout for logs/attach with a tty and slow output + +### Miscellaneous +- Fix documentation examples + +5.0.2 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/75?closed=1) + +### Bugfixes +- Fix `disable_buffering` regression + +5.0.1 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/74?closed=1) + +### Bugfixes +- Bring back support for ssh identity file +- Cleanup remaining python-2 dependencies +- Fix image save example in docs + +### Miscellaneous +- Bump urllib3 to 1.26.5 +- Bump requests to 2.26.0 + +5.0.0 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/70?closed=1) + +### Breaking changes +- Remove support for Python 2.7 +- Make Python 3.6 the minimum version supported + +### Features +- Add `limit` parameter to image search endpoint + +### Bugfixes +- Fix `KeyError` exception on secret create +- Verify TLS keys loaded from docker contexts +- Update PORT_SPEC regex to allow square brackets for IPv6 addresses +- Fix containers and images documentation examples + +4.4.4 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/73?closed=1) + +### Bugfixes +- Remove `LD_LIBRARY_PATH` and `SSL_CERT_FILE` environment variables when shelling out to the ssh client + +4.4.3 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/72?closed=1) + +### Features +- Add support for docker.types.Placement.MaxReplicas + +### Bugfixes +- Fix SSH port parsing when shelling out to the ssh client + +4.4.2 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/71?closed=1) + +### Bugfixes +- Fix SSH connection bug where the hostname was incorrectly trimmed and the error was hidden +- Fix docs example + +### Miscellaneous +- Add Python3.8 and 3.9 in setup.py classifier list + +4.4.1 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/69?closed=1) + +### Bugfixes +- Avoid setting unsuported parameter for subprocess.Popen on Windows +- Replace use of deprecated "filter" argument on ""docker/api/image" + +4.4.0 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/67?closed=1) + +### Features +- Add an alternative SSH connection to the paramiko one, based on shelling out to the SSh client. Similar to the behaviour of Docker cli +- Default image tag to `latest` on `pull` + +### Bugfixes +- Fix plugin model upgrade +- Fix examples URL in ulimits + +### Miscellaneous +- Improve exception messages for server and client errors +- Bump cryptography from 2.3 to 3.2 + +4.3.1 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/68?closed=1) + +### Miscellaneous +- Set default API version to `auto` +- Fix conversion to bytes for `float` +- Support OpenSSH `identityfile` option + +4.3.0 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/64?closed=1) + +### Features +- Add `DeviceRequest` type to expose host resources such as GPUs +- Add support for `DriverOpts` in EndpointConfig +- Disable compression by default when using container.get_archive method + +### Miscellaneous +- Update default API version to v1.39 +- Update test engine version to 19.03.12 + +4.2.2 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/66?closed=1) + +### Bugfixes + +- Fix context load for non-docker endpoints + +4.2.1 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/65?closed=1) + +### Features + +- Add option on when to use `tls` on Context constructor +- Make context orchestrator field optional + +4.2.0 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/63?closed=1) + +### Bugfixes + +- Fix `win32pipe.WaitNamedPipe` throw exception in Windows containers +- Use `Hostname`, `Username`, `Port` and `ProxyCommand` settings from `.ssh/config` when on SSH +- Set host key policy for ssh transport to `paramiko.WarningPolicy()` +- Set logging level of `paramiko` to warn + +### Features + +- Add support for docker contexts through `docker.ContextAPI` + +4.1.0 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/61?closed=1) + +### Bugfixes + +- Correct `INDEX_URL` logic in build.py _set_auth_headers +- Fix for empty auth keys in config.json + +### Features + +- Add `NetworkAttachmentConfig` for service create/update + +### Miscellaneous + +- Bump pytest to 4.3.1 +- Adjust `--platform` tests for changes in docker engine +- Update credentials-helpers to v0.6.3 + 4.0.2 ----- @@ -14,7 +243,6 @@ Change log - Bumped version of websocket-client - 4.0.1 ----- @@ -73,7 +301,7 @@ Change log ### Bugfixes -* Fix base_url to keep TCP protocol on utils.py by letting the responsability of changing the +* Fix base_url to keep TCP protocol on utils.py by letting the responsibility of changing the protocol to `parse_host` afterwards, letting `base_url` with the original value. * XFAIL test_attach_stream_and_cancel on TLS @@ -1177,7 +1405,7 @@ like the others (`Client.volumes`, `Client.create_volume`, `Client.inspect_volume`, `Client.remove_volume`). * Added support for the `group_add` parameter in `create_host_config`. -* Added support for the CPU CFS (`cpu_quota` and `cpu_period`) parameteres +* Added support for the CPU CFS (`cpu_quota` and `cpu_period`) parameters in `create_host_config`. * Added support for the archive API endpoint (`Client.get_archive`, `Client.put_archive`). diff --git a/docs/conf.py b/docs/conf.py index f46d1f7..dc3b37c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # docker-sdk-python documentation build configuration file, created by # sphinx-quickstart on Wed Sep 14 15:48:58 2016. @@ -34,24 +33,19 @@ sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', + 'myst_parser' ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -from recommonmark.parser import CommonMarkParser - -source_parsers = { - '.md': CommonMarkParser, +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', } -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = ['.rst', '.md'] -# source_suffix = '.md' - # The encoding of source files. # # source_encoding = 'utf-8-sig' @@ -60,28 +54,27 @@ source_suffix = ['.rst', '.md'] master_doc = 'index' # General information about the project. -project = u'Docker SDK for Python' +project = 'Docker SDK for Python' year = datetime.datetime.now().year -copyright = u'%d Docker Inc' % year -author = u'Docker Inc' +copyright = '%d Docker Inc' % year +author = 'Docker Inc' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # -with open('../docker/version.py', 'r') as vfile: - exec(vfile.read()) -# The full version, including alpha/beta/rc tags. -release = version -# The short X.Y version. -version = '{}.{}'.format(version_info[0], version_info[1]) +# see https://github.com/pypa/setuptools_scm#usage-from-sphinx +from importlib.metadata import version +release = version('docker') +# for example take major/minor +version = '.'.join(release.split('.')[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -283,8 +276,8 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'docker-sdk-python.tex', u'docker-sdk-python Documentation', - u'Docker Inc.', 'manual'), + (master_doc, 'docker-sdk-python.tex', 'docker-sdk-python Documentation', + 'Docker Inc.', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -325,7 +318,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'docker-sdk-python', u'docker-sdk-python Documentation', + (master_doc, 'docker-sdk-python', 'docker-sdk-python Documentation', [author], 1) ] @@ -340,7 +333,7 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'docker-sdk-python', u'docker-sdk-python Documentation', + (master_doc, 'docker-sdk-python', 'docker-sdk-python Documentation', author, 'docker-sdk-python', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/index.rst b/docs/index.rst index 63e85d3..93b30d4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -58,7 +58,7 @@ You can stream logs: .. code-block:: python >>> for line in container.logs(stream=True): - ... print line.strip() + ... print(line.strip()) Reticulating spline 2... Reticulating spline 3... ... diff --git a/docs/tls.rst b/docs/tls.rst index 2e2f1ea..b95b468 100644 --- a/docs/tls.rst +++ b/docs/tls.rst @@ -15,7 +15,7 @@ For example, to check the server against a specific CA certificate: .. code-block:: python - tls_config = docker.tls.TLSConfig(ca_cert='/path/to/ca.pem') + tls_config = docker.tls.TLSConfig(ca_cert='/path/to/ca.pem', verify=True) client = docker.DockerClient(base_url='<https_url>', tls=tls_config) This is the equivalent of ``docker --tlsverify --tlscacert /path/to/ca.pem ...``. |