-
Notifications
You must be signed in to change notification settings - Fork 918
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 2.2 #7196
Merged
Merged
Django 2.2 #7196
Changes from all commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
25da29d
Complete removal of nose test artifacts
SmileyChris c61c220
Update base requirements to Django 2.2 and python 3 compatibile packages
SmileyChris f2200e5
Fix print statements and django urlresolvers path
SmileyChris f17f6e4
Remove old futures
SmileyChris a19a17c
Futurize stage 1
SmileyChris 2514896
Futurize stage 2
SmileyChris 9daf338
Fix renamed RegexURLResolver
SmileyChris a9ae672
Update beautifulsoup4 for Py3 compatibility
SmileyChris 818c375
Fix project name
SmileyChris da913cf
Fix invalid unicode
SmileyChris 1333046
Fix simple cache backend
SmileyChris 12ebfd3
Post-futurize flake8 fixes
SmileyChris 8968268
Switch docker to python 3, more requirements upgrades
SmileyChris 1776151
Fix django url resolvers reference
SmileyChris b616875
Fix a resolver method renamed in Django 2
SmileyChris 7bd20d7
bytestring encoding fixes
SmileyChris 84017ea
Fix sitemap.json write mode for Python 3
SmileyChris 596269a
Python 3 doesn't support '<' between None and int now, so enforce an …
SmileyChris 835a551
Avoid some failures due to manifestfilestorage during collection by c…
SmileyChris 2e6caae
No more file type in Python 3
SmileyChris 83c35a8
Regex fixes
SmileyChris cd605a6
markdown tweaks
SmileyChris 756131b
jsonfield default changed to strings in migration
SmileyChris ab227e5
Pytest fixes
SmileyChris 17eeba5
Fix all test collection failures
SmileyChris 514b175
Use test settings
SmileyChris 6e36fac
Add cssselect (new subdependency) to dev requirements
SmileyChris 4c19dd0
Better check for pytest execution
SmileyChris 054c7fb
Fix old division from futurize
SmileyChris d6f0095
Remove basestring from futurize
SmileyChris 6f55dbf
Fix icalendar encoding issue with Python 3 upgrade
SmileyChris 6a5af7e
Faster test discovery
SmileyChris a509b4d
Fix LocaleURLMiddleware stripping invalid unicode
SmileyChris 1fca41b
Refactor and fix firefox_desktop tests
SmileyChris 48238e9
Remove some unused widgets
SmileyChris 5564086
Fix Widget.render to work with Django 2.1+
SmileyChris 1ee80cc
Fix str to int comparison
SmileyChris bee01fd
Use Django's JsonResponse rather than custom
SmileyChris 2650046
Fix encoding issues in tests
SmileyChris 3d3ff03
Removed unused test mixin
SmileyChris 451665d
Middleware fixes
SmileyChris b515b3e
Fix pytest deprecations
SmileyChris f23ab0b
Remove an extraneous basestring reference
SmileyChris 10c9bfa
Flake fixes
SmileyChris 54e3872
Add python cache files to dockerignore
SmileyChris cbdba4a
Fix non-int comparison
SmileyChris b3b45d5
Fix python3 iterator next() format
SmileyChris 258dc19
Update middleware to new Django 2 format
SmileyChris fce79c0
Fix encoding errors in tests
SmileyChris b95230d
Fix URLResolver change in Django 2
SmileyChris 4bb179b
Fix pagenode next in tests
SmileyChris e6545ec
Django 2.2.0 -> 2.2.1
SmileyChris ceef5ad
__unicode__ -> __str__
SmileyChris 8549c9e
Encoding fixes
SmileyChris 236d56e
Python 3 next format
SmileyChris 7eb9923
Mock fixes
SmileyChris d50e7d4
BytesIO encoding
SmileyChris 439e548
Response decoding
SmileyChris e66d667
Mock string rather than bytes file reading
SmileyChris b813147
Csrf html5 test fix
SmileyChris 4ea0f4a
Pyquery test fixes
SmileyChris 455d672
Remove reliance on dict ordering in tests
SmileyChris 2f6414b
Fix issue with mock.patch
SmileyChris 6c35f88
Test fixes for __unicode__ -> __str__
SmileyChris 7703db4
Remove test not needed now in latest django (underlying bug fixed)
SmileyChris b89aec7
Re-fix form test changed in rebase
SmileyChris fe2dca3
Fix as_urlpatterns test broken in merge with master
SmileyChris d2b5e18
Fix missing import
SmileyChris 643ec48
Fix markdown encoding in legal_docs view, update markdown
SmileyChris 335416d
Regex escape sequence fixes
SmileyChris 43bbe29
Flake8 upgrade, fixes, and excludes so it can be run without path args
SmileyChris 5142545
Fix unescaped periods in regex strirngs
SmileyChris 7c705df
Fix FrameOptionsHeader middleware, upgrade commonware
SmileyChris dd4874a
Update tests to work with BytesIO change in legal_docs view
SmileyChris 0d30015
Fix a response header test
SmileyChris f3567ed
Better valid url assertion in tests
SmileyChris eb34ff7
Remove legacy enum34 from requirements
SmileyChris b1d7fe5
Fix some template references to py2 iteritems
SmileyChris 53d4545
Fix a functional test bytestring comparison
SmileyChris cd56dbb
Remove HttpResponseJSON import re-introduced during rebase
jgmize 4a3db90
Add variant assignment that went missing during rebase
jgmize 04665eb
Fix over-indentation
jgmize aca787a
Fix undefined variables introduced by rebase
jgmize 1e84141
Fix invalid escape sequences using raw strings
jgmize 28a67b0
Fix unquote import
jgmize 4639b17
Handle request.keywords.get('viewport') is False
jgmize 14f8745
Check hasattr(request.keywords.get('viewport'), 'args') before use
jgmize 305a380
Add self.firefox_android to TestFirefoxAll
jgmize e5b5dc3
Remove old whatsnew templates reintroduced during rebase
jgmize 14e41ba
Fix missing FirefoxAndroid import
jgmize d5d0e0b
Remove check for settings.OTHER_NEWSLETTERS
jgmize 92fd50f
Fix more rebase errors
jgmize 61016dc
Remove en-ZA from show_newsletter locales
jgmize 01d36ef
Restore beta channel detection
jgmize 6323684
Replace mark.viewport('mobile') with selenium_mobile fixture
jgmize 2756b0f
Fix more rebase errors
jgmize 1a76e70
Remove unused FxVersionRedirectsMixin
jgmize d6c5112
Delete duplicate test with incorrect assertion
jgmize cd256f9
Fix another rebase error: prepend 'self.' to firefox_desktop
jgmize 986c026
Fix issue with cached settings on a few tests when running pytest loc…
SmileyChris a099f0a
Fix a few more unescaped periods in regex strings
SmileyChris f0a3501
Remove deprecated smoke mark
jgmize eaaddd7
Remove unnecessary pytest.param
jgmize f39dca0
Tidy up some futurize cruft
SmileyChris 9457926
Revert a test import change
SmileyChris fb12e4f
Fix all previously ignored flake8 exceptions
SmileyChris 7040330
Fix a deprecated pytest yield test
SmileyChris 0ba4ed3
Simplify raw object classes
SmileyChris 43e6e20
Fix the futurize list(dict.values()) unnecessary changes
SmileyChris 1e9d391
Fix flake8 formatting exception
SmileyChris 15737ac
Use force_text rather than manual isinstance
SmileyChris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.git | ||
.env | ||
**/__pycache__ | ||
**/*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ RUN gulp build --production | |
######## | ||
# Python dependencies builder | ||
# | ||
FROM python:2-stretch AS python-builder | ||
FROM python:3-slim AS python-builder | ||
|
||
WORKDIR /app | ||
ENV LANG=C.UTF-8 | ||
|
@@ -34,6 +34,7 @@ ENV PATH="/venv/bin:$PATH" | |
COPY docker/bin/apt-install /usr/local/bin/ | ||
RUN apt-install gettext build-essential libxml2-dev libxslt1-dev libxslt1.1 | ||
|
||
RUN pip install virtualenv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With Python 3 venv is built in. You change these 2 lines to just |
||
RUN virtualenv /venv | ||
|
||
COPY requirements/base.txt requirements/prod.txt ./requirements/ | ||
|
@@ -45,7 +46,7 @@ RUN pip install --no-cache-dir -r requirements/prod.txt | |
######## | ||
# django app container | ||
# | ||
FROM python:2-slim-stretch AS app-base | ||
FROM python:3-slim AS app-base | ||
|
||
# Extra python env | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should pin a Python minor version just to be sure we have consistent builds.
python:3.7-slim
e.g..