-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make updates for Python 3.12 & update various packages to their lates…
…t versions (#206) ## Ticket #205 ## Changes Make package updates to make Python 3.12 work without warnings ## Context for reviewers Package updates were done via `poetry add <package>@latest [--group dev]` (the group being included for dev dependencies). I did skim the changelogs for any of the libraries we updated, at least the major versions to see if there was anything signficantly breaking, but most of the packages are pretty minimal in changes (bug fixes, small feature updates). The package updates fall into a few categories: 1. Broken due to new version of Python (cffi was the main one) 2. Warnings through linting or pytest deprecation warnings - newer package versions had corrected the issue (SQLAlchemy, APIFlask, pytz, pytest, mypy) 3. Package only had a few minor updates, figured we might as well update (alembic, isort, flake8, Faker, factory-boy) The only package of note that I didn't update was Pydantic, which I'll do in a follow-up as I know it has several breaking changes. This also resolves a few Dependabot alerts for the gitpython, cryptography and urllib3 packages (package.lock has been updated to have the latest version for each of those past the required ones). ## Testing Running `make format lint test` both inside and outside of the Docker container to verify that there are no issues reported / pytest warnings given. Will verify that this builds as well in CI successfully when the PR is created / later merged. --------- Co-authored-by: nava-platform-bot <[email protected]>
- Loading branch information
1 parent
58610f4
commit 4252983
Showing
14 changed files
with
1,065 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.11 | ||
3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,37 +7,38 @@ authors = ["Nava Engineering <[email protected]>"] | |
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
SQLAlchemy = {extras = ["mypy"], version = "2.0"} | ||
alembic = "^1.8.1" | ||
SQLAlchemy = {version = "^2.0.21", extras = ["mypy"]} | ||
alembic = "^1.12.0" | ||
python-dotenv = "^0.20.0" | ||
pydantic = "^1.10.0" | ||
botocore = "^1.27.67" | ||
boto3 = "~1.24.67" | ||
botocore = "^1.31.62" | ||
boto3 = "^1.28.62" | ||
smart-open = "^6.1.0" | ||
pytz = "^2022.2.1" | ||
APIFlask = "^1.1.3" | ||
pytz = "^2023.3.post1" | ||
APIFlask = "^2.0.2" | ||
marshmallow-dataclass = {extras = ["enum", "union"], version = "^8.5.8"} | ||
marshmallow = "^3.18.0" | ||
marshmallow = "^3.20.1" | ||
gunicorn = "^21.2.0" | ||
psycopg = {extras = ["binary"], version = "^3.1.10"} | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
black = "^22.6.0" | ||
flake8 = "^5.0.4" | ||
flake8-bugbear = "^22.8.23" | ||
black = "^23.9.1" | ||
flake8 = "^6.1.0" | ||
flake8-bugbear = "^23.9.16" | ||
flake8-alfred = "^1.1.1" | ||
isort = "^5.10.1" | ||
mypy = "^0.971" | ||
isort = "^5.12.0" | ||
mypy = "^1.5.1" | ||
moto = {extras = ["s3"], version = "^4.0.2"} | ||
types-pytz = "^2022.2.1" | ||
coverage = "^6.4.4" | ||
Faker = "^14.2.0" | ||
factory-boy = "^3.2.1" | ||
bandit = "^1.7.4" | ||
pytest = "^6.0.0" | ||
types-pytz = "^2023.3.1.1" | ||
coverage = "^7.3.2" | ||
Faker = "^19.8.0" | ||
factory-boy = "^3.3.0" | ||
bandit = "^1.7.5" | ||
pytest = "^7.4.2" | ||
pytest-watch = "^4.2.0" | ||
pytest-lazy-fixture = "^0.6.3" | ||
types-pyyaml = "^6.0.12.11" | ||
setuptools = "^68.2.2" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
|
@@ -81,6 +82,8 @@ warn_redundant_casts = true | |
warn_unreachable = true | ||
warn_unused_ignores = true | ||
|
||
plugins = ["pydantic.mypy"] | ||
|
||
[tool.bandit] | ||
# Ignore audit logging test file since test audit logging requires a lot of operations that trigger bandit warnings | ||
exclude_dirs = ["./tests/src/logging/test_audit.py"] | ||
|
@@ -98,9 +101,7 @@ disallow_untyped_defs = false | |
# When a library has addressed its deprecation issues and we've updated the | ||
# library, we can remove the ignore filter for that library. | ||
filterwarnings = [ | ||
"ignore::DeprecationWarning:botocore.*", | ||
"ignore::DeprecationWarning:apispec.*", | ||
"ignore::DeprecationWarning:certifi.*"] # pytest-watch errors if the closing bracket is on it's own line | ||
"ignore::DeprecationWarning:botocore.*"] # pytest-watch errors if the closing bracket is on it's own line | ||
|
||
markers = [ | ||
"audit: mark a test as a security audit log test, to be run isolated from other tests"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters