From 073a1f02fe2623d9a6e479a9977ab52fd5e3ebe0 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Tue, 7 Jul 2026 01:07:32 -0400 Subject: [PATCH 1/5] Fix CI lint formatting drift in tests and aerospike store --- faust/__init__.py | 1 + faust/stores/aerospike.py | 10 +++++----- tests/unit/transport/drivers/test_aiokafka.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/faust/__init__.py b/faust/__init__.py index c20b05903..f3ef14c75 100644 --- a/faust/__init__.py +++ b/faust/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- """Python Stream processing.""" + # :copyright: (c) 2017-2020, Robinhood Markets, Inc. # All rights reserved. # :license: BSD (3 Clause), see LICENSE for more details. diff --git a/faust/stores/aerospike.py b/faust/stores/aerospike.py index 291ccbe9f..198f78dc7 100644 --- a/faust/stores/aerospike.py +++ b/faust/stores/aerospike.py @@ -98,7 +98,7 @@ def _get(self, key: bytes) -> Optional[bytes]: key = (self.namespace, self.table_name, key) fun = self.client.get try: - (key, meta, bins) = self.aerospike_fun_call_with_retry(fun=fun, key=key) + key, meta, bins = self.aerospike_fun_call_with_retry(fun=fun, key=key) if bins: return bins[self.BIN_KEY] return None @@ -173,7 +173,7 @@ def _itervalues(self) -> Iterator[bytes]: fun=fun, namespace=self.namespace, set=self.table_name ) for result in scan.results(): - (key, meta, bins) = result + key, meta, bins = result if bins: yield bins[self.BIN_KEY] else: @@ -193,8 +193,8 @@ def _iteritems(self) -> Iterator[Tuple[bytes, bytes]]: fun=fun, namespace=self.namespace, set=self.table_name ) for result in scan.results(): - (key_data, meta, bins) = result - (ns, set, policy, key) = key_data + key_data, meta, bins = result + ns, set, policy, key = key_data if bins: bins = bins[self.BIN_KEY] @@ -214,7 +214,7 @@ def _contains(self, key: bytes) -> bool: try: if self.app.conf.store_check_exists: key = (self.namespace, self.table_name, key) - (key, meta) = self.aerospike_fun_call_with_retry( + key, meta = self.aerospike_fun_call_with_retry( fun=self.client.exists, key=key ) if meta: diff --git a/tests/unit/transport/drivers/test_aiokafka.py b/tests/unit/transport/drivers/test_aiokafka.py index a0252e1a2..fc54fbcfa 100644 --- a/tests/unit/transport/drivers/test_aiokafka.py +++ b/tests/unit/transport/drivers/test_aiokafka.py @@ -17,10 +17,10 @@ import faust from faust import auth from faust.exceptions import ImproperlyConfigured, NotReady -from faust.transport.drivers.aiokafka import _AIOKAFKA_HAS_API_VERSION from faust.sensors.monitor import Monitor from faust.transport.drivers import aiokafka as mod from faust.transport.drivers.aiokafka import ( + _AIOKAFKA_HAS_API_VERSION, SLOW_PROCESSING_CAUSE_AGENT, SLOW_PROCESSING_CAUSE_STREAM, SLOW_PROCESSING_EXPLAINED, From 1943df2ffedad36089b50032337ba5cda8ea2629 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Tue, 7 Jul 2026 01:18:35 -0400 Subject: [PATCH 2/5] CI: unblock required checks by isolating experimental PyPy --- .github/workflows/python-package.yml | 32 +++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f3b02a839..6310cf2c7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,7 +12,7 @@ env: FORCE_COLOR: '1' # Make tools pretty. PIP_DISABLE_PIP_VERSION_CHECK: '1' PIP_NO_PYTHON_VERSION_WARNING: '1' - PYTHON_LATEST: '3.13' + PYTHON_LATEST: '3.12' jobs: lint: name: Check linting @@ -45,10 +45,6 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] use-cython: ['true', 'false'] experimental: [false] - include: - - python-version: 'pypy3.9' - use-cython: false - experimental: true env: USE_CYTHON: ${{ matrix.use-cython }} continue-on-error: ${{ matrix.experimental }} @@ -71,6 +67,32 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} + test-pypy: + name: 'Python pypy3.9/Cython: false' + runs-on: ubuntu-latest + timeout-minutes: 10 + continue-on-error: true + env: + USE_CYTHON: 'false' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: pypy3.9 + cache: pip + cache-dependency-path: requirements/test.txt + - name: Install dependencies + run: | + pip install -r requirements/test.txt + pip install . + - name: Run tests + run: scripts/tests + - name: Enforce coverage + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} check: # This job does nothing and is only used for the branch protection name: ✅ Ensure the required checks passing if: always() From 4c8cd041d251e014b43f6ecef67a291eb48ac504 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 05:25:54 +0000 Subject: [PATCH 3/5] Fix E402 linting errors: move _AIOKAFKA_HAS_API_VERSION assignment after imports --- faust/transport/drivers/aiokafka.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/faust/transport/drivers/aiokafka.py b/faust/transport/drivers/aiokafka.py index 943e9ebc3..1a2a83454 100644 --- a/faust/transport/drivers/aiokafka.py +++ b/faust/transport/drivers/aiokafka.py @@ -27,9 +27,6 @@ import aiokafka import aiokafka.abc import opentracing -from packaging.version import Version - -_AIOKAFKA_HAS_API_VERSION = Version(aiokafka.__version__) < Version("0.13.0") from aiokafka import TopicPartition from aiokafka.consumer.group_coordinator import OffsetCommitRequest from aiokafka.coordinator.assignors.roundrobin import RoundRobinPartitionAssignor @@ -55,6 +52,7 @@ from mode.utils.objects import cached_property from mode.utils.times import Seconds, humanize_seconds_ago, want_seconds from opentracing.ext import tags +from packaging.version import Version from yarl import URL from faust.auth import ( @@ -88,6 +86,8 @@ from faust.types.transports import ConsumerT, PartitionerT, ProducerT from faust.utils.tracing import noop_span, set_current_span, traced_from_parent_span +_AIOKAFKA_HAS_API_VERSION = Version(aiokafka.__version__) < Version("0.13.0") + __all__ = ["Consumer", "Producer", "Transport"] # if not hasattr(aiokafka, '__robinhood__'): # pragma: no cover From 98e20579ed01caae116fe11bf3f40668cf775816 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 05:37:44 +0000 Subject: [PATCH 4/5] Pin PyPy 3.9 transitive deps to avoid PyO3 build failures --- requirements/test.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements/test.txt b/requirements/test.txt index 8dfe2cdfa..1f24d01e5 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -20,6 +20,8 @@ python-dateutil>=2.8 pytz>=2018.7 bandit twine +cryptography<45; implementation_name == 'pypy' and python_version < '3.11' +nh3<0.3; implementation_name == 'pypy' and python_version < '3.11' wheel intervaltree -r requirements.txt From 6e6204428968afb51e6b4d41abed76bb522269be Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 08:45:05 -0400 Subject: [PATCH 5/5] Redesign PyPy CI pipeline: remove dep pins, handle install failures at step level (#678) --- .github/workflows/python-package.yml | 4 ++++ requirements/test.txt | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6310cf2c7..c196b1fb6 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -84,12 +84,16 @@ jobs: cache: pip cache-dependency-path: requirements/test.txt - name: Install dependencies + id: install + continue-on-error: true run: | pip install -r requirements/test.txt pip install . - name: Run tests + if: steps.install.outcome == 'success' run: scripts/tests - name: Enforce coverage + if: steps.install.outcome == 'success' uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/requirements/test.txt b/requirements/test.txt index 1f24d01e5..8dfe2cdfa 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -20,8 +20,6 @@ python-dateutil>=2.8 pytz>=2018.7 bandit twine -cryptography<45; implementation_name == 'pypy' and python_version < '3.11' -nh3<0.3; implementation_name == 'pypy' and python_version < '3.11' wheel intervaltree -r requirements.txt