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

Django 1.10 support #276

Merged
merged 10 commits into from
Oct 17, 2016
Merged

Django 1.10 support #276

merged 10 commits into from
Oct 17, 2016

Conversation

zoidyzoidzoid
Copy link
Contributor

@zoidyzoidzoid zoidyzoidzoid commented Jul 11, 2016

PR for tracking support for Django 1.10

  • django.conf.urls.pattern has been removed
  • checking namespace/app_name patterns stuff still works (I blindly deleted lines that might
    need to come back)
  • django rest framework issue:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x102796158>
  File "/src/git/ctpug/wafer/wafer/users/urls.py", line 14, in <module>
    url(r'^api/', include(router.urls)),
  File "/src/git/ctpug/wafer/virtualenv/lib/python3.5/site-packages/rest_framework/routers.py", line 79, in urls
    self._urls = self.get_urls()
  File "/src/git/ctpug/wafer/virtualenv/lib/python3.5/site-packages/rest_framework/routers.py", line 321, in get_urls
    urls = format_suffix_patterns(urls)
  File "/src/git/ctpug/wafer/virtualenv/lib/python3.5/site-packages/rest_framework/urlpatterns.py", line 64, in format_suffix_patterns
    return apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required)
  File "/src/git/ctpug/wafer/virtualenv/lib/python3.5/site-packages/rest_framework/urlpatterns.py", line 27, in apply_suffix_patterns
    view = urlpattern._callback or urlpattern._callback_str
AttributeError: 'RegexURLPattern' object has no attribute '_callback'

@drnlm
Copy link
Member

drnlm commented Jul 11, 2016

Django rest framework gained support for Django 1.10 with encode/django-rest-framework#4158 , but that hasn't made it into a release yet.

@drnlm
Copy link
Member

drnlm commented Aug 16, 2016

Since we've dropped support for Django 1.7, and django-restframework has had a release supporting 1.10, we should resume looking at this.

@zoidyzoidzoid
Copy link
Contributor Author

Found a new PR to subscribe to, which is blocking this one: zsiciarz/django-markitup#19

Though there is some tidying up I can still do for the namespacing stuff.

Copy link
Member

@drnlm drnlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably to explicitly test whether the DJANGO_VERSION string is pointing to master, rather than trying to come up with a pip command that handles both cases

Since Ubuntu won't have bash built with regex command, some hack along the lines of


if [ "${DJANGO_VERSION/master/" != "$DJANGO_VERSION" ]; then
   # Django master
   pip install $DJANGO_VERSION
else
  # Numeric version
   pip install 'Django=~'"$DJANGO_VERSION"
fi```

Copy link
Member

@drnlm drnlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

before_install:
- if [ "$TESTDB" = "postgres" ]; then pip install -q psycopg2 ; fi
# command to install dependencies,
install:
# Install the right version of Django first
- pip install 'Django~='"$DJANGO_VERSION".0
- pip install $DJANGO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to have complicated things in $DJANGO, it should probably be quoted here.

@zoidyzoidzoid zoidyzoidzoid changed the title [WIP] Django 1.10 support Django 1.10 support Oct 13, 2016
@zoidyzoidzoid
Copy link
Contributor Author

The one Travis run is trying to build CTPUG's django 1.10 branch instead of my fork's branch.

@zoidyzoidzoid zoidyzoidzoid merged commit 7388b22 into CTPUG:master Oct 17, 2016
@zoidyzoidzoid zoidyzoidzoid deleted the django-1.10 branch October 17, 2016 07:36
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