Skip to content

Commit 50e7d4b

Browse files
humitosagjohnson
authored andcommitted
Upgrade all packages using pur tool (#2916)
* Upgrade all packages using `pur` tool These ones were not upgraded since they are incompatible: * docker-py * celery * elasticsearch * pyelasticsearch * Upgrade all packages with `pur` pur --skip django,docker-py,elasticsearch,pyelasticsearch and some packages pinned manually to avoid conflicts with our tests. * Downgrade commonmark to 0.5.5 In 6.x changelog > DocParser has been renamed to Parser. https://github.com/rtfd/CommonMark-py/releases/tag/0.6.0 and that it's not compatible with the latest version of recommonmark (0.4.0) * `assert_not_called` replaced by `call_count` It doesn't receive arguments and can't be used at that point because it was called previously by the other POST on the API: https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_not_called * Upgrade packages with `pur` $ pur --skip django-tastypie,django,docker-py,elasticsearch,pyelasticsearch,commonmark,stripe,djangorestframework * Upgrade more packages * Pin django-allauth to 0.32.0 django-allauth 0.33.0 doesn't support Django 1.9.x which is the version we are using at the moment. * Pin mkdocs to 0.15.0 for compatibility reasons This version is the one installed by default on the venv to build the user's documentation. * Fix typo in method name * Proper call to the superproject symlink on Project.save `Project.superprojects.all()` returns `ProjectRelationship` instances where we need to use the `parent` or `child` attribute to access to the project itself. (we were sending the `ProjectRelationship.pk`)
1 parent 1db9bbd commit 50e7d4b

File tree

4 files changed

+53
-32
lines changed

4 files changed

+53
-32
lines changed

readthedocs/projects/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@ def save(self, *args, **kwargs): # pylint: disable=arguments-differ
339339
'Re-symlinking superprojects: project=%s',
340340
self.slug,
341341
)
342-
for superproject in self.superprojects.all():
342+
for relationship in self.superprojects.all():
343343
broadcast(
344344
type='app',
345345
task=tasks.symlink_project,
346-
args=[superproject.pk],
346+
args=[relationship.parent.pk],
347347
)
348348

349349
except Exception:

readthedocs/rtd_tests/tests/test_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ def test_bitbucket_webhook(self, trigger_build):
466466
trigger_build.assert_has_calls(
467467
[mock.call(force=True, version=mock.ANY, project=self.project)])
468468

469+
trigger_build_call_count = trigger_build.call_count
469470
client.post(
470471
'/api/v2/webhook/bitbucket/{0}/'.format(self.project.slug),
471472
{
@@ -479,8 +480,7 @@ def test_bitbucket_webhook(self, trigger_build):
479480
},
480481
format='json',
481482
)
482-
trigger_build.assert_not_called(
483-
[mock.call(force=True, version=mock.ANY, project=self.project)])
483+
self.assertEqual(trigger_build_call_count, trigger_build.call_count)
484484

485485
def test_bitbucket_invalid_webhook(self, trigger_build):
486486
"""Bitbucket webhook unhandled event."""

readthedocs/rtd_tests/tests/test_project_symlinks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def test_symlink_broadcast_calls_on_project_save(self):
926926
project.description = 'New description'
927927
project.save()
928928
# called once for this project itself
929-
broadcast.assert_any_calls(
929+
broadcast.assert_any_call(
930930
type='app',
931931
task=symlink_project,
932932
args=[project.pk],
@@ -944,13 +944,13 @@ def test_symlink_broadcast_calls_on_project_save(self):
944944
subproject.description = 'New subproject description'
945945
subproject.save()
946946
# subproject symlinks
947-
broadcast.assert_any_calls(
947+
broadcast.assert_any_call(
948948
type='app',
949949
task=symlink_project,
950950
args=[subproject.pk],
951951
)
952952
# superproject symlinks
953-
broadcast.assert_any_calls(
953+
broadcast.assert_any_call(
954954
type='app',
955955
task=symlink_project,
956956
args=[project.pk],

requirements/pip.txt

+46-25
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,93 @@
11
# Base packages
22
pip==9.0.1
33
appdirs==1.4.3
4-
virtualenv==15.0.1
5-
docutils==0.11
6-
Sphinx==1.5.3
4+
virtualenv==15.1.0
5+
docutils==0.14
6+
Sphinx==1.7.0
77
sphinx_rtd_theme==0.2.5b1
88
Pygments==2.2.0
9-
mkdocs==0.14.0
10-
django==1.9.12
11-
six==1.10.0
9+
10+
# latest compatible version with our code
11+
# https://github.com/rtfd/readthedocs.org/pull/2916#discussion_r172991757
12+
mkdocs==0.15.0
13+
14+
django==1.9.13
15+
six==1.11.0
1216
future==0.16.0
1317
readthedocs-build<2.1
1418

19+
# django-tastypie 0.13.x and 0.14.0 are not compatible with our code
1520
django-tastypie==0.13.0
16-
django-haystack==2.6.0
21+
22+
django-haystack==2.7.0
1723
celery-haystack==0.10
18-
django-guardian==1.4.6
19-
django-extensions==1.7.4
20-
djangorestframework==3.5.4
24+
django-guardian==1.4.9
25+
django-extensions==2.0.0
26+
27+
# djangorestframework 3.7.x drops support for django 1.9.x
28+
djangorestframework==3.6.4
29+
2130
django-vanilla-views==1.0.4
22-
jsonfield==1.0.3
31+
jsonfield==2.0.2
2332

24-
requests==2.9.1
33+
requests==2.18.4
2534
slumber==0.7.1
26-
lxml==3.3.5
35+
lxml==4.1.1
2736
defusedxml==0.5.0
2837

2938
# Basic tools
3039
redis==2.10.6
3140
celery==4.1.0
41+
42+
# django-allauth 0.33.0 dropped support for Django 1.9
43+
# https://django-allauth.readthedocs.io/en/latest/release-notes.html#backwards-incompatible-changes
3244
django-allauth==0.32.0
45+
3346
dnspython==1.15.0
3447

3548
# VCS
36-
httplib2==0.7.7
49+
httplib2==0.10.3
3750

3851
# Search
3952
elasticsearch==1.5.0
4053
pyelasticsearch==0.7.1
41-
pyquery==1.2.2
54+
pyquery==1.4.0
4255

4356
# Utils
44-
django-gravatar2==1.4.0
45-
pytz==2013b
46-
beautifulsoup4==4.1.3
57+
django-gravatar2==1.4.2
58+
pytz==2018.3
59+
beautifulsoup4==4.6.0
4760
Unipath==1.1
4861
django-kombu==0.9.4
4962
mimeparse==0.1.3
50-
mock==1.0.1
63+
mock==2.0.0
64+
65+
# stripe 1.20.2 is the latest compatible with our code base (otherwise
66+
# gold/tests/test_forms.py fails)
5167
stripe==1.20.2
52-
django-formtools==1.0
53-
django-dynamic-fixture==1.8.5
68+
69+
django-formtools==2.1
70+
django-dynamic-fixture==2.0.0
5471
docker-py==1.3.1
5572
django-textclassifier==1.0
56-
django-annoying==0.10.1
57-
django-messages-extends==0.5
73+
django-annoying==0.10.4
74+
django-messages-extends==0.6.0
5875
djangorestframework-jsonp==1.0.2
5976
django-taggit==0.22.2
6077
dj-pagination==2.3.2
6178

6279
# Docs
63-
sphinxcontrib-httpdomain==1.4.0
80+
sphinxcontrib-httpdomain==1.6.0
81+
82+
# commonmark 0.5.5 is the latest version compatible with our docs, the
83+
# newer ones make `tox -e docs` to fail
6484
commonmark==0.5.5
85+
6586
recommonmark==0.4.0
6687

6788
# Version comparison stuff
6889
packaging==16.8
6990

7091
# Commenting stuff
7192
django-cors-middleware==1.3.1
72-
nilsimsa==0.3.7
93+
nilsimsa==0.3.8

0 commit comments

Comments
 (0)