Skip to content
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 project to Django 3.2 LTS #848

Closed
brylie opened this issue Apr 20, 2021 · 15 comments
Closed

Upgrade project to Django 3.2 LTS #848

brylie opened this issue Apr 20, 2021 · 15 comments
Assignees
Labels
code quality dependencies Pull requests that update a dependency file enhancement help wanted mentoring Issues that need active mentoring.
Milestone

Comments

@brylie
Copy link
Member

brylie commented Apr 20, 2021

The latest LTS release of Django is 3.2. Upgrade CiviWiki to Django 3.2 and follow settings conventions set out in the Django 3.2 starter project.

https://docs.djangoproject.com/en/3.2/releases/3.2/

@brylie brylie added this to the 2.0 milestone Apr 20, 2021
This was referenced Apr 20, 2021
@brylie
Copy link
Member Author

brylie commented May 26, 2021

@North15, would you be interested in taking this issue?

@EkanshBhatnagar
Copy link

Hey I would be interested in taking this issue .

@EkanshBhatnagar
Copy link

Could you guide me to the details.

@brylie
Copy link
Member Author

brylie commented May 26, 2021

@EkanshBhatnagar thank you for your interest. @North15 has already agreed to take this task, so we should give them the opportunity first.

Would you be interested in a different task from our 2.0 milestone?

@North15
Copy link
Contributor

North15 commented May 26, 2021

@brylie I'll start working on this in the afternoon, I'll let you know if I run into any issues.

@North15
Copy link
Contributor

North15 commented May 26, 2021

@brylie I ran sudo docker-compose up and I received this error at the end.
ERROR: Service 'backend' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends git gcc vim build-essential unzip xvfb libxi6 libgconf-2-4 default-jdk supervisor && apt-get clean && /' returned a non-zero code: 126

@North15
Copy link
Contributor

North15 commented May 26, 2021

I was able to run sudo docker-compose up and to have it complete successfully with a couple of changes in the Dockerfile. I'm working on the upgrade now.

@North15
Copy link
Contributor

North15 commented May 26, 2021

So, from what I can tell when I installed the latest version of Django, and a few errors were thrown.
norser@norser-OptiPlex-3010:~/Documents/GitHub/OpenCiviWiki$ python3 -m pip install -U Django
ERROR: daphne 1.4.2 has requirement asgiref~=1.1, but you'll have asgiref 3.3.4 which is incompatible. ERROR: channels 1.1.8 has requirement asgiref~=1.1, but you'll have asgiref 3.3.4 which is incompatible. ERROR: asgi-redis 1.4.3 has requirement asgiref~=1.1.2, but you'll have asgiref 3.3.4 which is incompatible.

There were a few other dependencies that needed to be upgraded: daphne, channels, agis-redis, and asgiref(this one gets updated when Django is updated). I updated these as well to the latest version, but when I do that there is a cycle that starts to occur.

asgis-redis requires asgiref v.1.1.2

and all the other dependencies require asgiref v.3.2.10 at a minimum

norser@norser-OptiPlex-3010:~/Documents/GitHub/OpenCiviWiki$ python3 -m pip install -U asgiref
ERROR: asgi-redis 1.4.3 has requirement asgiref~=1.1.2, but you'll have asgiref 3.3.4 which is incompatible.

norser@norser-OptiPlex-3010:~/Documents/GitHub/OpenCiviWiki$ python3 -m pip install -U asgi-redis
ERROR: django 3.2.3 has requirement asgiref<4,>=3.3.2, but you'll have asgiref 1.1.2 which is incompatible. ERROR: daphne 3.0.2 has requirement asgiref<4,>=3.2.10, but you'll have asgiref 1.1.2 which is incompatible. ERROR: channels 3.0.3 has requirement asgiref<4,>=3.2.10, but you'll have asgiref 1.1.2 which is incompatible.

Any thoughts on how to handle this?

Thanks

@EkanshBhatnagar
Copy link

@brylie I want to contribute could you guide to a issue that it a good introduction/first issue for me to start with.

@brylie
Copy link
Member Author

brylie commented May 27, 2021

@North15 be careful when using sudo. Is there a particular reason for using sudo with docker-compose up?

Also, make sure you are using the latest code from the develop branch. Some of the packages you mention have been removed from the Dockerfile and requirements.txt in the past couple of days.

@brylie
Copy link
Member Author

brylie commented May 27, 2021

@EkanshBhatnagar how about you work on removing our Google Maps code in issue #7? We aren't keeping user locations anymore so we just need to clean up all code related to Google Maps. Let's continue the conversation in issue #7

@a7madnassar
Copy link
Contributor

I can work on this issue. If needed.

@brylie
Copy link
Member Author

brylie commented Jun 6, 2021

@a7madnassar sure, thanks! Please make sure to use the latest development branch, since we have removed some dependencies (like channels).

@a7madnassar
Copy link
Contributor

I'm already running the project on Django 3.2.4 right now. Just assign me this issue and I will submit my pull request. Thanks.

@brylie brylie added code quality dependencies Pull requests that update a dependency file enhancement help wanted mentoring Issues that need active mentoring. labels Jun 6, 2021
This was referenced Jun 13, 2021
@pscheid2
Copy link
Collaborator

pscheid2 commented Jun 17, 2021

Fixed by: #933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality dependencies Pull requests that update a dependency file enhancement help wanted mentoring Issues that need active mentoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants