Skip to content

Make restapi URL additions conditional #4609

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

Merged
merged 3 commits into from
Sep 6, 2018
Merged

Conversation

agjohnson
Copy link
Contributor

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.

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 a team September 6, 2018 01:21
@agjohnson agjohnson added the Bug A bug label Sep 6, 2018
@agjohnson agjohnson added this to the 2.7 milestone Sep 6, 2018
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@agjohnson agjohnson deleted the agj/conditional-urls-ext branch September 6, 2018 14:27
agjohnson added a commit that referenced this pull request Sep 6, 2018
* 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
Labels
Bug A bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants