-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Upgrade Django because #3297 #3305
Conversation
not sure about hos errers - i cant figure out what this has to do with my changes :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the overall is OK. Just some comments:
- I'm not sure about the Pipfile since I never used it, but seems to be something good to have
- I think at RTD are kind of "conservative" in some way, regarding upgrading all the packages at once, so I'm not sure that something that they want (Upgrade all packages using
pur
tool #2916) - There are some test that do not pass with your changes (maybe it's because of the upgrades), can you fix them?
Finally, can you take a look at my comments?
readthedocs/settings/base.py
Outdated
TASTYPIE_FULL_DEBUG = True | ||
|
||
# Domains and URLs | ||
PRODUCTION_DOMAIN = 'readthedocs.org' | ||
PUBLIC_DOMAIN = None | ||
USE_SUBDOMAIN = False | ||
USE_SUBDOMAIN = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you changed this default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakulukia Any feedback on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldnt have made it into the PR - its already reverted and github anlready maks this as outdated for me
readthedocs/settings/base.py
Outdated
@@ -274,7 +278,7 @@ def INSTALLED_APPS(self): # noqa | |||
|
|||
# RTD Settings | |||
REPO_LOCK_SECONDS = 30 | |||
ALLOW_PRIVATE_REPOS = False | |||
ALLOW_PRIVATE_REPOS = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you changed this default?
readthedocs/settings/base.py
Outdated
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [os.path.join(SITE_ROOT, 'readthedocs', 'templates')], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use TEMPLATE_ROOT
here.
Hi @humitos i didnt mean to change the config defaults .. had to change them for my installation, but reverted that in the commits. |
I also pushed a version of pip.txt with minimal changes .. lets see how Travis likes that .. btw, the errors happened in the pagination package, but now there is a GDAL error .. i dont know how to influence Travis in being able to install it .. looks weird! @humitos i dont see how my changes would influence the installation of gdal? |
I think it's something used internally by RTD, it's used in a couple of places. That's why I said that it should be used in the
Not really :( |
I misunderstood that part .. its replaced now |
I still dont know why it wouldnt build - somebody with more knowledge about the travis setup should have a look |
The new Django version might be responsible for that GDAL error .. but is RTD actually using GDAL? |
That didnt work out that well .. |
Let's keep #3297 open since that's not fixed until we get something merged |
#3297 is blocking me on #3341. So let's get something squared away. Re: Pipfile: I was thinking about a Pipfile, too. But that should happen in a separate PR. It's best to keep this PR conservative as possible. You'll notice a lot of future tweaking opportunities, so it's a good chance to write them down and tackle them in issues. At this point it needs a rebase again master. Are you open to sharing your repo and teaming up on it @kakulukia ? |
@tony you are welcome to join! |
Well @tony as i stated before "I still dont know why it wouldnt build - somebody with more knowledge about the travis setup should have a look" |
For some reason my change at 7cc235a isn't showing up on Travis. |
I'm concerned about tweaks introduced outside the scope of fixing #3297. Most of them seem ironed out though. The official solution appears to be Django 1.11 (https://code.djangoproject.com/ticket/28441). For some backstory: Here's the change that was done to fix #3297 itself in 1.11: django/django@a49764d. |
@kakulukia I created two branches in your repo: django-1.11 (where I'm going to be doing squashing / deleting / rebasing) and django 1.11-backup. |
@kakulukia Close this PR, make a new PR with this: master...kakulukia:django-1.11 That way you're operating off a branch name that doesn't clobber with the origin (main RTD's) master branch. |
just for curiosity: please explain why the branch name is important? |
It's best practice to pick a branch name if you intend on merging another branch on top of it. In this specific case, there are conflicts and a need to rebase rtfd's master branch. But this PR uses the master branch. That adds a lot of ambiguity. I am switching between branches with 4 different remotes (rtfd, develtech, tony, and yours). Each have "master" branch in a different spot.
Nope. The only way to merge from a different branch is a new PR. Technically, I could close this and make a new PR from your repo. If I did this, you would still get credit in the git history (you would even if I forked your branch and PR'd from my own repo). This is because your commits are still there. However, I also want you to keep the credit for opening the PR, too. That's why I asked you to do it. The branches: django-1.11 is where I want to do work. I'm going to be doing rebasing (and probably resolving a lot of conflicts) and rebasing out (permanently removing) changes that were edited out in history. django-1.11-backup is a pristine backup of this PR. |
please go ahead and do whats neccessary to fix the problem - sweet that you care about my credits, but if something gets missing i will still be able to sleep at nights, tho :) |
Next, going to squash. Backing up branch at https://github.com/kakulukia/readthedocs.org/blob/django-1.11-beforesquash/.travis.yml |
OK, rebased against master (9e7bcb7), removed Pipfile stuff, and squashed. Also, ff7acc8 seemed to fix the GDAL package issue. So there are some remaining bugs cropping up:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [TEMPLATE_ROOT], | ||
'OPTIONS': { | ||
'debug': True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 'debug': DEBUG
,
Judging by the breaking of API endpoints, there is more at play between this and pagination.
There is no more zyga/django-pagination#41 (comment) Anndd, the project is no longer maintained. So we're blocked by that. |
This is becoming a lot more complicated. paginationI could fork and fix django-pagination. But I can't maintain it. I'm also not quite sure why django's pagination isn't being used. tastypie error
may be fixed by upgrading to django-tastypie==0.14.0 |
This requires too much work for me at the moment. I'd probably end up doing my own PR because it's more than switching out a few packages/updating functions, there are dependencies down the line that need phasing out. Too much on my plate ATM. If someone else wants to take this up, reply here and make a fresh PR |
@tony do you know why there is a need for custom rather than django builtin pagination? maybe it can very well be removed from the dependencies because its just a relic from old times? |
@kakulukia And I should have asked you first, if you want to finish this PR. Or let someone fork it / do their own.
This is a big codebase. Figuring out whether a third party pagination plugin was cargo-culted in or is now redundant would take time. I have more urgent thing pressing on me ATM (like paying bills 😄) |
well, as far as i tested my latest commit i didnt have a problem with the pagination module. Could you add a help wanted label? |
I think is better to follow the Django recommendations for upgrading to a new version https://docs.djangoproject.com/en/2.0/howto/upgrade-version/ Upgrade from each version till the current one (2.0) instead of upgrading to 2.0 in one step. |
Closing this in favor of #4319, which do the upgrade in a more granular way (first to 1.10), thanks to all people here, sorry that this wasn't merged, maybe you can help to review the other PR, or updating to 2.0 later. |
Fixed incompatibility with geos 3.6.3 while upgrading Django to its latest version.
Aditionally upgradead all other libs to the latest version except elasticsearch. Refactored render_to_request() to render()