Kaydet (Commit) 65e01f24 authored tarafından Joffrey F's avatar Joffrey F Kaydeden (comit) GitHub

Merge pull request #1670 from docker/2.4.1-release

2.4.1 release
......@@ -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)
......
version = "2.4.0"
version = "2.4.1"
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])
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
-----
......
......@@ -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")])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment