Skip to content

Commit

Permalink
Merge branch 'master' into consumer_stop
Browse files Browse the repository at this point in the history
  • Loading branch information
dkilgore90 authored Nov 13, 2020
2 parents 38e13a7 + f7f55b1 commit 83b0f34
Show file tree
Hide file tree
Showing 49 changed files with 957 additions and 943 deletions.
4 changes: 0 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ environment:
KAFKA_VERSION: "0.10.2.1"
SCALA_VERSION: "2.11"
matrix:
- PYTHON: "C:\\Python35"
SNAPPY_WHEEL: "tools\\python_snappy-0.5.4-cp35-cp35m-win32.whl"
- PYTHON: "C:\\Python35-x64"
SNAPPY_WHEEL: "tools\\python_snappy-0.5.4-cp35-cp35m-win_amd64.whl"
- PYTHON: "C:\\Python36"
SNAPPY_WHEEL: "tools\\python_snappy-0.5.4-cp36-cp36m-win32.whl"
- PYTHON: "C:\\Python36-x64"
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ name: Publish
on:
release:
types: [created]
workflow_dispatch: {}

jobs:
package-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Prepare C files to include
Expand All @@ -37,16 +38,16 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build wheels
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
CIBW_BEFORE_BUILD_LINUX: pip install -r requirements-cython.txt && yum install -y zlib-devel
# On windows and mac we should have z library preinstalled
CIBW_BEFORE_BUILD: pip install -r requirements-cython.txt
CIBW_BUILD_VERBOSITY: 2
CIBW_SKIP: cp27-* cp35-* pp27-*
run: |
python -m pip install --upgrade pip setuptools
pip install cibuildwheel
Expand All @@ -64,14 +65,20 @@ jobs:

strategy:
matrix:
python: [3.6, 3.7]
python: [3.6, 3.7, 3.8, 3.9]
include:
- python: 3.6
snappy_whl: tools/python_snappy-0.5.4-cp36-cp36m-win_amd64.whl
aiokafka_whl: dist/aiokafka-*-cp36-cp36m-win_amd64.whl
- python: 3.7
snappy_whl: tools/python_snappy-0.5.4-cp37-cp37m-win_amd64.whl
aiokafka_whl: dist/aiokafka-*-cp37-cp37m-win_amd64.whl
- python: 3.8
snappy_whl: tools/python_snappy-0.5.4-cp38-cp38-win_amd64.whl
aiokafka_whl: dist/aiokafka-*-cp38-cp38-win_amd64.whl
- python: 3.9
snappy_whl: tools/python_snappy-0.5.4-cp39-cp39-win_amd64.whl
aiokafka_whl: dist/aiokafka-*-cp39-cp39-win_amd64.whl

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -106,12 +113,16 @@ jobs:

strategy:
matrix:
python: [3.6, 3.7]
python: [3.6, 3.7, 3.8, 3.9]
include:
- python: 3.6
aiokafka_whl: dist/aiokafka-*-cp36-cp36m-macosx_10_9_x86_64.whl
- python: 3.7
aiokafka_whl: dist/aiokafka-*-cp37-cp37m-macosx_10_9_x86_64.whl
- python: 3.8
aiokafka_whl: dist/aiokafka-*-cp38-cp38-macosx_10_9_x86_64.whl
- python: 3.9
aiokafka_whl: dist/aiokafka-*-cp39-cp39-macosx_10_9_x86_64.whl

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -146,12 +157,16 @@ jobs:

strategy:
matrix:
python: [3.6, 3.7]
python: [3.6, 3.7, 3.8.5, 3.9]
include:
- python: 3.6
aiokafka_whl: dist/aiokafka-*-cp36-cp36m-manylinux1_x86_64.whl
- python: 3.7
aiokafka_whl: dist/aiokafka-*-cp37-cp37m-manylinux1_x86_64.whl
- python: 3.8.5
aiokafka_whl: dist/aiokafka-*-cp38-cp38-manylinux1_x86_64.whl
- python: 3.9
aiokafka_whl: dist/aiokafka-*-cp39-cp39-manylinux1_x86_64.whl

steps:
- uses: actions/checkout@v2
Expand All @@ -175,6 +190,8 @@ jobs:
pip install ${{ matrix.aiokafka_whl }}
- name: Run Unit Tests
# FIXME 3.8.6 and 3.9.0 have broken `wait_for`
if: ${{ matrix.python != '3.9' }}
run: |
# Remove source code to be sure we use wheel code
rm -rf aiokafka
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ jobs:

strategy:
matrix:
python: [3.6, 3.7]
python: [3.6, 3.7, 3.8.5]
include:
- python: 3.6
snappy_whl: tools/python_snappy-0.5.4-cp36-cp36m-win_amd64.whl
- python: 3.7
snappy_whl: tools/python_snappy-0.5.4-cp37-cp37m-win_amd64.whl
- python: 3.8.5
snappy_whl: tools/python_snappy-0.5.4-cp38-cp38-win_amd64.whl

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -141,7 +143,7 @@ jobs:

strategy:
matrix:
python: [3.6, 3.7]
python: [3.6, 3.7, 3.8.5]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -214,38 +216,42 @@ jobs:
strategy:
matrix:
include:
- python: 3.7
# FIXME Stick to 3.8.5 as 3.8.6 has broken `wait_for`
- python: 3.8.5
kafka: "2.4.0"
scala: "2.12"

# Older python versions against latest broker
- python: 3.5
- python: 3.6
kafka: "2.4.0"
scala: "2.12"
- python: 3.6

# Older python versions against latest broker
- python: 3.7
kafka: "2.4.0"
scala: "2.12"


# Older brokers against latest python version
- python: 3.7
- python: 3.8.5
kafka: "0.9.0.1"
scala: "2.11"
- python: 3.7
- python: 3.8.5
kafka: "0.10.2.1"
scala: "2.11"
- python: 3.7
- python: 3.8.5
kafka: "0.11.0.3"
scala: "2.12"
- python: 3.7
- python: 3.8.5
kafka: "1.1.1"
scala: "2.12"
- python: 3.7
- python: 3.8.5
kafka: "2.1.1"
scala: "2.12"
- python: 3.7
- python: 3.8.5
kafka: "2.2.2"
scala: "2.12"
- python: 3.7
- python: 3.8.5
kafka: "2.3.1"
scala: "2.12"
fail-fast: false
Expand Down
15 changes: 0 additions & 15 deletions .travis.yml_bak
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,6 @@ matrix:
- make check-readme

# All Package build combinations for newest Kafka
- stage: *stage_functional
sudo: true
python: 3.5
services:
- docker
env: KAFKA_VERSION=2.4.0 SCALA_VERSION=2.12 PYTHONASYNCIODEBUG=1
script:
- make ci-test-all
- sudo: true
python: 3.5
services:
- docker
env: KAFKA_VERSION=2.4.0 SCALA_VERSION=2.12 PYTHONASYNCIODEBUG=1 AIOKAFKA_NO_EXTENSIONS=1
script:
- make ci-test-all
- sudo: true
python: 3.6
services:
Expand Down
20 changes: 16 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@
Changelog
=========


659.bugfix
Allow group coordinator to close when all brokers are unavailable

628.bugfix
Fix memory leak in kafka consumer when consumer is in idle state not consuming any message

618.feature
added `OAUTHBEARER` as a new `sasl_mechanism`.
0.7.0 (2020-10-28)
==================

New features:

* Add support for Python 3.8 and 3.9. (issue #569, pr #669 and #676 by @ods)
* Drop support for Python 3.5. (pr #667 by @ods)
* Add `OAUTHBEARER` as a new `sasl_mechanism`. (issue #618 and pr #630 by @oulydna)


Bugfixes:

* Fix memory leak in kafka consumer when consumer is in idle state not consuming any message.
(issue #628 and pr #629 by @iamsinghrajat)


0.6.0 (2020-05-15)
==================
Expand Down
1 change: 1 addition & 0 deletions CHANGES/566.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added a docstring for Kafka header support in Producer.send().
1 change: 1 addition & 0 deletions CHANGES/python3.9-fix.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix consumer fetcher for python3.9
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ setup:
pip install -Ue .

format:
isort -rc $(FORMATTED_AREAS) setup.py
isort $(FORMATTED_AREAS) setup.py
black $(FORMATTED_AREAS) setup.py

flake: lint
lint:
black --check $(FORMATTED_AREAS) setup.py
@if ! isort -c -rc $(FORMATTED_AREAS) setup.py; then \
@if ! isort -c $(FORMATTED_AREAS) setup.py; then \
echo "Import sort errors, run 'make format' to fix them!!!"; \
isort --diff -rc $(FORMATTED_AREAS) setup.py; \
isort --diff --color $(FORMATTED_AREAS) setup.py; \
false; \
fi
flake8 aiokafka tests setup.py
Expand All @@ -37,10 +37,10 @@ cov cover coverage: flake
@echo "open file://`pwd`/htmlcov/index.html"

ci-test-unit:
py.test -s --log-level DEBUG --cov aiokafka --cov-report xml --color=yes $(FLAGS) tests
py.test -s --log-format="%(asctime)s %(levelname)s %(message)s" --log-level DEBUG --cov aiokafka --cov-report xml --color=yes $(FLAGS) tests

ci-test-all:
py.test -s -v --log-level DEBUG --cov aiokafka --cov-report xml --color=yes --docker-image $(DOCKER_IMAGE) $(FLAGS) tests
py.test -s -v --log-format="%(asctime)s %(levelname)s %(message)s" --log-level DEBUG --cov aiokafka --cov-report xml --color=yes --docker-image $(DOCKER_IMAGE) $(FLAGS) tests

coverage.xml: .coverage
coverage xml
Expand Down
5 changes: 2 additions & 3 deletions aiokafka/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.6.1.dev0' # noqa
__version__ = '0.7.0' # noqa

from .abc import ConsumerRebalanceListener
from .client import AIOKafkaClient
Expand All @@ -8,7 +8,6 @@
from .structs import (
TopicPartition, ConsumerRecord, OffsetAndTimestamp, OffsetAndMetadata
)
from .util import PY_35, ensure_future


__all__ = [
Expand All @@ -24,4 +23,4 @@
"OffsetAndMetadata"
]

(PY_35, ensure_future, AIOKafkaClient)
AIOKafkaClient
6 changes: 1 addition & 5 deletions aiokafka/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ def on_partitions_assigned(self, assigned):
pass


# This statement is compatible with both Python 2.7 & 3+
ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()})


class AbstractTokenProvider(ABC):
class AbstractTokenProvider(abc.ABC):
"""
A Token Provider must be used for the SASL OAuthBearer protocol.
The implementation should ensure token reuse so that multiple
Expand Down
Loading

0 comments on commit 83b0f34

Please sign in to comment.