From 2ae75a28ddf7588c3496fa13ce96ab13e471d4c3 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 18:55:56 +0200 Subject: [PATCH 1/9] Keep GitHub Actions up to date with GitHub's Dependabot Automates the process of creating pull requests like: * #1147 * #1292 --- * [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot) * [Configuration options for the dependabot.yml file - package-ecosystem](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem) --- .github/dependabot.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..be006de9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# Keep GitHub Actions up to date with GitHub's Dependabot... +# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + groups: + github-actions: + patterns: + - "*" # Group all Actions updates into a single larger pull request + schedule: + interval: weekly From f7869320e7cc294421c59e7cde70310808971586 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:00:04 +0200 Subject: [PATCH 2/9] celery-version: ['5.2.x', '5.3.x'] --- .github/workflows/build.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b77873b7..5a56133a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,9 +7,10 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - celery-version: ['5.2', '5.3'] + celery-version: ['5.2.x', '5.3.x'] tornado-version: ['6.0'] steps: @@ -23,11 +24,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install celery==${{ matrix.celery-version }} - pip install tornado==${{ matrix.tornado-version }} - pip install -r requirements/default.txt - pip install -r requirements/test.txt - pip install -r requirements/dev.txt + pip install celery==${{ matrix.celery-version }} \ + tornado==${{ matrix.tornado-version }} \ + -r requirements/default.txt \ + -r requirements/test.txt \ + -r requirements/dev.txt - name: Lint with pylint run: | From 385bb02cf9fd2fd364bece2e4d91bbd527586145 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:01:48 +0200 Subject: [PATCH 3/9] celery-version: ['5.2.x', '5.3.x'] --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a56133a..b8275547 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,10 +24,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install celery==${{ matrix.celery-version }} \ - tornado==${{ matrix.tornado-version }} \ - -r requirements/default.txt \ - -r requirements/test.txt \ + pip install celery==${{ matrix.celery-version }} + tornado==${{ matrix.tornado-version }} + -r requirements/default.txt + -r requirements/test.txt -r requirements/dev.txt - name: Lint with pylint From ac3892ed58c882a08de45b0da43ca31d833075d7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:03:05 +0200 Subject: [PATCH 4/9] celery-version: ['5.2.*', '5.3.*'] --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8275547..2d63eeb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - celery-version: ['5.2.x', '5.3.x'] + celery-version: ['5.2.*', '5.3.*'] tornado-version: ['6.0'] steps: From 073a9f85cafd56a1e88960640eb57b41e54746a8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:04:36 +0200 Subject: [PATCH 5/9] Modern pip has a real dependency resolver --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d63eeb0..8a758049 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,10 +24,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install celery==${{ matrix.celery-version }} - tornado==${{ matrix.tornado-version }} - -r requirements/default.txt - -r requirements/test.txt + pip install celery==${{ matrix.celery-version }} \ + tornado==${{ matrix.tornado-version }} \ + -r requirements/default.txt \ + -r requirements/test.txt \ -r requirements/dev.txt - name: Lint with pylint From af3c04c7e5a8770b86eba91b22a4c4b5be90f40d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:09:13 +0200 Subject: [PATCH 6/9] Fix yield-in-for-loop --- flower/utils/tasks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flower/utils/tasks.py b/flower/utils/tasks.py index 6e3b575c..4abcd82f 100644 --- a/flower/utils/tasks.py +++ b/flower/utils/tasks.py @@ -56,11 +56,10 @@ def sort_tasks(tasks, sort_by): if sort_by.startswith('-'): sort_by = sort_by.lstrip('-') reverse = True - for task in sorted( + yield from sorted( tasks, key=lambda x: getattr(x[1], sort_by) or sort_keys[sort_by](), - reverse=reverse): - yield task + reverse=reverse) def get_task_by_id(events, task_id): From cf5ec3cb4d4d87ced342e1f4d418fb93caa2d571 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:22:05 +0200 Subject: [PATCH 7/9] requirements/dev.txt imports default and test --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a758049..1193a929 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,6 @@ jobs: python -m pip install --upgrade pip pip install celery==${{ matrix.celery-version }} \ tornado==${{ matrix.tornado-version }} \ - -r requirements/default.txt \ - -r requirements/test.txt \ -r requirements/dev.txt - name: Lint with pylint From 59035d70992654bdeea142e816659fe8ecffd9d8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jul 2024 19:31:49 +0200 Subject: [PATCH 8/9] Celery 5.2 does not support Python 3.12 --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1193a929..79dfb536 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,9 @@ jobs: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] celery-version: ['5.2.*', '5.3.*'] tornado-version: ['6.0'] + exclude: # https://docs.celeryq.dev/en/v5.2.1/whatsnew-5.2.html#step-5-upgrade-to-celery-5-2 + - python-version: '3.12' + celery-version: '5.2.*' steps: - uses: actions/checkout@v3 From 3dabaa96abf2f8839b9be5541ddec4bdd37dedd8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 9 Jul 2024 09:45:21 +0200 Subject: [PATCH 9/9] celery-version: ['5.2.*', '5.3.*', '5.4.*'] --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79dfb536..413551f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,17 +10,17 @@ jobs: fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - celery-version: ['5.2.*', '5.3.*'] + celery-version: ['5.2.*', '5.3.*', '5.4.*'] tornado-version: ['6.0'] - exclude: # https://docs.celeryq.dev/en/v5.2.1/whatsnew-5.2.html#step-5-upgrade-to-celery-5-2 + exclude: # https://docs.celeryq.dev/en/v5.2.7/whatsnew-5.2.html#step-5-upgrade-to-celery-5-2 - python-version: '3.12' celery-version: '5.2.*' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -33,7 +33,7 @@ jobs: - name: Lint with pylint run: | - pylint flower --rcfile .pylintrc + pylint flower --rcfile .pylintrc - name: Run unit tests run: |