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

Make restapi URL additions conditional #4609

Merged
merged 3 commits into from Sep 6, 2018

Conversation

Projects
None yet
3 participants
@agjohnson
Contributor

agjohnson commented Sep 6, 2018

We already have logic that checks for readthedocsext import availability
when adding to INSTALLED_APPS, so checking here for import availability
isn't correct. For instance, on the readthedocsinc side, we remove
readthedocsext.donate from INSTALLED_APPS inherited from
settings.base, but urls.py would import the module, add the URLs (for
packages that aren't in INSTALLED_APPS anymore), and things broke.

Make restapi URL additions conditional
We already have logic that checks for readthedocsext import availability
when adding to INSTALLED_APPS, so checking here for import availability
isn't correct. For instance, on the readthedocsinc side, we remove
`readthedocsext.donate` from INSTALLED_APPS inherited from
settings.base, but urls.py would import the module, add the URLs (for
packages that aren't in INSTALLED_APPS anymore), and things broke.

@agjohnson agjohnson requested a review from rtfd/core Sep 6, 2018

@agjohnson agjohnson added the Bug label Sep 6, 2018

@agjohnson agjohnson added this to the 2.7 milestone Sep 6, 2018

agjohnson added some commits Sep 6, 2018

@humitos

humitos approved these changes Sep 6, 2018

Looks good.

Interesting that this has been here for a while and we didn't notice the errors.

@agjohnson agjohnson merged commit cbfc791 into master Sep 6, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@agjohnson agjohnson deleted the agj/conditional-urls-ext branch Sep 6, 2018

agjohnson added a commit that referenced this pull request Sep 6, 2018

Make restapi URL additions conditional (#4609)
* Make restapi URL additions conditional

We already have logic that checks for readthedocsext import availability
when adding to INSTALLED_APPS, so checking here for import availability
isn't correct. For instance, on the readthedocsinc side, we remove
`readthedocsext.donate` from INSTALLED_APPS inherited from
settings.base, but urls.py would import the module, add the URLs (for
packages that aren't in INSTALLED_APPS anymore), and things broke.

* Fix issues with pylint during strict prospector pass, autolint

* Fix issue with py27 and trailing comma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment