Incorrect versions of dependencies
Description
The setup.py incorrectly lists version of dependencies: https://github.com/Samsung/Universum/blob/9c38d4b5329ad596fed9ff00a77d6793e6e98132/setup.py#L42-L62
Specifically, Universum requires the following versions of packages:
- urllib3: 1.13 (default in Ubuntu 14.04: 1.7.1)
- docker-py: 2.5.0 (for testing only)
- pytest 3.3
At the same time, tests pass with pytest==3.7, but in setup.py this version is not allowed.
Steps to reproduce
- Install Ubuntu 14.04
- Install Universum and its development environment (docker,
sudo pip install .[test], etc) - Run tests with
make test
Expected result
Tests succeeded.
Actual result
Tests fail due to unavailable api in urllib3 and docker-py.
Environment
- OS: Ubuntu 14.04
- Universum version: 0.17.0
- Urllib3: 1.7.1
- Docker-py: 2.2.1
- requests: 2.11.1
- chardet: 2.0.1
- pytest: 3.0.7
Additional context
For rechecking the issue it is required to use minimal version of the dependencies. Otherwise, docker-py can in turn upgrade urllib3 to the version, which is newer than required for the Universum itself.
By default, pip refuses to upgrade urllib3, because it is installed with distutils (apt-get). Use -I command-line parameter to force pip to still upgrade urllib3:
sudo pip install urllib3==1.13 -I
Please note I'm not sure about the minimum required version of the pytest. This has to be checked separately.
For the record: it turned out pytest 3.7.3 breaks our tests.
The package p4python is successfully installed (python3.7 -m pip install p4python) with the following environment:
Ubuntu: 16.04.6
Openssl: 1.0.2g
Python: 3.7.8
Pip: >=19.0 (this version provides installation without compilation and access to ftp.perforce.com)
Pip: >=19.0 (this version provides installation without compilation and access to ftp.perforce.com)
@a-osipov-toxa, does it mean that with pip 18.x the installation fails?
@a-osipov-toxa, does it mean that with pip 18.x the installation fails?
@i-keliukh, if access to ftp is prohibited on your network - yes, installation fails with error:
Collecting p4python
Downloading https://files.pythonhosted.org/packages/bb/91/972c574beb614fc6c7666f5a1cb7ffa1deb9ca440382d44c96715f3ebfeb/p4python-2020.1.1983437.tar.gz (78kB)
100% |████████████████████████████████| 81kB 1.7MB/s
Installing collected packages: p4python
Running setup.py install for p4python ... error
Complete output from command /usr/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-owv6v2qy/p4python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tcn459d6/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
copying P4.py -> build/lib.linux-x86_64-3.7
running build_ext
Found installed SSL version OpenSSL 1.0.2g 1 Mar 2016
Found installed SSL libraries /lib/x86_64-linux-gnu
Looking for P4 API r20.1 for SSL 1.0.2g on ftp.perforce.com
error: [Errno 111] Connection refused
----------------------------------------
Command "/usr/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-owv6v2qy/p4python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tcn459d6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-owv6v2qy/p4python/
You are using pip version 18.1, however version 20.2b1 is available.
Success:
Collecting p4python
Downloading https://files.pythonhosted.org/packages/d0/40/25630008127b898bbdc45065a6a680f52443b66ae3d86fbe791a39cba064/p4python-2020.1.1983437-cp37-cp37m-manylinux2010_x86_64.whl (6.0MB)
100% |████████████████████████████████| 6.0MB 6.8MB/s
Installing collected packages: p4python
Successfully installed p4python-2020.1.1983437
You are using pip version 19.0, however version 20.2b1 is available.
Ok, there is the following line in the pip changelog:
Implement manylinux2010 platform tag support. manylinux2010 is the successor to manylinux1. It allows carefully compiled binary wheels to be installed on compatible Linux platforms.
It looks like this is it. From the p4python page there is the following wheel file: p4python-2020.1.1983437-cp37-cp37m-manylinux2010_x86_64.whl
Mypy exclude option is only supported since version 0.900 (https://github.com/python/mypy/commit/6bfc2dbc0e877408f5b70b86818683cd211c0031)