Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Django 3.0.x #107

Closed
wants to merge 3 commits into from
Closed

Conversation

adamghill
Copy link
Contributor

No description provided.

@AdrienLemaire
Copy link

@stphivos can you verify and merge this PR? django-mock-queries is now the only package in my project not supporting Django 3.

@stphivos
Copy link
Owner

Hi @adamghill I had to fix master in #108 for new builds to pass as the dependencies were broken. Can you pls rebase your PR? Thanks

@adamghill
Copy link
Contributor Author

adamghill commented Feb 11, 2020

I ended up merging master into my branch, but 2.7 is breaking. It appears to be failing because it can't install drf?

https://travis-ci.org/stphivos/django-mock-queries/jobs/649088219

ERROR: Could not find a version that satisfies the requirement djangorestframework>=3.11 (from django-mock-queries==2.1.3) (from versions: 0.1, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.1.11, 2.1.12, 2.1.13, 2.1.14, 2.1.15, 2.1.16, 2.1.17, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.3.10, 2.3.11, 2.3.12, 2.3.13, 2.3.14, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.8, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6, 3.7.7, 3.8.0, 3.8.1, 3.8.2, 3.9.0, 3.9.1, 3.9.2, 3.9.3, 3.9.4)

ERROR: No matching distribution found for djangorestframework>=3.11 (from django-mock-queries==2.1.3)

@stphivos
Copy link
Owner

Django 3.0.3 requires at least python 3.6.

Also django-rest-framework 3.10 or later supports Django 3.0.3. So travis and tox should reflect that:

tox.ini:

# Define supported tox env combinations using the codes below:
envlist =
    py{27,35}-dj{18,19,110}-drf33
    py{27,35,36,37}-dj{111}-drf{37,39}
    py{35,36,37}-dj{20,21,22}-drf{37,39}
    py{36,37}-dj{30}-drf{drf310}          <= Added django 3.0 here (in .travis.yml it's clearer which combinations run)

...

# Define pip requirement code to actual version mapping
[testenv]
deps =
    -rrequirements/dev.txt
    dj18: Django~=1.8.17
    dj19: Django~=1.9.12
    dj110: Django~=1.10.5
    dj111: Django~=1.11.17
    dj20: Django~=2.0.2
    dj21: Django~=2.1.0
    dj22: Django~=2.2.1
    dj30: Django~=3.0.3                   <= When referring to dj30, then Django~=3.0.3 will be installed
    drf33: djangorestframework~=3.3.2
    drf37: djangorestframework~=3.7.7
    drf39: djangorestframework~=3.9.2

.travis.yml:

    - python: 3.6
      env:
      ...
      - TOX_ENV=py36-dj22-drf39
      - TOX_ENV=py36-dj30-drf310
    - python: 3.7
      env:
      ...
      - TOX_ENV=py37-dj22-drf39
      - TOX_ENV=py37-dj30-drf310

For example, for TOX_ENV=py36-dj30-drf310, travis will install:

-rrequirements/dev.txt, Django~=3.0.3, djangorestframework~=3.10.3

I removed version ranges from requirements/core.txt so the library can be installed with future versions without issues. We just have to add them to the build matrix in order to verify they are compatible.

@stphivos stphivos closed this Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants