diff options
| author | Joffrey F <f.joffrey@gmail.com> | 2017-06-28 12:38:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-28 12:38:05 -0700 |
| commit | 65e01f24e4d0278c976ff7f88b5bbf13bcd6e1ec (patch) | |
| tree | 8cd958a29fea402528282b39511bd924cca2a3ed | |
| parent | 706e2cad654cf43be1dd4e4d420baa6964b0f1d3 (diff) | |
| parent | 3d84dbee59ba289d3f55455dbe38b929c677e687 (diff) | |
| download | docker-py-65e01f24e4d0278c976ff7f88b5bbf13bcd6e1ec.tar.gz | |
Merge pull request #1670 from docker/2.4.1-release2.4.1
2.4.1 release
| -rw-r--r-- | docker/utils/ports.py | 1 | ||||
| -rw-r--r-- | docker/version.py | 2 | ||||
| -rw-r--r-- | docs/change-log.md | 10 | ||||
| -rw-r--r-- | tests/unit/utils_test.py | 3 |
4 files changed, 15 insertions, 1 deletions
diff --git a/docker/utils/ports.py b/docker/utils/ports.py index 57332de..8f713c7 100644 --- a/docker/utils/ports.py +++ b/docker/utils/ports.py @@ -54,6 +54,7 @@ def port_range(start, end, proto, randomly_available_port=False): def split_port(port): + port = str(port) match = PORT_SPEC.match(port) if match is None: _raise_invalid_port(port) diff --git a/docker/version.py b/docker/version.py index 8f40f46..7953c90 100644 --- a/docker/version.py +++ b/docker/version.py @@ -1,2 +1,2 @@ -version = "2.4.0" +version = "2.4.1" version_info = tuple([int(d) for d in version.split("-")[0].split(".")]) diff --git a/docs/change-log.md b/docs/change-log.md index 194f734..4ccb617 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,6 +1,16 @@ Change log ========== +2.4.1 +----- + +[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/35?closed=1) + +### Bugfixes + +* Fixed a bug where the `split_port` utility would raise an exception when + passed a non-string argument. + 2.4.0 ----- diff --git a/tests/unit/utils_test.py b/tests/unit/utils_test.py index c25881d..a2d463d 100644 --- a/tests/unit/utils_test.py +++ b/tests/unit/utils_test.py @@ -587,6 +587,9 @@ class PortsTest(unittest.TestCase): def test_split_port_empty_string(self): self.assertRaises(ValueError, lambda: split_port("")) + def test_split_port_non_string(self): + assert split_port(1243) == (['1243'], None) + def test_build_port_bindings_with_one_port(self): port_bindings = build_port_bindings(["127.0.0.1:1000:1000"]) self.assertEqual(port_bindings["1000"], [("127.0.0.1", "1000")]) |
