Skip to content

Commit e3b3b76

Browse files
committed
Merge branch 'master' into pipfile-schema
2 parents ec19401 + 345935c commit e3b3b76

File tree

25 files changed

+290
-212
lines changed

25 files changed

+290
-212
lines changed

.codecov.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
comment:
2+
layout: "diff, files"

.coveragerc

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
[run]
2+
branch = true
3+
source = .
24
omit =
35
*/**/migrations/*
6+
*/**/management/commands/*
7+
*/**/settings/*
8+
*/**/settings.py
9+
analytics/vendor/*
10+
rtd_tests/*
11+
*/**/tests/**
12+
wsgi.py
13+
14+
[report]
15+
exclude_lines =
16+
if self.debug:
17+
pragma: no cover
18+
raise NotImplementedError
19+
if __name__ == .__main__.:

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,6 @@ notifications:
4242

4343
branches:
4444
only:
45-
- master
45+
- master
46+
- rel # Community release branch
47+
- relcorp # Corporate release branch

CHANGELOG.rst

+33
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
Version 2.7.2
2+
-------------
3+
4+
:Date: October 23, 2018
5+
6+
* `@humitos <http://github.com/humitos>`__: Validate the slug generated is valid before importing a project (`#4780 <https://github.com/rtfd/readthedocs.org/pull/4780>`__)
7+
* `@humitos <http://github.com/humitos>`__: Do not log as error a webhook with an invalid branch name (`#4779 <https://github.com/rtfd/readthedocs.org/pull/4779>`__)
8+
* `@ericholscher <http://github.com/ericholscher>`__: Add an index page to our design docs. (`#4775 <https://github.com/rtfd/readthedocs.org/pull/4775>`__)
9+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Remove /embed API endpoint (`#4771 <https://github.com/rtfd/readthedocs.org/pull/4771>`__)
10+
* `@stsewd <http://github.com/stsewd>`__: Upgrade logs from debug on middleware (`#4769 <https://github.com/rtfd/readthedocs.org/pull/4769>`__)
11+
* `@humitos <http://github.com/humitos>`__: Link to SSL for Custom Domains fixed (`#4766 <https://github.com/rtfd/readthedocs.org/pull/4766>`__)
12+
* `@ericholscher <http://github.com/ericholscher>`__: Remove Eric & Anthony from ADMINS & MANAGERS settings (`#4762 <https://github.com/rtfd/readthedocs.org/pull/4762>`__)
13+
* `@humitos <http://github.com/humitos>`__: Do not re-raise the exception if the one that we are checking (`#4761 <https://github.com/rtfd/readthedocs.org/pull/4761>`__)
14+
* `@humitos <http://github.com/humitos>`__: Do not fail when unlinking an non-existing path (`#4760 <https://github.com/rtfd/readthedocs.org/pull/4760>`__)
15+
* `@humitos <http://github.com/humitos>`__: Allow to extend the DomainForm from outside (`#4752 <https://github.com/rtfd/readthedocs.org/pull/4752>`__)
16+
* `@davidfischer <http://github.com/davidfischer>`__: Fixes an OSX issue with the test suite (`#4748 <https://github.com/rtfd/readthedocs.org/pull/4748>`__)
17+
* `@humitos <http://github.com/humitos>`__: Use Docker time limit for max lock age (`#4747 <https://github.com/rtfd/readthedocs.org/pull/4747>`__)
18+
* `@xyNNN <http://github.com/xyNNN>`__: Fixed link of PagerDuty (`#4744 <https://github.com/rtfd/readthedocs.org/pull/4744>`__)
19+
* `@davidfischer <http://github.com/davidfischer>`__: Make storage syncers extend from a base class (`#4742 <https://github.com/rtfd/readthedocs.org/pull/4742>`__)
20+
* `@ericholscher <http://github.com/ericholscher>`__: Revert "Upgrade theme media to 0.4.2" (`#4735 <https://github.com/rtfd/readthedocs.org/pull/4735>`__)
21+
* `@ericholscher <http://github.com/ericholscher>`__: Upgrade theme media to 0.4.2 (`#4734 <https://github.com/rtfd/readthedocs.org/pull/4734>`__)
22+
* `@stsewd <http://github.com/stsewd>`__: Extend install option from config file (v2, schema only) (`#4732 <https://github.com/rtfd/readthedocs.org/pull/4732>`__)
23+
* `@stsewd <http://github.com/stsewd>`__: Remove /cname endpoint (`#4731 <https://github.com/rtfd/readthedocs.org/pull/4731>`__)
24+
* `@ericholscher <http://github.com/ericholscher>`__: Fix get_vcs_repo by moving it to the Mixin (`#4727 <https://github.com/rtfd/readthedocs.org/pull/4727>`__)
25+
* `@humitos <http://github.com/humitos>`__: Guide explaining how to keep compatibility with mkdocs (`#4726 <https://github.com/rtfd/readthedocs.org/pull/4726>`__)
26+
* `@ericholscher <http://github.com/ericholscher>`__: Release 2.7.1 (`#4725 <https://github.com/rtfd/readthedocs.org/pull/4725>`__)
27+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Fix the form for adopting a project (`#4721 <https://github.com/rtfd/readthedocs.org/pull/4721>`__)
28+
* `@ericholscher <http://github.com/ericholscher>`__: Remove logging verbosity on syncer failure (`#4717 <https://github.com/rtfd/readthedocs.org/pull/4717>`__)
29+
* `@humitos <http://github.com/humitos>`__: Lint requirement file for py2 (`#4712 <https://github.com/rtfd/readthedocs.org/pull/4712>`__)
30+
* `@davidfischer <http://github.com/davidfischer>`__: Improve the getting started docs (`#4676 <https://github.com/rtfd/readthedocs.org/pull/4676>`__)
31+
* `@stsewd <http://github.com/stsewd>`__: Strict validation in configuration file (v2 only) (`#4607 <https://github.com/rtfd/readthedocs.org/pull/4607>`__)
32+
* `@stsewd <http://github.com/stsewd>`__: Run coverage on travis (`#4605 <https://github.com/rtfd/readthedocs.org/pull/4605>`__)
33+
134
Version 2.7.1
235
-------------
336

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
copyright = '2010-{}, Read the Docs, Inc & contributors'.format(
4141
timezone.now().year
4242
)
43-
version = '1.0'
44-
release = '1.0'
43+
version = '2.7'
44+
release = version
4545
exclude_patterns = ['_build']
4646
default_role = 'obj'
4747
intersphinx_mapping = {

docs/design/index.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Design Documents
2+
================
3+
4+
This is where we outline the design of major parts of our project.
5+
Generally this is only available for features that have been build in the recent past,
6+
but we hope to write more of them over time.
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
:glob:
11+
12+
*

readthedocs/api/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from django.core.cache import cache
1313
from django.shortcuts import get_object_or_404
1414
from tastypie import fields
15-
from tastypie.authorization import DjangoAuthorization
15+
from tastypie.authorization import DjangoAuthorization, ReadOnlyAuthorization
1616
from tastypie.constants import ALL, ALL_WITH_RELATIONS
1717
from tastypie.http import HttpCreated
1818
from tastypie.resources import ModelResource
@@ -39,7 +39,7 @@ class Meta(object):
3939
allowed_methods = ['get', 'post', 'put']
4040
queryset = Project.objects.api()
4141
authentication = PostAuthentication()
42-
authorization = DjangoAuthorization()
42+
authorization = ReadOnlyAuthorization()
4343
excludes = ['path', 'featured', 'programming_language']
4444
filtering = {
4545
'users': ALL_WITH_RELATIONS,

readthedocs/core/fixtures/eric.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"last_login": "2010-08-14 01:51:05",
1313
"groups": [],
1414
"user_permissions": [],
15-
"password": "sha1$035cb$156ad6cb44332fb4f24bcb634142a67435be0b37",
15+
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
1616
"email": "[email protected]",
1717
"date_joined": "2010-08-14 01:50:58"
1818
}
@@ -30,7 +30,7 @@
3030
"last_login": "2010-08-14 01:51:05",
3131
"groups": [],
3232
"user_permissions": [],
33-
"password": "sha1$035cb$156ad6cb44332fb4f24bcb634142a67435be0b37",
33+
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
3434
"email": "[email protected]",
3535
"date_joined": "2010-08-14 01:50:58"
3636
}
@@ -48,7 +48,7 @@
4848
"last_login": "2010-08-14 01:51:05",
4949
"groups": [],
5050
"user_permissions": [],
51-
"password": "sha1$035cb$156ad6cb44332fb4f24bcb634142a67435be0b37",
51+
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
5252
"email": "[email protected]",
5353
"date_joined": "2010-08-14 01:50:58"
5454
}

readthedocs/core/middleware.py

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
"""Middleware for core app."""
22

3-
from __future__ import absolute_import
4-
from builtins import object
3+
from __future__ import (
4+
absolute_import, division, print_function, unicode_literals)
5+
56
import logging
67

7-
from django.utils.translation import ugettext_lazy as _
88
from django.conf import settings
99
from django.contrib.sessions.middleware import SessionMiddleware
1010
from django.core.cache import cache
11-
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
12-
from django.core.urlresolvers import set_urlconf, get_urlconf
11+
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
12+
from django.core.urlresolvers import get_urlconf, set_urlconf
1313
from django.http import Http404, HttpResponseBadRequest
14+
from django.utils.deprecation import MiddlewareMixin
15+
from django.utils.translation import ugettext_lazy as _
1416

1517
from readthedocs.core.utils import cname_to_slug
16-
from readthedocs.projects.models import Project, Domain
18+
from readthedocs.projects.models import Domain, Project
1719

1820
log = logging.getLogger(__name__)
1921

@@ -30,7 +32,7 @@
3032
)
3133

3234

33-
class SubdomainMiddleware(object):
35+
class SubdomainMiddleware(MiddlewareMixin):
3436

3537
"""Middleware to display docs for non-dashboard domains."""
3638

@@ -138,12 +140,12 @@ def process_response(self, request, response):
138140
return response
139141

140142

141-
class SingleVersionMiddleware(object):
143+
class SingleVersionMiddleware(MiddlewareMixin):
142144

143145
"""
144146
Reset urlconf for requests for 'single_version' docs.
145147
146-
In settings.MIDDLEWARE_CLASSES, SingleVersionMiddleware must follow after
148+
In settings.MIDDLEWARE, SingleVersionMiddleware must follow after
147149
SubdomainMiddleware.
148150
"""
149151

@@ -192,7 +194,7 @@ def process_request(self, request):
192194

193195

194196
# Forked from old Django
195-
class ProxyMiddleware(object):
197+
class ProxyMiddleware(MiddlewareMixin):
196198

197199
"""
198200
Middleware that sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, if the.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.11.16 on 2018-10-11 17:28
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations
6+
7+
8+
def forwards_func(apps, schema_editor):
9+
User = apps.get_model('auth', 'User')
10+
11+
old_password_patterns = (
12+
'sha1$',
13+
# RTD's production database doesn't have any of these
14+
# but they are included for completeness
15+
'md5$',
16+
'crypt$',
17+
)
18+
for pattern in old_password_patterns:
19+
users = User.objects.filter(password__startswith=pattern)
20+
for user in users:
21+
user.set_unusable_password()
22+
user.save()
23+
24+
25+
class Migration(migrations.Migration):
26+
27+
dependencies = [
28+
('core', '0004_ad-opt-out'),
29+
('auth', '0008_alter_user_username_max_length'),
30+
]
31+
32+
operations = [
33+
migrations.RunPython(forwards_func),
34+
]

readthedocs/core/views/hooks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def bitbucket_build(request):
310310
return _build_url(search_url, projects, branches)
311311

312312
if not branches:
313-
log.error(
313+
log.info(
314314
'Commit/branch not found url=%s branches=%s',
315315
search_url,
316316
branches,

readthedocs/profiles/urls/private.py

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
"""URL patterns for views to modify user profiles."""
22

3-
from __future__ import absolute_import
3+
from __future__ import (
4+
absolute_import,
5+
division,
6+
print_function,
7+
unicode_literals,
8+
)
9+
410
from django.conf.urls import url
511

612
from readthedocs.core.forms import UserProfileForm
713
from readthedocs.profiles import views
814

15+
916
urlpatterns = [
10-
url(r'^create/', views.create_profile,
11-
{
12-
'form_class': UserProfileForm,
13-
},
14-
name='profiles_profile_create'),
15-
url(r'^edit/', views.edit_profile,
17+
url(
18+
r'^edit/', views.edit_profile,
1619
{
1720
'form_class': UserProfileForm,
1821
'template_name': 'profiles/private/edit_profile.html',
1922
},
20-
name='profiles_profile_edit'),
23+
name='profiles_profile_edit'
24+
),
2125
url(r'^delete/', views.delete_account, name='delete_account'),
22-
url(r'^advertising/$', views.account_advertising, name='account_advertising'),
26+
url(
27+
r'^advertising/$',
28+
views.account_advertising,
29+
name='account_advertising',
30+
),
2331
]

0 commit comments

Comments
 (0)