Skip to content

Commit f33d54a

Browse files
committed
Merge branch 'master' into save-config-on-build
2 parents 79fbb8e + 3bfec17 commit f33d54a

File tree

21 files changed

+219
-97
lines changed

21 files changed

+219
-97
lines changed

CHANGELOG.rst

+58
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
Version 2.8.1
2+
-------------
3+
4+
:Date: November 06, 2018
5+
6+
* `@ericholscher <http://github.com/ericholscher>`__: Fix migration name on modified date migration (`#4867 <https://github.com/rtfd/readthedocs.org/pull/4867>`__)
7+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Change 'VerisionLockedTimeout' to 'VersionLockedError' in comment. (`#4859 <https://github.com/rtfd/readthedocs.org/pull/4859>`__)
8+
* `@stsewd <http://github.com/stsewd>`__: Fix rtd config file (`#4857 <https://github.com/rtfd/readthedocs.org/pull/4857>`__)
9+
* `@ericholscher <http://github.com/ericholscher>`__: Shorten project name to match slug length (`#4856 <https://github.com/rtfd/readthedocs.org/pull/4856>`__)
10+
* `@stsewd <http://github.com/stsewd>`__: Generic message for parser error of config file (`#4853 <https://github.com/rtfd/readthedocs.org/pull/4853>`__)
11+
* `@stsewd <http://github.com/stsewd>`__: Use $HOME as CWD for virtualenv creation (`#4852 <https://github.com/rtfd/readthedocs.org/pull/4852>`__)
12+
* `@stsewd <http://github.com/stsewd>`__: Hide "edit on" when the version is a tag (`#4851 <https://github.com/rtfd/readthedocs.org/pull/4851>`__)
13+
* `@ericholscher <http://github.com/ericholscher>`__: Add modified_date to ImportedFile. (`#4850 <https://github.com/rtfd/readthedocs.org/pull/4850>`__)
14+
* `@ericholscher <http://github.com/ericholscher>`__: Use raw_id_fields so that the Feature admin loads (`#4849 <https://github.com/rtfd/readthedocs.org/pull/4849>`__)
15+
* `@stsewd <http://github.com/stsewd>`__: Allow to change project's VCS (`#4845 <https://github.com/rtfd/readthedocs.org/pull/4845>`__)
16+
* `@benjaoming <http://github.com/benjaoming>`__: Version compare warning text (`#4842 <https://github.com/rtfd/readthedocs.org/pull/4842>`__)
17+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Make form for adopting project a choice field (`#4841 <https://github.com/rtfd/readthedocs.org/pull/4841>`__)
18+
* `@humitos <http://github.com/humitos>`__: Do not send notification on VersionLockedError (`#4839 <https://github.com/rtfd/readthedocs.org/pull/4839>`__)
19+
* `@stsewd <http://github.com/stsewd>`__: Start testing config v2 on our project (`#4838 <https://github.com/rtfd/readthedocs.org/pull/4838>`__)
20+
* `@ericholscher <http://github.com/ericholscher>`__: Add all migrations that are missing from model changes (`#4837 <https://github.com/rtfd/readthedocs.org/pull/4837>`__)
21+
* `@ericholscher <http://github.com/ericholscher>`__: Add docstring to DrfJsonSerializer so we know why it's there (`#4836 <https://github.com/rtfd/readthedocs.org/pull/4836>`__)
22+
* `@ericholscher <http://github.com/ericholscher>`__: Show the project's slug in the dashboard (`#4834 <https://github.com/rtfd/readthedocs.org/pull/4834>`__)
23+
* `@humitos <http://github.com/humitos>`__: Avoid infinite redirection (`#4833 <https://github.com/rtfd/readthedocs.org/pull/4833>`__)
24+
* `@ericholscher <http://github.com/ericholscher>`__: Allow filtering builds by commit. (`#4831 <https://github.com/rtfd/readthedocs.org/pull/4831>`__)
25+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Add 'Branding' under the 'Business Info' section and 'Guidelines' on 'Design Docs' (`#4830 <https://github.com/rtfd/readthedocs.org/pull/4830>`__)
26+
* `@davidfischer <http://github.com/davidfischer>`__: Migrate old passwords without "set_unusable_password" (`#4829 <https://github.com/rtfd/readthedocs.org/pull/4829>`__)
27+
* `@humitos <http://github.com/humitos>`__: Do not import the Celery worker when running the Django app (`#4824 <https://github.com/rtfd/readthedocs.org/pull/4824>`__)
28+
* `@damianz5 <http://github.com/damianz5>`__: Fix for jQuery in doc-embed call (`#4819 <https://github.com/rtfd/readthedocs.org/pull/4819>`__)
29+
* `@invinciblycool <http://github.com/invinciblycool>`__: Add MkDocsYAMLParseError (`#4814 <https://github.com/rtfd/readthedocs.org/pull/4814>`__)
30+
* `@stsewd <http://github.com/stsewd>`__: Delete untracked tags on fetch (`#4811 <https://github.com/rtfd/readthedocs.org/pull/4811>`__)
31+
* `@stsewd <http://github.com/stsewd>`__: Don't activate version on build (`#4810 <https://github.com/rtfd/readthedocs.org/pull/4810>`__)
32+
* `@humitos <http://github.com/humitos>`__: Feature flag to make `readthedocs` theme default on MkDocs docs (`#4802 <https://github.com/rtfd/readthedocs.org/pull/4802>`__)
33+
* `@ericholscher <http://github.com/ericholscher>`__: Allow use of `file://` urls in repos during development. (`#4801 <https://github.com/rtfd/readthedocs.org/pull/4801>`__)
34+
* `@ericholscher <http://github.com/ericholscher>`__: Release 2.7.2 (`#4796 <https://github.com/rtfd/readthedocs.org/pull/4796>`__)
35+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Raise 404 at SubdomainMiddleware if the project does not exist. (`#4795 <https://github.com/rtfd/readthedocs.org/pull/4795>`__)
36+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Add help_text in the form for adopting a project (`#4781 <https://github.com/rtfd/readthedocs.org/pull/4781>`__)
37+
* `@humitos <http://github.com/humitos>`__: Add VAT ID field for Gold User (`#4776 <https://github.com/rtfd/readthedocs.org/pull/4776>`__)
38+
* `@sriks123 <http://github.com/sriks123>`__: Remove logic around finding config file inside directories (`#4755 <https://github.com/rtfd/readthedocs.org/pull/4755>`__)
39+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Improve unexpected error message when build fails (`#4754 <https://github.com/rtfd/readthedocs.org/pull/4754>`__)
40+
* `@stsewd <http://github.com/stsewd>`__: Don't build latest on webhook if it is deactivated (`#4733 <https://github.com/rtfd/readthedocs.org/pull/4733>`__)
41+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Change the way of using login_required decorator (`#4723 <https://github.com/rtfd/readthedocs.org/pull/4723>`__)
42+
* `@invinciblycool <http://github.com/invinciblycool>`__: Remove unused views and their translations. (`#4632 <https://github.com/rtfd/readthedocs.org/pull/4632>`__)
43+
* `@invinciblycool <http://github.com/invinciblycool>`__: Redirect to build detail post manual build (`#4622 <https://github.com/rtfd/readthedocs.org/pull/4622>`__)
44+
* `@anubhavsinha98 <http://github.com/anubhavsinha98>`__: Issue #4551 Changed mock docks to use sphinx (`#4569 <https://github.com/rtfd/readthedocs.org/pull/4569>`__)
45+
* `@xrmx <http://github.com/xrmx>`__: search: mark more strings for translation (`#4438 <https://github.com/rtfd/readthedocs.org/pull/4438>`__)
46+
* `@Alig1493 <http://github.com/Alig1493>`__: Fix for issue #4092: Remove unused field from Project model (`#4431 <https://github.com/rtfd/readthedocs.org/pull/4431>`__)
47+
* `@mashrikt <http://github.com/mashrikt>`__: Remove pytest _describe (`#4429 <https://github.com/rtfd/readthedocs.org/pull/4429>`__)
48+
* `@xrmx <http://github.com/xrmx>`__: static: use modern getJSON callbacks (`#4382 <https://github.com/rtfd/readthedocs.org/pull/4382>`__)
49+
* `@jaraco <http://github.com/jaraco>`__: Script for creating a project (`#4370 <https://github.com/rtfd/readthedocs.org/pull/4370>`__)
50+
* `@xrmx <http://github.com/xrmx>`__: make it easier to use a different default theme (`#4278 <https://github.com/rtfd/readthedocs.org/pull/4278>`__)
51+
* `@humitos <http://github.com/humitos>`__: Document alternate domains for business site (`#4271 <https://github.com/rtfd/readthedocs.org/pull/4271>`__)
52+
* `@xrmx <http://github.com/xrmx>`__: restapi/client: don't use DRF parser for parsing (`#4160 <https://github.com/rtfd/readthedocs.org/pull/4160>`__)
53+
* `@julienmalard <http://github.com/julienmalard>`__: New languages (`#3759 <https://github.com/rtfd/readthedocs.org/pull/3759>`__)
54+
* `@stsewd <http://github.com/stsewd>`__: Improve installation guide (`#3631 <https://github.com/rtfd/readthedocs.org/pull/3631>`__)
55+
* `@stsewd <http://github.com/stsewd>`__: Allow to hide version warning (`#3595 <https://github.com/rtfd/readthedocs.org/pull/3595>`__)
56+
* `@Alig1493 <http://github.com/Alig1493>`__: [Fixed #872] Filter Builds according to commit (`#3544 <https://github.com/rtfd/readthedocs.org/pull/3544>`__)
57+
* `@stsewd <http://github.com/stsewd>`__: Make slug field a valid DNS label (`#3464 <https://github.com/rtfd/readthedocs.org/pull/3464>`__)
58+
159
Version 2.8.0
260
-------------
361

readthedocs/core/admin.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"""Django admin interface for core models."""
22

33
from __future__ import absolute_import
4-
from datetime import datetime, timedelta
4+
from datetime import timedelta
55

66
from django.contrib import admin
77
from django.contrib.auth.models import User
88
from django.contrib.auth.admin import UserAdmin
99
from django.utils.translation import ugettext_lazy as _
10+
from django.utils import timezone
1011

1112
from readthedocs.core.models import UserProfile
1213
from readthedocs.projects.models import Project
@@ -50,7 +51,7 @@ def queryset(self, request, queryset):
5051
if self.value() == self.PROJECT_BUILT:
5152
return queryset.filter(projects__versions__built=True)
5253
if self.value() == self.PROJECT_RECENT:
53-
recent_date = datetime.today() - timedelta(days=365)
54+
recent_date = timezone.now() - timedelta(days=365)
5455
return queryset.filter(projects__builds__date__gt=recent_date)
5556

5657

readthedocs/core/fixtures/eric.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"is_active": true,
1010
"is_superuser": false,
1111
"is_staff": true,
12-
"last_login": "2010-08-14 01:51:05",
12+
"last_login": "2010-08-14T01:51:05+00:00",
1313
"groups": [],
1414
"user_permissions": [],
1515
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
1616
"email": "[email protected]",
17-
"date_joined": "2010-08-14 01:50:58"
17+
"date_joined": "2010-08-14T01:50:58+00:00"
1818
}
1919
},
2020
{
@@ -27,12 +27,12 @@
2727
"is_active": true,
2828
"is_superuser": false,
2929
"is_staff": true,
30-
"last_login": "2010-08-14 01:51:05",
30+
"last_login": "2010-08-14T01:51:05+00:00",
3131
"groups": [],
3232
"user_permissions": [],
3333
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
3434
"email": "[email protected]",
35-
"date_joined": "2010-08-14 01:50:58"
35+
"date_joined": "2010-08-14T01:50:58+00:00"
3636
}
3737
},
3838
{
@@ -45,12 +45,12 @@
4545
"is_active": true,
4646
"is_superuser": true,
4747
"is_staff": true,
48-
"last_login": "2010-08-14 01:51:05",
48+
"last_login": "2010-08-14T01:51:05+00:00",
4949
"groups": [],
5050
"user_permissions": [],
5151
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
5252
"email": "[email protected]",
53-
"date_joined": "2010-08-14 01:50:58"
53+
"date_joined": "2010-08-14T01:50:58+00:00"
5454
}
5555
}
5656
]

readthedocs/core/management/commands/clean_builds.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"""Clean up stable build paths per project version"""
22

33
from __future__ import absolute_import
4-
from datetime import datetime, timedelta
4+
from datetime import timedelta
55
import logging
66
from optparse import make_option
77

88
from django.core.management.base import BaseCommand
99
from django.db.models import Max
10+
from django.utils import timezone
1011

1112
from readthedocs.builds.models import Build, Version
1213

@@ -35,7 +36,7 @@ def add_arguments(self, parser):
3536

3637
def handle(self, *args, **options):
3738
"""Find stale builds and remove build paths"""
38-
max_date = datetime.now() - timedelta(days=options['days'])
39+
max_date = timezone.now() - timedelta(days=options['days'])
3940
queryset = (Build.objects
4041
.values('project', 'version')
4142
.annotate(max_date=Max('date'))

readthedocs/core/static/core/js/readthedocs-doc-embed.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readthedocs/oauth/services/base.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from allauth.socialaccount.providers import registry
1212
from builtins import object
1313
from django.conf import settings
14+
from django.utils import timezone
1415
from oauthlib.oauth2.rfc6749.errors import InvalidClientIdError
1516
from requests.exceptions import RequestException
1617
from requests_oauthlib import OAuth2Session
@@ -83,7 +84,7 @@ def create_session(self):
8384
'token_type': 'bearer',
8485
}
8586
if token.expires_at is not None:
86-
token_expires = (token.expires_at - datetime.now()).total_seconds()
87+
token_expires = (token.expires_at - timezone.now()).total_seconds()
8788
token_config.update({
8889
'refresh_token': token.token_secret,
8990
'expires_in': token_expires,
@@ -119,7 +120,9 @@ def token_updater(self, token):
119120
"""
120121
def _updater(data):
121122
token.token = data['access_token']
122-
token.expires_at = datetime.fromtimestamp(data['expires_at'])
123+
token.expires_at = timezone.make_aware(
124+
datetime.fromtimestamp(data['expires_at'])
125+
)
123126
token.save()
124127
log.info('Updated token %s:', token)
125128

readthedocs/projects/fixtures/test_auth.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -675,12 +675,12 @@
675675
"is_active": true,
676676
"is_superuser": false,
677677
"is_staff": false,
678-
"last_login": "2014-02-09T19:47:26.625",
678+
"last_login": "2014-02-09T19:47:26.625+00:00",
679679
"groups": [],
680680
"user_permissions": [],
681681
"password": "",
682682
"email": "",
683-
"date_joined": "2014-02-09T19:47:26.625"
683+
"date_joined": "2014-02-09T19:47:26.625+00:00"
684684
}
685685
},
686686
{
@@ -693,12 +693,12 @@
693693
"is_active": true,
694694
"is_superuser": true,
695695
"is_staff": true,
696-
"last_login": "2014-02-09T19:48:39.934",
696+
"last_login": "2014-02-09T19:48:39.934+00:00",
697697
"groups": [],
698698
"user_permissions": [],
699699
"password": "pbkdf2_sha256$10000$FgAANNnclCS5$ElbS6laaFoh+nyHbEb96ICxS3xK1LioUS+CMQK+KdYM=",
700700
"email": "[email protected]",
701-
"date_joined": "2014-02-09T19:48:39.934"
701+
"date_joined": "2014-02-09T19:48:39.934+00:00"
702702
}
703703
}
704704
]

0 commit comments

Comments
 (0)