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

TIED-60: Upgrade Python to 3.9, upgrade package versions, add DEFAULT_AUTO_FIELD #341

Merged
merged 7 commits into from
Mar 9, 2023

Conversation

danipran
Copy link
Contributor

@danipran danipran commented Mar 9, 2023

Description

  • Upgrade Python to 3.9.
  • Upgrade all the packages as high as possible.
  • Add a missing DEFAULT_AUTO_FIELD in Django settings and related migrations.

Related Issue(s)

TIED-60

Motivation and Context

Python 3.7's support ends in June 2023, so we want to upgrade it to a fresher version. Some of the packages have already dropped support for 3.7 as well, so this enables us to update them as well.

How Has This Been Tested?

Locally, running Docker container and the unit tests w/ warnings enabled:

PYTHONWARNINGS=always docker compose exec django pytest --capture=no

Additional Notes

The original plan was to upgrade Django to 4.1 as well, but it turns out that django-helusers doesn't support Django >=4, so postponing that...

@danipran danipran force-pushed the TIED-60-upgrade-python-39-and-packages branch from a97c3fb to f8f43d6 Compare March 9, 2023 11:54
@codecov-commenter
Copy link

Codecov Report

Merging #341 (f8f43d6) into develop (30492fb) will increase coverage by 0.27%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #341      +/-   ##
===========================================
+ Coverage    93.61%   93.89%   +0.27%     
===========================================
  Files          147      149       +2     
  Lines         5231     5467     +236     
===========================================
+ Hits          4897     5133     +236     
  Misses         334      334              
Impacted Files Coverage Δ
helerm/settings.py 85.55% <100.00%> (+0.16%) ⬆️
metarecord/migrations/0003_use_bigautofield_id.py 100.00% <100.00%> (ø)
metarecord/tests/test_api.py 99.57% <100.00%> (+0.03%) ⬆️
users/migrations/0006_alter_user_id.py 100.00% <100.00%> (ø)
metarecord/utils.py 100.00% <0.00%> (ø)
metarecord/tests/conftest.py 100.00% <0.00%> (ø)
metarecord/tests/test_user.py 100.00% <0.00%> (ø)
metarecord/views/attribute.py 100.00% <0.00%> (ø)
metarecord/tests/test_admin.py 100.00% <0.00%> (ø)
metarecord/tests/test_utils.py 100.00% <0.00%> (ø)
... and 21 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor Author

@danipran danipran left a comment

Choose a reason for hiding this comment

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

README needs to be updated

@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@voneiden
Copy link
Contributor

voneiden commented Mar 9, 2023

New deprecation warnings for some dependencies @ https://github.com/City-of-Helsinki/helerm/actions/runs/4374218764/jobs/7653368407#step:8:207

future is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559

Wanna deal with these now or later?

Copy link
Contributor

@voneiden voneiden left a comment

Choose a reason for hiding this comment

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

Changed files LGTM

@danipran
Copy link
Contributor Author

danipran commented Mar 9, 2023

New deprecation warnings for some dependencies @ https://github.com/City-of-Helsinki/helerm/actions/runs/4374218764/jobs/7653368407#step:8:207

future is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559

Wanna deal with these now or later?

Might as well take a closer look at this, seems like this is something that's coming sooner than later 😅 However, this seems to be out of this PR's scope for the time being, so not resolving this problem in this PR.

@danipran danipran merged commit ccec13c into develop Mar 9, 2023
@danipran danipran deleted the TIED-60-upgrade-python-39-and-packages branch March 9, 2023 12:39
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