Commit Graph

110 Commits

Author SHA1 Message Date
Aarni Koskela c9e3efddb8
feat: move websocket-client to extra dependency (#3123)
Also bump minimum version to that prescribed by #3022

Signed-off-by: Aarni Koskela <akx@iki.fi>
2023-11-20 15:55:28 -05:00
Aarni Koskela 601476733c Enable Ruff C rules and autofix
Signed-off-by: Aarni Koskela <akx@iki.fi>
2023-08-15 13:36:53 +03:00
Aarni Koskela ec58856ee3 Clean up unnecessary noqa comments
Signed-off-by: Aarni Koskela <akx@iki.fi>
2023-08-15 13:36:53 +03:00
Hugo van Kemenade 8590eaad3c
ci: add support for Python 3.11 (#3064)
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-11-15 08:10:56 -05:00
Milas Bowman cd2c35a9b6
ci: add workflow for releases (#3018)
GitHub Actions workflow to create a release: will upload to PyPI
and create a GitHub release with the `sdist` and `bdist_wheel`
as well.

The version code is switched to `setuptools_scm` to work well
with this flow (e.g. avoid needing to write a script that does
a `sed` on the version file and commits as part of release).

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-30 12:14:27 -04:00
Milas Bowman be942f8390
deps: upgrade & remove unnecessary dependencies (#3014)
The `requirements.txt` and `setup.py` had a lot of extra transitive
dependencies to try and address various SSL shortcomings from the
Python ecosystem.

Thankfully, between modern Python versions (3.6+) and corresponding
`requests` versions (2.26+), this is all unnecessary now!

As a result, a bunch of transitive dependencies have been removed
from `requirements.txt`, the minimum version of `requests` increased,
and the `tls` extra made into a no-op.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-28 08:32:00 -04:00
Milas Bowman da62a28837
deps: test on Python 3.10 by default (#3010)
* Upgrade to latest Sphinx / recommonmark
* Small CSS fix for issue in new version of Alabaster theme
* Fix `Makefile` target for macOS

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-27 14:44:36 -04:00
Francesco Casalegno 2e6dad7983
deps: use `packaging` instead of deprecated `distutils` (#2931)
Replace `distutils.Version` (deprecated) with `packaging.Version`

Signed-off-by: Francesco Casalegno <francesco.casalegno@gmail.com>
2022-07-26 15:45:51 -04:00
Milas Bowman a6db044bd4
deps: upgrade pywin32 & relax version constraint (#3004)
Upgrade to latest pywin32, which has support for Python 3.10 and
resolves a CVE (related to ACL APIs, outside the scope of what
`docker-py` relies on, which is npipe support, but still gets
flagged by scanners).

The version constraint has also been relaxed in `setup.py` to allow
newer versions of pywin32. This is similar to how we handle the
other packages there, and should be safe from a compatibility
perspective.

Fixes #2902.
Closes #2972 and closes #2980.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-07-26 08:43:45 -04:00
Hugo van Kemenade bbbc29191a Bump minimum paramiko to support Python 3.10
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Hugo van Kemenade a9de343210 Add support for Python 3.10
Signed-off-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-10-11 23:06:12 +03:00
Anthony Sottile 5fcc293ba2 use python3.6+ constructs
Signed-off-by: Anthony Sottile <asottile@umich.edu>
2021-07-05 18:30:07 -04:00
Anca Iordache 8945fda6be Update maintainers
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-04-06 16:01:16 +02:00
Felipe Ruhland 2403774e76 Upgrade cryptography library to version 3.4.7
Dependabot opened a pull request
93bcc0497d to upgrade cryptography from
2.3 to 3.2.

However, only `requirements.txt` was updated.
The extra requirements were kept outdated.

This commit was made to update the library to the last version.

Fix #2791

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2021-04-02 02:51:20 +02:00
Ulysses Souza c8fba210a2 Remove support to pre python 3.6
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-22 10:18:23 -03:00
Christian Clauss 2426a5ffd5 setup.py: Add support for Python 3.8 and 3.9
Signed-off-by: Christian Clauss <cclauss@me.com>
2020-12-24 15:14:05 +01:00
Ofek Lev c65d437843 Upgrade Windows dependency
Signed-off-by: Ofek Lev <ofekmeister@gmail.com>
2020-07-07 08:43:02 +02:00
Joffrey F bdc954b009 Stop supporting EOL Python 3.4
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 19:51:29 -07:00
Joffrey F a823acc2ca Make dockerpycreds part of the SDK under docker.credentials
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-04-30 23:37:55 -07:00
Joffrey F 55ffb761bf Terminate support for Python 3.3 (EOL in 2018)
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-03-16 09:41:38 -07:00
Joffrey F 72f4f527ad Update test dependencies to latest version, fix some flake8 errors
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-01-09 11:18:40 -08:00
Joffrey F 3381f7be15 Update setup.py for modern pypi / setuptools
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 17:26:50 -08:00
Joffrey F bc5d7c8cb6 Modernize auth management
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 19:32:01 -08:00
Joffrey F 479f13eff1 Add paramiko requirement for SSH transport
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 609045f343 Bump pyopenssl to prevent installation of vulnerable version
CVE refs:
CVE-2018-1000807
CVE-2018-1000808

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-17 13:52:39 -07:00
Joffrey F d7bb808ca6 Update deps for 3.3 & 3.7 support
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-07-18 19:21:54 -07:00
Joffrey F f1189bfb4b Allow passing of env overrides to credstore through APIClient ctor
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-06-08 15:43:58 -07:00
Joffrey F accb9de52f Remove obsolete docker-py check in setup.py
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-25 14:49:18 -07:00
Joffrey F e1ab5457ca Bump docker-pycreds dependency
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-25 14:17:24 -07:00
Joffrey F 1d6f8ecf92 Support absolute paths for in-context Dockerfiles
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-12 13:22:47 -07:00
Joffrey F 15ae1f09f8 Bump docker-pycreds to 0.2.2 (pass support)
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-14 16:02:04 -08:00
Joffrey F a5490ad0be Fix appveyor tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 13:44:31 -08:00
Joffrey F 0acef5f6d2 Add Python 3.6 testing
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-22 18:08:01 -08:00
timvisee ff86324c4f
Require at least requests v2.14.2 to fix chardet
Signed-off-by: timvisee <timvisee@gmail.com>
2017-11-02 14:30:18 +01:00
cyli c163375591 If we're pinning exact versions of things for requirements.txt, pin
all dependencies of dependencies as well so we can get a consistent build.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2017-08-15 15:45:51 -07:00
cyli 3b95da3ea4 Require "requests[security]" if the `[tls]` option is selected, which also installs:
pyOpenSSL, cryptography, idna

and installs cryptography's version of openssl in Mac OS (which by default has an
ancient version of openssl that doesn't support TLS 1.2).

Signed-off-by: cyli <cyli@twistedmatrix.com>
2017-08-15 15:45:51 -07:00
Matt Oberle ae1f596d37 excludes requests 2.18.0 from compatible versions
The 2.18.0 version of requests breaks compatibility with docker-py:
https://github.com/requests/requests/issues/4160

[This block](https://github.com/shazow/urllib3/blob/master/urllib3/connectionpool.py#L292) of code from urllib3 fails:
```python
    def _get_timeout(self, timeout):
        """ Helper that always returns a :class:`urllib3.util.Timeout` """
        if timeout is _Default:
            return self.timeout.clone()

        if isinstance(timeout, Timeout):
            return timeout.clone()
        else:
            # User passed us an int/float. This is for backwards compatibility,
            # can be removed later
            return Timeout.from_float(timeout)
```

In the case of requests version 2.18.0:
`timeout` was an instance of `urllib3.util.timeout.Timeout`
`Timeout` was an instance of `requests.packages.urllib3.util.timeout.Timeout`

When the `isinstance(timeout, Timeout)` check fails the `urllib3.util.timeout.Timeout` object is passed as the `connection` argument to `requests.packages.urllib3.util.timeout.Timeout.from_float`.

Signed-off-by: Matt Oberle <matt.r.oberle@gmail.com>
2017-06-14 14:44:56 -04:00
Joffrey F e9691db91b Prevent issues when installing docker and docker-py in the same environment
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-18 16:26:22 -08:00
Joffrey F 176346bd95 Exclude requests==2.12.2 from dependencies
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-30 15:23:41 -08:00
Joffrey F f051f7e90a Merge pull request #1314 from bfirsh/specify-encoding-for-readme
Specify encoding when loading readme
2016-11-28 11:33:43 -08:00
Ben Firshman 6d770a65d7
Use find_packages in setup.py
It was missing docker.models, and this will fix it forever more.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 15:11:01 +00:00
Ben Firshman 04e9437986
Update setup.py details
Move from "docker-py" package to "docker".

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 15:11:01 +00:00
Ben Firshman a658e14e8b
Specify encoding when loading readme
Loading readme fails when system locale is not utf-8.

Potentially replaces #1313

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 14:38:38 +00:00
Ben Firshman d5bc7dc99a
Drop support for Python 2.6
Because it's ancient. If you're still using it, you can use an old
version of docker-py.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman b49cacced0
Make docker.utils.ports a single file
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman 19eefcf705
Make docker.ssladaptor a single file
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman 2c9d1110f0
Make docker.auth a single file
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Joffrey F 9a10447b40 Merge pull request #1242 from YorikSar/master
Support requests versions from 2.11.1 onwards
2016-10-14 16:56:45 -07:00
Joffrey F f4cb91eb02 Add missing long_description and maintainer fields to setup.py
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-05 15:27:36 -07:00
Tomas Tomecek aa2bd80ebb document requirement for ipaddress module
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-10-05 09:32:33 +02:00