Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Freeze all dependencies for distribution upload
Commit f7e05dd earlier attempted to freeze the dependency versions by adding version numbers to every dependency we explicitly install for this project. However, that is not sufficient. While that freezes the direct explicit dependencies, it does not freeze the recursive dependencies (i.e., dependencies of dependencies). The dependencies are free to install latest versions of their dependencies which means our users may not get the exact recursive dependencies that we have tested Cloudmarker with. This commit is a better attempt to freeze all dependencies that exist in this project's virtual Python environment. To achieve this, there are now three requirement files. - `usr-requirements.txt`: These are our direct explicit dependencies, i.e., the dependencies we directly depend on for the project to run successfully from a user's perspective. Versions are generally not frozen here unless really required to work around an issue. - `dev-requirements.txt`: These are our direct explicit dependencies used during development phase only. Versions are not frozen here. Versions are generally not frozen here. - `pkg-requirements.txt`: These are the dependencies we package with our distribution. All versions are frozen here, so that a user who installs this project with `pip3` gets the exact versions of dependencies that we have tested this project with. The `pkg-requirements.txt` file is updated with `make freeze` which creates a new virtual Python environment, installs the requirements in `usr-requirements.txt` and then writes the output of `pip3 freeze` to this `pkg-requirements.txt`. In this commit, the entry for `slackclient` in `usr-requirements.txt` has been set to `slackclient==1.3.1` because that's the most recent version of `slackclient` this project works with. This project does not work fine with `slackclient 2.0.1` due to this error: ModuleNotFoundError: No module named 'slackclient' In this commit, the entry for `urllib3` in `pkg-requirements.txt` has been manually updated to `urllib3==1.24.3` to workaround this warning that appears while installing dependencies: requests 2.21.0 has requirement urllib3<1.25,>=1.21.1, but you'll have urllib3 1.25.2 which is incompatible. This issue also leads to an error when the project is installed from source distribution with `pip3 install --no-binary :all: cloudmarker` and run as `cloudmarker --help`. pkg_resources.ContextualVersionConflict: (urllib3 1.25.2 (venv/lib/python3.7/site-packages), Requirement.parse('urllib3<1.25,>=1.21.1'), {'requests'}) Setting the `urllib3` version manually resolves this issue.
- Loading branch information