From 391f9d585d51538a5a5de135eef4d20c4aaf3c55 Mon Sep 17 00:00:00 2001 From: ttys0dev <126845556+ttys0dev@users.noreply.github.com> Date: Tue, 8 Oct 2024 11:36:24 -0600 Subject: [PATCH 1/2] Update python to version 3.13 --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/lint.yml | 2 +- .../0012_alter_webhookevent_status_code.py | 18 ++++++++++++++++++ .../0012_alter_webhookevent_status_code.sql | 6 ++++++ docker/django/Dockerfile | 2 +- poetry.lock | 14 +++++++++++--- pyproject.toml | 2 +- 7 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 cl/api/migrations/0012_alter_webhookevent_status_code.py create mode 100644 cl/api/migrations/0012_alter_webhookevent_status_code.sql diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2203ff239c..2a56ab5a6f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,7 +24,7 @@ jobs: # `github/codeql-action/init`) - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 12299982b0..c4f53112e7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-python@v5 with: # Once codebase is updated, this can easily be changed to any specific version. - python-version: "3.12" + python-version: "3.13" - name: Install Poetry uses: snok/install-poetry@v1 diff --git a/cl/api/migrations/0012_alter_webhookevent_status_code.py b/cl/api/migrations/0012_alter_webhookevent_status_code.py new file mode 100644 index 0000000000..657357ee25 --- /dev/null +++ b/cl/api/migrations/0012_alter_webhookevent_status_code.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.2 on 2024-10-15 00:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0011_pghistory_v3_4_0_trigger_update'), + ] + + operations = [ + migrations.AlterField( + model_name='webhookevent', + name='status_code', + field=models.SmallIntegerField(blank=True, choices=[(100, 'Continue'), (101, 'Switching Protocols'), (102, 'Processing'), (103, 'Early Hints'), (200, 'Ok'), (201, 'Created'), (202, 'Accepted'), (203, 'Non Authoritative Information'), (204, 'No Content'), (205, 'Reset Content'), (206, 'Partial Content'), (207, 'Multi Status'), (208, 'Already Reported'), (226, 'Im Used'), (300, 'Multiple Choices'), (301, 'Moved Permanently'), (302, 'Found'), (303, 'See Other'), (304, 'Not Modified'), (305, 'Use Proxy'), (307, 'Temporary Redirect'), (308, 'Permanent Redirect'), (400, 'Bad Request'), (401, 'Unauthorized'), (402, 'Payment Required'), (403, 'Forbidden'), (404, 'Not Found'), (405, 'Method Not Allowed'), (406, 'Not Acceptable'), (407, 'Proxy Authentication Required'), (408, 'Request Timeout'), (409, 'Conflict'), (410, 'Gone'), (411, 'Length Required'), (412, 'Precondition Failed'), (413, 'Content Too Large'), (414, 'Uri Too Long'), (415, 'Unsupported Media Type'), (416, 'Range Not Satisfiable'), (417, 'Expectation Failed'), (418, 'Im A Teapot'), (421, 'Misdirected Request'), (422, 'Unprocessable Content'), (423, 'Locked'), (424, 'Failed Dependency'), (425, 'Too Early'), (426, 'Upgrade Required'), (428, 'Precondition Required'), (429, 'Too Many Requests'), (431, 'Request Header Fields Too Large'), (451, 'Unavailable For Legal Reasons'), (500, 'Internal Server Error'), (501, 'Not Implemented'), (502, 'Bad Gateway'), (503, 'Service Unavailable'), (504, 'Gateway Timeout'), (505, 'Http Version Not Supported'), (506, 'Variant Also Negotiates'), (507, 'Insufficient Storage'), (508, 'Loop Detected'), (510, 'Not Extended'), (511, 'Network Authentication Required')], help_text='The HTTP status code received from the POST request.', null=True), + ), + ] diff --git a/cl/api/migrations/0012_alter_webhookevent_status_code.sql b/cl/api/migrations/0012_alter_webhookevent_status_code.sql new file mode 100644 index 0000000000..78dfe2349c --- /dev/null +++ b/cl/api/migrations/0012_alter_webhookevent_status_code.sql @@ -0,0 +1,6 @@ +BEGIN; +-- +-- Alter field status_code on webhookevent +-- +-- (no-op) +COMMIT; diff --git a/docker/django/Dockerfile b/docker/django/Dockerfile index 9cb17a68b7..5025150c5f 100644 --- a/docker/django/Dockerfile +++ b/docker/django/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-slim as build-base +FROM python:3.13-slim as build-base RUN apt-get update --option "Acquire::Retries=3" --quiet=2 && \ apt-get install \ diff --git a/poetry.lock b/poetry.lock index d160ec096e..48d9878153 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3562,7 +3562,10 @@ files = [ [package.dependencies] annotated-types = ">=0.6.0" pydantic-core = "2.23.4" -typing-extensions = {version = ">=4.6.1", markers = "python_version < \"3.13\""} +typing-extensions = [ + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, +] [package.extras] email = ["email-validator (>=2.0.0)"] @@ -4417,6 +4420,11 @@ files = [ {file = "scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f60021ec1574e56632be2a36b946f8143bf4e5e6af4a06d85281adc22938e0dd"}, {file = "scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:394397841449853c2290a32050382edaec3da89e35b3e03d6cc966aebc6a8ae6"}, {file = "scikit_learn-1.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:57cc1786cfd6bd118220a92ede80270132aa353647684efa385a74244a41e3b1"}, + {file = "scikit_learn-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9a702e2de732bbb20d3bad29ebd77fc05a6b427dc49964300340e4c9328b3f5"}, + {file = "scikit_learn-1.5.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:b0768ad641981f5d3a198430a1d31c3e044ed2e8a6f22166b4d546a5116d7908"}, + {file = "scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:178ddd0a5cb0044464fc1bfc4cca5b1833bfc7bb022d70b05db8530da4bb3dd3"}, + {file = "scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7284ade780084d94505632241bf78c44ab3b6f1e8ccab3d2af58e0e950f9c12"}, + {file = "scikit_learn-1.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:b7b0f9a0b1040830d38c39b91b3a44e1b643f4b36e36567b80b7c6bd2202a27f"}, {file = "scikit_learn-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:757c7d514ddb00ae249832fe87100d9c73c6ea91423802872d9e74970a0e40b9"}, {file = "scikit_learn-1.5.2-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:52788f48b5d8bca5c0736c175fa6bdaab2ef00a8f536cda698db61bd89c551c1"}, {file = "scikit_learn-1.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:643964678f4b5fbdc95cbf8aec638acc7aa70f5f79ee2cdad1eec3df4ba6ead8"}, @@ -5778,5 +5786,5 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" -python-versions = ">=3.12, <3.13" -content-hash = "373650249d33baa777485a5b75ad021a0f1e15aa0d02aea8d1d409c5d180e999" +python-versions = ">=3.12, <3.14" +content-hash = "92316591f3921b4ce46382c21437f888f1f1626890b6deab3fec2c7c9ddff9f0" diff --git a/pyproject.toml b/pyproject.toml index 4cae871bab..4dc0078291 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ pillow = "*" pycparser = "^2.22" pyopenssl = "*" pyparsing = "^3.2.0" -python = ">=3.12, <3.13" +python = ">=3.12, <3.14" python-dateutil = "^2.9.0" python-magic = "^0.4.27" pytz = "*" From c21dbb51aafb61c3fe655ffa9555c420f287e689 Mon Sep 17 00:00:00 2001 From: Alberto Islas Date: Wed, 16 Oct 2024 19:24:07 -0600 Subject: [PATCH 2/2] fix(pre-commit): Updated pre-commit python version --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a03c498b13..5fb42876a3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks exclude: migrations default_language_version: - python: "python3.12" + python: "python3.13" ci: autoupdate_schedule: quarterly repos: