Update the regex and add test cases.
(There are some xfails here for cases that the regex is not currently
handling. It's too strict for IPv6 domains at the moment.)
Closes: https://github.com/docker/docker-py/issues/3195
Related: https://github.com/opencontainers/distribution-spec/pull/498
Signed-off-by: Sven Kieske <kieske@osism.tech>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Co-authored-by: Milas Bowman <milas.bowman@docker.com>
Add support for Python 3.12.
`match_hostname` is gone in Python 3.12 and has been unused by
Python since 3.7.
The custom SSL adapter allows passing a specific SSL version; this
was first introduced a looong time ago to handle some SSL issues
at the time.
Closes#3176.
---------
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
fix: api - container.stats infinite blocking on stream mode
Includes additional test for no streaming
Signed-off-by: Bharath Vignesh J K <52282402+RazCrimson@users.noreply.github.com>
Requirements are the same, so it's still possible to use `urllib3 < 2`
or `requests == 2.28.2` for example.
Signed-off-by: Felix Fontein <felix@fontein.de>
Only remove `:ro` or `:rw` suffixes in their entirety; do not
strip arbitrary `r` / `o` / `w` / `:` characters individually.
Signed-off-by: Loïc Leyendecker <loic.leyendecker@gmail.com>
Add support for floats to docker logs params `since` / `until` since the
Docker Engine APIs support it.
This allows using fractional seconds for greater precision.
Signed-off-by: Archi Moebius <poerhiz@gmail.com>
Allow an Image to be deleted by calling the remove() method on it,
just like a Volume.
Signed-off-by: Ahmon Dancy <dancy@dancysoft.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Co-authored-by: Ahmon Dancy <dancy@dancysoft.com>
`rollback_config` was not in the list of `CREATE_SERVICE_KWARGS`
which prevented it from being an argument when creating services.
It has now been added and the problem fixed, allowing services to
have a rollback_config during creation and updating.
Fixes#2832.
Signed-off-by: Fraser Patten <pattenf00@gmail.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Co-authored-by: Milas Bowman <milas.bowman@docker.com>
Set `daemon` attribute instead of using `setDaemon` method that
was deprecated in Python 3.10.
Signed-off-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
This is no longer needed as it exists in every supported (non-EOL)
version of Python that we target.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This was using a deprecated function (`urllib.splitnport`),
ostensibly to work around issues with brackets on IPv6 addresses.
Ironically, its usage was broken, and would result in mangled IPv6
addresses if they had a port specified in some instances.
Usage of the deprecated function has been eliminated and extra test
cases added where missing. All existing cases pass as-is. (The only
other change to the test was to improve assertion messages.)
Signed-off-by: Milas Bowman <milas.bowman@docker.com>