mirror of https://github.com/docker/docker-py.git
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>
This commit is contained in:
parent
bf026265e0
commit
be942f8390
|
@ -10,9 +10,8 @@ The latest stable version [is available on PyPI](https://pypi.python.org/pypi/do
|
|||
|
||||
pip install docker
|
||||
|
||||
If you are intending to connect to a docker host via TLS, add `docker[tls]` to your requirements instead, or install with pip:
|
||||
|
||||
pip install docker[tls]
|
||||
> Older versions (< 6.0) required installing `docker[tls]` for SSL/TLS support.
|
||||
> This is no longer necessary and is a no-op, but is supported for backwards compatibility.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
13
appveyor.yml
13
appveyor.yml
|
@ -1,13 +0,0 @@
|
|||
version: '{branch}-{build}'
|
||||
|
||||
install:
|
||||
- "SET PATH=C:\\Python37-x64;C:\\Python37-x64\\Scripts;%PATH%"
|
||||
- "python --version"
|
||||
- "python -m pip install --upgrade pip"
|
||||
- "pip install tox==2.9.1"
|
||||
|
||||
# Build the binary after tests
|
||||
build: false
|
||||
|
||||
test_script:
|
||||
- "tox"
|
|
@ -1,16 +1,6 @@
|
|||
appdirs==1.4.3
|
||||
asn1crypto==0.22.0
|
||||
cffi==1.14.4
|
||||
cryptography==3.4.7
|
||||
enum34==1.1.6
|
||||
idna==2.5
|
||||
ipaddress==1.0.18
|
||||
packaging==21.3
|
||||
paramiko==2.10.1
|
||||
pycparser==2.17
|
||||
pyOpenSSL==18.0.0
|
||||
pyparsing==2.2.0
|
||||
paramiko==2.11.0
|
||||
pywin32==304; sys_platform == 'win32'
|
||||
requests==2.26.0
|
||||
urllib3==1.26.5
|
||||
requests==2.28.1
|
||||
urllib3==1.26.11
|
||||
websocket-client==0.56.0
|
||||
|
|
19
setup.py
19
setup.py
|
@ -10,28 +10,23 @@ ROOT_DIR = os.path.dirname(__file__)
|
|||
SOURCE_DIR = os.path.join(ROOT_DIR)
|
||||
|
||||
requirements = [
|
||||
'packaging',
|
||||
'packaging >= 14.0',
|
||||
'requests >= 2.26.0',
|
||||
'urllib3 >= 1.26.0',
|
||||
'websocket-client >= 0.32.0',
|
||||
'requests >= 2.14.2, != 2.18.0',
|
||||
]
|
||||
|
||||
extras_require = {
|
||||
# win32 APIs if on Windows (required for npipe support)
|
||||
':sys_platform == "win32"': 'pywin32>=304',
|
||||
|
||||
# If using docker-py over TLS, highly recommend this option is
|
||||
# pip-installed or pinned.
|
||||
|
||||
# TODO: if pip installing both "requests" and "requests[security]", the
|
||||
# extra package from the "security" option are not installed (see
|
||||
# https://github.com/pypa/pip/issues/4391). Once that's fixed, instead of
|
||||
# installing the extra dependencies, install the following instead:
|
||||
# 'requests[security] >= 2.5.2, != 2.11.0, != 2.12.2'
|
||||
'tls': ['pyOpenSSL>=17.5.0', 'cryptography>=3.4.7', 'idna>=2.0.0'],
|
||||
# This is now a no-op, as similarly the requests[security] extra is
|
||||
# a no-op as of requests 2.26.0, this is always available/by default now
|
||||
# see https://github.com/psf/requests/pull/5867
|
||||
'tls': [],
|
||||
|
||||
# Only required when connecting using the ssh:// protocol
|
||||
'ssh': ['paramiko>=2.4.3'],
|
||||
|
||||
}
|
||||
|
||||
version = None
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
setuptools==58.2.0
|
||||
coverage==6.0.1
|
||||
setuptools==63.2.0
|
||||
coverage==6.4.2
|
||||
flake8==4.0.1
|
||||
pytest==6.2.5
|
||||
pytest==7.1.2
|
||||
pytest-cov==3.0.0
|
||||
pytest-timeout==2.0.1
|
||||
pytest-timeout==2.1.0
|
||||
|
|
Loading…
Reference in New Issue