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

Update to Django 5 #931

Merged
merged 3 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

- name: Install poetry
run: pipx install poetry
- name: Setup Python 3.9
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
cache: poetry
cache-dependency-path: backend/poetry.lock
- name: Install backend Python dependencies
Expand Down Expand Up @@ -127,10 +127,10 @@ jobs:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup Python 3.9
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
cache: poetry
cache-dependency-path: backend/poetry.lock
- name: Install Poetry
Expand Down Expand Up @@ -207,10 +207,10 @@ jobs:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup Python 3.9
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
cache: poetry
cache-dependency-path: backend/poetry.lock
- run: |-
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"typescript.enablePromptUseWorkspaceTsdk": true,
"mypy-type-checker.args": [
"--config-file=backend/mypy.ini"
]
],
"editor.formatOnSave": true
}
4 changes: 2 additions & 2 deletions backend/coreapp/models/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def login(request: Request, oauth_code: str) -> "GitHubUser":
response = requests.post(
"https://github.com/login/oauth/access_token",
json={
"client_id": settings.GITHUB_CLIENT_ID,
"client_secret": settings.GITHUB_CLIENT_SECRET,
"client_id": settings.GITHUB_CLIENT_ID, # type: ignore
"client_secret": settings.GITHUB_CLIENT_SECRET, # type: ignore
"code": oauth_code,
},
headers={"Accept": "application/json"},
Expand Down
2 changes: 1 addition & 1 deletion backend/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[mypy]
# The mypy configurations: https://mypy.readthedocs.io/en/latest/config_file.html
python_version = 3.9
python_version = 3.10

check_untyped_defs = True
disallow_any_generics = True
Expand Down
416 changes: 214 additions & 202 deletions backend/poetry.lock

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ authors = ["Decomp.me team"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.9"
django-cors-headers = "^3.14.0"
python = "^3.10"
django-cors-headers = "^4.3.1"
django-environ = "^0.10.0"
django-filter = "^23.2"
django-filter = "^23.5"
djangorestframework = "^3.14.0"
psycopg2-binary = "^2.9.6"
psycopg2-binary = "^2.9.9"
responses = "0.18.0"
jwt = "^1.3.1"
PyGithub = "^1.58.1"
PyGithub = "^2.1.1"
drf-extensions = "^0.7.1"
tqdm = "^4.65.0"
tqdm = "^4.66.1"
tzdata = "^2023.3"
Pillow = "^9.5.0"
Pillow = "^10.1.0"
html-json-forms = "^1.1.1"
django-resized = "^1.0.2"
django-cleanup = "^7.0.0"
django-cleanup = "^8.0.0"
m2c = {git="https://github.com/matt-kempster/m2c.git"}
asm-differ = {git="https://github.com/simonlindholm/asm-differ.git"}
sentry-sdk = "^1.21.1"
sentry-sdk = "^1.39.1"
django-session-timeout = "^0.1.0"
django = "^4.2"
requests = "^2.29.0"
django = "^5.0"
requests = "^2.31.0"

[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
usort = "^1.0.6"
django-stubs-ext = "^4.2.0"
django-stubs = "^4.2.0"
djangorestframework-stubs = "^3.14.0"
types-requests = "^2.29.0.0"
black = "^23.12.0"
usort = "^1.0.7"
django-stubs-ext = "^4.2.7"
django-stubs = "^4.2.7"
djangorestframework-stubs = "^3.14.5"
types-requests = "^2.31.0.10"
parameterized = "^0.9.0"
mypy = "^1.2.0"
mypy = "^1.7.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ backend/
See [DOCKER.md](DOCKER.md) for instructions on how to run the project in a Docker container. Otherwise, continue reading this guide.

Dependencies:
- Python >=3.9
- Python >=3.10
- Node.js >=14
- [Yarn](https://yarnpkg.com/getting-started/install)
- [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer)
Expand Down