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`)
humitos/resolver/username-regex
Manuel Kaufmann 2018-03-14 23:16:35 -05:00 committed by Anthony
parent 1db9bbd271
commit 50e7d4be3b
4 changed files with 55 additions and 34 deletions

View File

@ -339,11 +339,11 @@ class Project(models.Model):
'Re-symlinking superprojects: project=%s',
self.slug,
)
for superproject in self.superprojects.all():
for relationship in self.superprojects.all():
broadcast(
type='app',
task=tasks.symlink_project,
args=[superproject.pk],
args=[relationship.parent.pk],
)
except Exception:

View File

@ -466,6 +466,7 @@ class IntegrationsTests(TestCase):
trigger_build.assert_has_calls(
[mock.call(force=True, version=mock.ANY, project=self.project)])
trigger_build_call_count = trigger_build.call_count
client.post(
'/api/v2/webhook/bitbucket/{0}/'.format(self.project.slug),
{
@ -479,8 +480,7 @@ class IntegrationsTests(TestCase):
},
format='json',
)
trigger_build.assert_not_called(
[mock.call(force=True, version=mock.ANY, project=self.project)])
self.assertEqual(trigger_build_call_count, trigger_build.call_count)
def test_bitbucket_invalid_webhook(self, trigger_build):
"""Bitbucket webhook unhandled event."""

View File

@ -926,7 +926,7 @@ class TestPublicSymlinkUnicode(TempSiterootCase, TestCase):
project.description = 'New description'
project.save()
# called once for this project itself
broadcast.assert_any_calls(
broadcast.assert_any_call(
type='app',
task=symlink_project,
args=[project.pk],
@ -944,13 +944,13 @@ class TestPublicSymlinkUnicode(TempSiterootCase, TestCase):
subproject.description = 'New subproject description'
subproject.save()
# subproject symlinks
broadcast.assert_any_calls(
broadcast.assert_any_call(
type='app',
task=symlink_project,
args=[subproject.pk],
)
# superproject symlinks
broadcast.assert_any_calls(
broadcast.assert_any_call(
type='app',
task=symlink_project,
args=[project.pk],

View File

@ -1,67 +1,88 @@
# Base packages
pip==9.0.1
appdirs==1.4.3
virtualenv==15.0.1
docutils==0.11
Sphinx==1.5.3
virtualenv==15.1.0
docutils==0.14
Sphinx==1.7.0
sphinx_rtd_theme==0.2.5b1
Pygments==2.2.0
mkdocs==0.14.0
django==1.9.12
six==1.10.0
# latest compatible version with our code
# https://github.com/rtfd/readthedocs.org/pull/2916#discussion_r172991757
mkdocs==0.15.0
django==1.9.13
six==1.11.0
future==0.16.0
readthedocs-build<2.1
# django-tastypie 0.13.x and 0.14.0 are not compatible with our code
django-tastypie==0.13.0
django-haystack==2.6.0
celery-haystack==0.10
django-guardian==1.4.6
django-extensions==1.7.4
djangorestframework==3.5.4
django-vanilla-views==1.0.4
jsonfield==1.0.3
requests==2.9.1
django-haystack==2.7.0
celery-haystack==0.10
django-guardian==1.4.9
django-extensions==2.0.0
# djangorestframework 3.7.x drops support for django 1.9.x
djangorestframework==3.6.4
django-vanilla-views==1.0.4
jsonfield==2.0.2
requests==2.18.4
slumber==0.7.1
lxml==3.3.5
lxml==4.1.1
defusedxml==0.5.0
# Basic tools
redis==2.10.6
celery==4.1.0
# django-allauth 0.33.0 dropped support for Django 1.9
# https://django-allauth.readthedocs.io/en/latest/release-notes.html#backwards-incompatible-changes
django-allauth==0.32.0
dnspython==1.15.0
# VCS
httplib2==0.7.7
httplib2==0.10.3
# Search
elasticsearch==1.5.0
pyelasticsearch==0.7.1
pyquery==1.2.2
pyquery==1.4.0
# Utils
django-gravatar2==1.4.0
pytz==2013b
beautifulsoup4==4.1.3
django-gravatar2==1.4.2
pytz==2018.3
beautifulsoup4==4.6.0
Unipath==1.1
django-kombu==0.9.4
mimeparse==0.1.3
mock==1.0.1
mock==2.0.0
# stripe 1.20.2 is the latest compatible with our code base (otherwise
# gold/tests/test_forms.py fails)
stripe==1.20.2
django-formtools==1.0
django-dynamic-fixture==1.8.5
django-formtools==2.1
django-dynamic-fixture==2.0.0
docker-py==1.3.1
django-textclassifier==1.0
django-annoying==0.10.1
django-messages-extends==0.5
django-annoying==0.10.4
django-messages-extends==0.6.0
djangorestframework-jsonp==1.0.2
django-taggit==0.22.2
dj-pagination==2.3.2
# Docs
sphinxcontrib-httpdomain==1.4.0
sphinxcontrib-httpdomain==1.6.0
# commonmark 0.5.5 is the latest version compatible with our docs, the
# newer ones make `tox -e docs` to fail
commonmark==0.5.5
recommonmark==0.4.0
# Version comparison stuff
@ -69,4 +90,4 @@ packaging==16.8
# Commenting stuff
django-cors-middleware==1.3.1
nilsimsa==0.3.7
nilsimsa==0.3.8