[PATCH 08/11] requirements: Start using fixed versions

Daniel Axtens dja at axtens.net
Sat Aug 11 04:08:14 AEST 2018


Stephen Finucane <stephen at that.guru> writes:

> Given that 'tox' doesn't actually read any of these, there's no reason
> to use ranges of requirements. Instead, use the latest and greatest for
> live instances and rely on tox to validate behavior with older versions.
>

I don't know if it's this patch or one of the other patches that change
things in tox, but this breaks my postgres workflow:

docker-compose -f docker-compose-pg.yml up -d
docker-compose -f docker-compose-pg.yml run web --quick-tox
...
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'
...

I think the psycopg2 stuff needs to be in requirements-test.txt instead
of just requirements-prod.txt?

Regards,
Daniel

> Signed-off-by: Stephen Finucane <stephen at that.guru>
> ---
>  requirements-dev.txt  |  5 +----
>  requirements-prod.txt | 10 +++++-----
>  requirements-test.txt |  6 ++----
>  3 files changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/requirements-dev.txt b/requirements-dev.txt
> index f4ad751a..47465a3e 100644
> --- a/requirements-dev.txt
> +++ b/requirements-dev.txt
> @@ -1,5 +1,2 @@
> -Django>=1.11,<2.1; python_version >= '3.4'
> -Django>=1.11,<2.0; python_version < '3.0'
> -djangorestframework>=3.4,<3.9
> -django-filter>=1.0,<1.2
> +-r requirements-prod.txt
>  -r requirements-test.txt
> diff --git a/requirements-prod.txt b/requirements-prod.txt
> index e7a75354..1e075629 100644
> --- a/requirements-prod.txt
> +++ b/requirements-prod.txt
> @@ -1,6 +1,6 @@
> -Django>=1.11,<2.1; python_version >= '3.4'
> -Django>=1.11,<2.0; python_version < '3.0'
> -djangorestframework>=3.4,<3.9
> -django-filter>=1.0,<1.2
> -psycopg2>=2.7,<2.8
> +Django==2.0.6; python_version >= '3.4'
> +Django==1.11.13; python_version < '3.0'
> +djangorestframework==3.8.2
> +django-filter==1.1.0
> +psycopg2-binary==2.7.5
>  sqlparse==0.2.4
> diff --git a/requirements-test.txt b/requirements-test.txt
> index 94dc3db7..759db77b 100644
> --- a/requirements-test.txt
> +++ b/requirements-test.txt
> @@ -1,5 +1,3 @@
> -mysqlclient>=1.3,<1.4
> -psycopg2-binary>=2.7,<2.8
> +mysqlclient==1.3.12
>  django-debug-toolbar==1.9.1
> -python-dateutil>2.0,<3.0
> -selenium>=3.0,<4.0
> +python-dateutil==2.7.3
> -- 
> 2.17.1
>
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork


More information about the Patchwork mailing list