Skip to content

2.0.0 release#1343

Merged
shin- merged 88 commits into
releasefrom
2.0.0-release
Dec 12, 2016
Merged

2.0.0 release#1343
shin- merged 88 commits into
releasefrom
2.0.0-release

Conversation

@shin-

@shin- shin- commented Dec 7, 2016

Copy link
Copy Markdown
Contributor

2.0.0

List of PRs / issues for this release

Breaking changes

  • Dropped support for Python 2.6
  • docker.Client has been renamed to docker.APIClient
  • docker.from_env now creates a DockerClient instance instead of an
    APIClient instance.
  • Removed HostConfig parameters from APIClient.start
  • The minimum supported API version is now 1.21 (Engine version 1.9.0+)
  • The name of the pip package is now docker (was: docker-py). New
    versions of this library will only be published as docker from now on.
  • docker.ssladapter is now docker.transport.ssladapter
  • The package structure has been flattened in certain cases, which may affect
    import for docker.auth and docker.utils.ports
  • docker.utils.types has been moved to docker.types
  • create_host_config, create_ipam_pool and create_ipam_config have been
    removed from docker.utils. They have been replaced by the following classes
    in docker.types: HostConfig, IPAMPool and IPAMCOnfig.

Features

  • Added a high-level, user-focused API as docker.DockerClient. See the
    README and documentation for more information.
  • Implemented update_node method in APIClient.
  • Implemented remove_node method in APIClient.
  • Added support for restart_policy in update_container.
  • Added support for labels and shmsize in build.
  • Added support for attachable in create_network
  • Added support for healthcheck in create_container.
  • Added support for isolation in HostConfig.
  • Expanded support for pid_mode in HostConfig (now supports arbitrary
    values for API version >= 1.24).
  • Added support for options in IPAMConfig
  • Added a HealthCheck class to docker.types to be used in
    create_container.
  • Added an EndpointSpec class to docker.types to be used in
    create_service and update_service.

Bugfixes

  • Fixed a bug where auth information would not be properly passed to the engine
    during a build if the client used a credentials store.
  • Fixed an issue with some exclusion patterns in build.
  • Fixed an issue where context files were bundled with the wrong permissions
    when calling build on Windows.
  • Fixed an issue where auth info would not be retrieved from its default location
    on Windows.
  • Fixed an issue where lists of networks in create_service and
    update_service wouldn't be properly converted for the engine.
  • Fixed an issue where endpoint_config in create_service and
    update_service would be ignored.
  • endpoint_config in create_service and update_service has been
    deprecated in favor of endpoint_spec
  • Fixed a bug where constraints in a TaskTemplate object wouldn't be
    properly converted for the engine.
  • Fixed an issue where providing a dictionary for env in ContainerSpec
    would provoke an APIError when sent to the engine.
  • Fixed a bug where providing an env_file containing empty lines in
    create_containerwould raise an exception.
  • Fixed a bug where detach was being ignored by exec_start.

shin- and others added 29 commits December 7, 2016 16:31
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Real errors were getting swallowed in these tests, producing
other confusing cascading errors. This makes it much easier to
make sure a node is not in a Swarm, while also handling other
errors correctly.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
autopep8 --in-place --recursive --experimental -aaa --ignore E309 .

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
make integration-test file=models_services_test.py

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
The build context is tarred up on the client and then sent to the Docker
daemon.  However Windows permissions don't match the Unix ones.

Therefore we have to mark all files as executable when creating a build
context on Windows, like `docker build` already does:
moby/moby#11047.

Signed-off-by: Sebastian Schwarz <seschwar@gmail.com>
Added update_node function to enable setting labels on nodes.  This
exposes the Update a Node function from the Docker API and should
enable promoting/demoting manager nodes inside a swarm.

Signed-off-by: Nathan Shirlberg <nshirlberg@labattfood.com>
This resolves an issue where TarFile.gettarinfo() doesn't include the
file object, meaning that TarFile.addfile(TarFile.gettarinfo()) doesn't
pass the test suite. Instead, this uses an open() within a try...except
block to include a file object for each file without passing a file
object when the path is a directory.

Signed-off-by: Christian Bundy <christianbundy@fraction.io>
Signed-off-by: Maxime Feron <maxime.feron@corp.ovh.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Because two things called `BaseTestCase` is quite confusing.
I haven't bothered refactoring the other `BaseTestCase` because
that disappears anyway when we drop Python 2.6 support.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Because it's a helper, not a base thing. In preparation for
moving/deleting the unit test base classes.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Signed-off-by: Walker Lee <walkerlee.tw@gmail.com>
- update config structure has new members
- service name update is no longer supported

Signed-off-by: Alessandro Boch <aboch@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Introduced by #1230

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Signed-off-by: Ryan Belgrave <Ryan.Belgrave@target.com>
…ase with first letter capital

Signed-off-by: bin liu <liubin0329@gmail.com>
Signed-off-by: Simon Li <orpheus+devel@gmail.com>
Signed-off-by: Simon Li <orpheus+devel@gmail.com>
Fixes #1265

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
joncotton and others added 17 commits December 7, 2016 16:34
Fixes the new, purposely broken test added in the previous commit.

Signed-off-by: Jon Cotton <jc@finaltransfer.net>
Docker added support for sharing PID namespaces with other containers
since version 1.12 (see moby/moby#22481).

Signed-off-by: Stepan Stipl <stepan@stipl.net>
People upgrading to docker-py 2.0 without being aware of the new client
API will likely try to call the old `containers()` method. This adds a
helpful warning telling them to use APIClient to get the old API.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Replace references to old Client with APIClient
Moved contents of services.md to appropriate locations

Signed-off-by: Joffrey F <joffrey@docker.com>
Fixes #1271

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
docker.types

Signed-off-by: Joffrey F <joffrey@docker.com>
a credentials store

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
The Engine client looks *only* at the USERPROFILE environment variable
on Windows, so we should do that too.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Makefile now runs tests against Docker 1.13 RC

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
@shin- shin- added this to the 2.0.0 milestone Dec 8, 2016
@shin-

shin- commented Dec 9, 2016

Copy link
Copy Markdown
Contributor Author

cc @dnephin @aanand @bfirsh

Hoping to release on Monday!

@aanand

aanand commented Dec 9, 2016

Copy link
Copy Markdown
Contributor

giphy

@bfirsh

bfirsh commented Dec 10, 2016

Copy link
Copy Markdown
Contributor

Nice! I am travelling without a computer until next week, but I trust that this is all good. ;)

Signed-off-by: Joffrey F <joffrey@docker.com>
@shin- shin- merged commit 3bc06bb into release Dec 12, 2016
@bfirsh

bfirsh commented Dec 14, 2016

Copy link
Copy Markdown
Contributor

yay ✨

@shin- shin- deleted the 2.0.0-release branch January 26, 2017 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.