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 to Django 3.2 #357

Merged
merged 21 commits into from
Jan 30, 2024
Merged

Upgrade to Django 3.2 #357

merged 21 commits into from
Jan 30, 2024

Conversation

Viicos
Copy link
Contributor

@Viicos Viicos commented Jan 17, 2024

This PR upgrades the project to 3.2, but it does not:

  • try to upgrade every dependency (e.g. notifications common) this will be tackled in another PR
  • fix some warnings appearing in Django 3.2. Tackled in another PR as well.

This PR is meant to be reviewed one commit at a time

Supersedes #343, #341

pep8 is unused, isort now has profiles
These do not require any changes
CI still needs to be updated to actually enforce it
Removed django-sniplates
Removed django-hijack, code was updated to reflect this
pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format  $(find . -name '*.py')
This removes the new deprecation warnings
Some code was update to also remove some warnings, e.g. the
new JSONField, or some deprecated stuff from DRF
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (7c1e2b3) 94.81% compared to head (f141e7a) 94.89%.

Files Patch % Lines
src/objects/utils/templatetags/utils.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   94.81%   94.89%   +0.08%     
==========================================
  Files         133      133              
  Lines        4568     4622      +54     
==========================================
+ Hits         4331     4386      +55     
+ Misses        237      236       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Run pyupgrade:
pyupgrade --py39-plus --keep-runtime-typing --keep-percent-format  $(find . -name '*.py')
This allows newer versions of pip to be used
Next commit will update to v7, using the new resolver
Also update djchoices to latest to be able to use the migration tool
djchoices will be dropped in the next commit
Run pyupgrade again
@Viicos Viicos force-pushed the upgrade branch 6 times, most recently from 73c3d06 to c0fd0eb Compare January 18, 2024 15:44
Use node 18
Update styling from the default template
Update tooling from the default template
@Viicos Viicos force-pushed the upgrade branch 3 times, most recently from 8f87b3e to a5158f1 Compare January 19, 2024 09:21
For some reason uwsgi doens't ship with wheels
Copy link
Collaborator

@annashamray annashamray left a comment

Choose a reason for hiding this comment

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

  1. The landing page looks like this now for me
    image
    I suppose it's because landing page styles were deleted without replacement
    Could you take a look?

  2. Also could you please create a list of the changes in this PR since there are a lot of them like this:

  • update python from 3.7 to 3.10
  • update debian in docker from 10 to 12
  • remove libs...

It will help to summarize all changes and what's left to do

src/objects/accounts/admin.py Outdated Show resolved Hide resolved
requirements/base.txt Show resolved Hide resolved
requirements/base.txt Show resolved Hide resolved
src/objects/conf/base.py Show resolved Hide resolved
src/objects/sass/components/_all.scss Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
@Viicos
Copy link
Contributor Author

Viicos commented Jan 30, 2024

Left to do:

  • Figure out how to switch from vng-api-common
  • Update dependencies to be compatible with 4.2
  • Wait for the new 2fa library to be able to upgrade to 4.2

@@ -0,0 +1,33 @@
h1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why has this folder been renamed? Now I can't see if there are changes in files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was done in the default project at some point. I know next to nothing about scss/saas, so wanted to be as close to what was done as gulp was removed and maybe did not support the "old" folder name.

Copy link
Collaborator

@annashamray annashamray left a comment

Choose a reason for hiding this comment

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

👍

@annashamray annashamray merged commit 1e838e2 into master Jan 30, 2024
5 checks passed
@annashamray annashamray deleted the upgrade branch January 30, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants