junction icon indicating copy to clipboard operation
junction copied to clipboard

Fix all the deprecated-warnings and upgrade django to 1.11

Open sks444 opened this issue 5 years ago • 24 comments

Toward https://github.com/pythonindia/junction/issues/611

Note: This PR has changes incompatible with Python 2.7 and is a part of the task involving Django 2.2 upgrade

  • Upgrading django-pagedown to 1.0.6 because the latest version doesn't support Django 1.11, will be upgrading to latest while moving to Django 2.0

  • Fix AttributeError: type object 'RadioSelect' has no attribute 'renderer': 1

  • Use django-markdown-app as django_markdown is not maintained.

  • Upgrade djangorestframework to latest version which removes the support of filters, so update django-filters to latest and made changes according to the requirements: 1

  • Upgrade celery to latest version

  • Droping use of django-uuidfield as Django has it's own UUIDfield: need to figure out a way to handle the migration

  • Upgrade django-bootstrap3==11.0.0, needs to upgraded to latest while moving to Django 2

  • core.context_processors is moved to template.context_processors

  • Use user.is_authenticated as property

After these changes, only deprecated warnings remaining is related to Django which I think will vanish when we finally move to Django 2.0

sks444 avatar Apr 05 '20 10:04 sks444

Coverage Status

Coverage increased (+0.03%) to 67.292% when pulling e70b6b2c4e98b842da18ad6ccefb3cab8f48ad54 on sks444:fix-all-deprecated-warnings into 49af450e177904c5edeced57154425b2a5e40040 on pythonindia:master.

coveralls avatar Apr 05 '20 10:04 coveralls

@sks444 If you could make atomic commits, that'd make reviewing your PR (as well as iterating on them later) much easier! ^>^

pradyunsg avatar Apr 05 '20 13:04 pradyunsg

@sks444 If you could make atomic commits, that'd make reviewing your PR (as well as iterating on them later) much easier! ^>^

Yes, thank you for the suggestion @pradyunsg , I will try to do atomic commits. Actually in this case, when I upgrade django, it starts breaking few other things, so all those fixes should go in one commit right? Or should I have a separate commit for each of the fix? But they are dependent on only one thing, i.e. upgrading django.

sks444 avatar Apr 08 '20 19:04 sks444

I think a separate commit per fix would be better.

pradyunsg avatar Apr 08 '20 23:04 pradyunsg

I think this is ready for review now. :)

sks444 avatar Apr 09 '20 22:04 sks444

@sks444 Why are new migrations created for conferences and proposals ? There is no change in conference or proposal model.

ananyo2012 avatar Apr 10 '20 07:04 ananyo2012

Also can you rebase your changes on the latest master and solve the linting errors.

ananyo2012 avatar Apr 10 '20 07:04 ananyo2012

@sks444 Why are new migrations created for conferences and proposals ? There is no change in conference or proposal model.

@ananyo2012, That is coming from the simple_history package upgrade as we are using simple_history models for conference and proposal models.

I moved the migration files to simple_history package upgrade commit so that it would be reasonable.

sks444 avatar Apr 10 '20 14:04 sks444

So everything seems to be running perfectly, tests are passing and I am interacting with the UI and checking if these changes break something. But as I don't have much experience with the project I might miss few features. @pradyunsg, @ananyo2012, would be great if you could help me with the same. :)

sks444 avatar Apr 10 '20 14:04 sks444

Do your thing Travis CI.

pradyunsg avatar Apr 15 '20 11:04 pradyunsg

@sks444 Can you rebase your changes over the latest master ?

ananyo2012 avatar May 02 '20 15:05 ananyo2012

Rebased @ananyo2012

sks444 avatar May 06 '20 07:05 sks444

Note: Putting a hold on the merge until the upgrade compatibility is tested

palnabarun avatar May 06 '20 08:05 palnabarun

@sks444 The CI is failing due to conflicting migrations. Can you please check?

palnabarun avatar May 06 '20 08:05 palnabarun

Resolved the migration issue @palnabarun

sks444 avatar May 07 '20 06:05 sks444

* Upgrade djangorestframework to latest version

This isn't supported on Python 2.

@pythonindia/pycon-india-2020-junction Do we care about Python 2 support? If not, let's drop it?

pradyunsg avatar May 07 '20 10:05 pradyunsg

@sks444 Thank you for resolving that.

@pradyunsg We do care about Python 2 at the moment.

palnabarun avatar May 07 '20 11:05 palnabarun

@sks444 need your input in #687

onlinejudge95 avatar Jun 06 '20 13:06 onlinejudge95

@onlinejudge95 we can not move directly to Django 2 without merging this pr as it would break a lot of things.

I have made all the changes here which are required to upgrade to Django 1.11. Although I have tested this on my system, it would very helpful if you could also verify this on yours. So that we could go ahead and merge this and then we can try upgrading to Django 2 and see what breaks.

sks444 avatar Jun 06 '20 16:06 sks444

@sks444 on it

Even I was bumping the versions incrementally it failed for 1.10 for me due to obsolete dependencies.

onlinejudge95 avatar Jun 06 '20 16:06 onlinejudge95

@sks444 -- can you please change the target of your changes to django-2.2 branch? We are starting to merge Django upgrade related changes to that branch.

palnabarun avatar Jun 06 '20 18:06 palnabarun

Done @palnabarun

sks444 avatar Jun 07 '20 07:06 sks444

@sks444 @palnabarun Django REST framework has dropped support for Python2.7 link. I doubt we will be able to pass the installation steps in Travis build due to this.

Proposing to drop support for Python2.7, what do you say guys?

onlinejudge95 avatar Jun 09 '20 08:06 onlinejudge95

We will be dropping Python 2.7 support and remove it from before this is merged

On Tue, 9 Jun, 2020, 2:15 PM onlinejudge95, [email protected] wrote:

@sks444 https://github.com/sks444 @palnabarun https://github.com/palnabarun Django REST framework has dropped support for Python2.7 link https://www.django-rest-framework.org/#requirements. I doubt we will be able to pass the installation steps in Travis build due to this.

Proposing to drop support for Python2.7, what do you say guys?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pythonindia/junction/pull/664#issuecomment-641131464, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQAER3KYLKZQMLQXUN5OSDRVXZBDANCNFSM4MASPRZQ .

ananyo2012 avatar Jun 10 '20 03:06 ananyo2012