From 98e427cc7c20c3179bbc99296eed57e42aa83d81 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 09:08:42 -0400 Subject: [PATCH 01/37] update readme and setup.py tags --- README.rst | 12 +++++++++--- setup.py | 15 ++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 5f834442c..a3b198892 100644 --- a/README.rst +++ b/README.rst @@ -7,10 +7,16 @@ Kafka Python client :target: https://pypi.python.org/pypi/kafka-python .. image:: https://coveralls.io/repos/dpkp/kafka-python/badge.svg?branch=master&service=github :target: https://coveralls.io/github/dpkp/kafka-python?branch=master -.. image:: https://travis-ci.org/dpkp/kafka-python.svg?branch=master - :target: https://travis-ci.org/dpkp/kafka-python .. image:: https://img.shields.io/badge/license-Apache%202-blue.svg - :target: https://github.com/dpkp/kafka-python/blob/master/LICENSE + :target: https://github.com/dpkp/kafka-python/blob/master/license +.. image:: https://img.shields.io/pypi/dw/kafka-python.svg + :target: https://pypistats.org/packages/kafka-python +.. image:: https://img.shields.io/pypi/v/kafka-python.svg + :target: https://pypi.org/project/kafka-python +.. image:: https://img.shields.io/pypi/implementation/kafka-python + :target: https://github.com/dpkp/kafka-python/blob/master/setup.py + + Python client for the Apache Kafka distributed stream processing system. kafka-python is designed to function much like the official java client, with a diff --git a/setup.py b/setup.py index fe8a594f3..cb677ce5d 100644 --- a/setup.py +++ b/setup.py @@ -50,20 +50,21 @@ def run(cls): license="Apache License 2.0", description="Pure Python client for Apache Kafka", long_description=README, - keywords="apache kafka", + keywords=[ + "apache kafka", + "kafka", + ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", ] From e2acd920f4b19438a528aafecf3c1784a56f44d1 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 09:29:20 -0400 Subject: [PATCH 02/37] remove pinned versions from requirements-dev.txt for now --- requirements-dev.txt | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 00ad68c22..1fa933da2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,17 +1,17 @@ -coveralls==2.1.2 -crc32c==2.1 -docker-py==1.10.6 -flake8==3.8.3 -lz4==3.1.0 -mock==4.0.2 -py==1.9.0 -pylint==2.6.0 -pytest==6.0.2 -pytest-cov==2.10.1 -pytest-mock==3.3.1 -pytest-pylint==0.17.0 -python-snappy==0.5.4 -Sphinx==3.2.1 -sphinx-rtd-theme==0.5.0 -tox==3.20.0 -xxhash==2.0.0 +coveralls +crc32c +docker-py +flake8 +lz4 +mock +py +pylint +pytest +pytest-cov +pytest-mock +pytest-pylint +python-snappy +Sphinx +sphinx-rtd-theme +tox +xxhash From 77c345b96b942c2b3b50ee228cd735bdb1ffa04c Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 10:05:36 -0400 Subject: [PATCH 03/37] commit basic workflow for now --- .github/CODE_OF_CONDUCT.md | 42 ++++++++ .github/dependabot.yml | 13 +++ .github/workflows/codeql-analysis.yml | 67 ++++++++++++ .github/workflows/python-package.yml | 149 ++++++++++++++++++++++++++ tox.ini | 17 +-- 5 files changed, 282 insertions(+), 6 deletions(-) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/python-package.yml diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..2eff8ca8c --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,42 @@ +# Code of Conduct + +Everyone interacting in the project's codebases, issue trackers, chat rooms, +and mailing lists is expected to follow the Faust Code of Conduct. + +As contributors and maintainers of these projects, and in the interest of fostering +an open and welcoming community, we pledge to respect all people who contribute +through reporting issues, posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in these projects a harassment-free +experience for everyone, regardless of level of experience, gender, +gender identity and expression, sexual orientation, disability, +personal appearance, body size, race, ethnicity, age, +religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical + or electronic addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct. By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently applying +these principles to every aspect of managing this project. Project maintainers +who do not follow or enforce the Code of Conduct may be permanently removed from +the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by opening an issue or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the Contributor Covenant, +version 1.2.0 available at http://contributor-covenant.org/version/1/2/0/. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5656e69c6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + # Maintain dependencies for pip + - package-ecosystem: "pip" + directory: "/requirements" + schedule: + interval: "daily" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..43427fab9 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,67 @@ +--- +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: CodeQL +on: + push: + branches: [master] + pull_request: + # The branches below must be a subset of the branches above + branches: [master] + schedule: + - cron: 19 10 * * 6 +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [python] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 000000000..614ee90ed --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,149 @@ +name: CI/CD + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + release: + types: [created] + branches: + - 'master' + workflow_dispatch: + +env: + FORCE_COLOR: "1" # Make tools pretty. + PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_NO_PYTHON_VERSION_WARNING: "1" + PYTHON_LATEST: "3.11" + + # For re-actors/checkout-python-sdist + sdist-artifact: python-package-distributions + +jobs: + + build-sdist: + name: đŸ“Ļ Build the source distribution + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_LATEST }} + cache: pip + - run: python -m pip install build + name: Install core libraries for build and install + - name: Build artifacts + run: python -m build + - name: Upload built artifacts for testing + uses: actions/upload-artifact@v3 + with: + name: ${{ env.sdist-artifact }} + # NOTE: Exact expected file names are specified here + # NOTE: as a safety measure — if anything weird ends + # NOTE: up being in this dir or not all dists will be + # NOTE: produced, this will fail the workflow. + path: dist/${{ env.sdist-name }} + retention-days: 15 + +# setup-kafka: +# name: Get latest Kafka releases +# runs-on: ubuntu-latest +# steps: +# - name: Pull Kafka releases +# run: build_integration.sh +# # TODO: Cache releases to expedite testing + + test-pytest: + name: Tests on ${{ matrix.python-version }} + needs: + - build-sdist + - setup-kafka + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + python-version: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "pypy3.9" +# kafka-version: +# - "0.8" +# - "0.9" +# - "0.10" +# - "0.11" +# - "1.0" +# - "1.1" +# - "2.0" +# - "2.1" +# - "2.2" +# - "2.3" +# - "2.4" +# - "2.5" +# - "2.6" + experimental: [ false ] +# include: +# - python-version: "~3.12.0-0" +# experimental: true + steps: + - name: Checkout the source code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: | + requirements-dev.txt + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + pip install . + pip install -r requirements-dev.txt + - name: Test with tox + run: tox + env: + PLATFORM: ${{ matrix.platform }} + + check: # This job does nothing and is only used for the branch protection + name: ✅ Ensure the required checks passing + if: always() + needs: + - build-sdist + - test-pytest + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} + + publish: # Run only on creating release for new tag + name: đŸ“Ļ Publish to PyPI + runs-on: ubuntu-latest + needs: check + permissions: + id-token: write + environment: pypi + if: github.event_name == 'release' && github.event.action == 'created' + steps: + - name: Download the sdist artifact + uses: actions/download-artifact@v3 + with: + name: ${{ env.sdist-artifact }} + path: dist + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/tox.ini b/tox.ini index 10e9911dc..c9dceaf49 100644 --- a/tox.ini +++ b/tox.ini @@ -1,17 +1,25 @@ [tox] -envlist = py{26,27,34,35,36,37,38,py}, docs +envlist = py{38,39,310,311,py}, docs [pytest] testpaths = kafka test addopts = --durations=10 log_format = %(created)f %(filename)-23s %(threadName)s %(message)s +[gh-actions] +python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + pypy3.9: py + [testenv] deps = pytest pytest-cov - py{27,34,35,36,37,38,py}: pylint - py{27,34,35,36,37,38,py}: pytest-pylint + py{38,39,310,311,py}: pylint + py{38,39,310,311,py}: pytest-pylint pytest-mock mock python-snappy @@ -26,9 +34,6 @@ setenv = PROJECT_ROOT = {toxinidir} passenv = KAFKA_VERSION -[testenv:py26] -# pylint doesn't support python2.6 -commands = py.test {posargs:--cov=kafka --cov-config=.covrc} [testenv:pypy] # pylint is super slow on pypy... From bd1b0fe8d554c4c4bd6a7c8f560f1c30efc2ecbf Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 10:07:04 -0400 Subject: [PATCH 04/37] disable setup-kafka requirement for now --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 614ee90ed..c7fcf01ae 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -62,7 +62,7 @@ jobs: name: Tests on ${{ matrix.python-version }} needs: - build-sdist - - setup-kafka +# - setup-kafka runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental }} strategy: From 4a62b02fcca171ca6c696913469ce218024eeac3 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 10:10:14 -0400 Subject: [PATCH 05/37] install libsnappy-dev --- .github/workflows/python-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c7fcf01ae..af1d44a03 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -107,6 +107,7 @@ jobs: requirements-dev.txt - name: Install dependencies run: | + sudo apt install -y libsnappy-dev python -m pip install --upgrade pip python -m pip install tox tox-gh-actions pip install . From 4f032403e1298022f6b841b46aa0642312cebe4c Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 10:16:05 -0400 Subject: [PATCH 06/37] remove py3.7 --- .github/workflows/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index af1d44a03..6379c5bbb 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -69,7 +69,6 @@ jobs: fail-fast: false matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" From 57c523c4edc4aa14fc62bfc6b6685108a6fea0c1 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 10:59:13 -0400 Subject: [PATCH 07/37] pull java and fix some tests --- .github/workflows/python-package.yml | 21 +++++++++++++-------- test/test_assignors.py | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6379c5bbb..0db4d7546 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,19 +50,19 @@ jobs: path: dist/${{ env.sdist-name }} retention-days: 15 -# setup-kafka: -# name: Get latest Kafka releases -# runs-on: ubuntu-latest -# steps: -# - name: Pull Kafka releases -# run: build_integration.sh -# # TODO: Cache releases to expedite testing + setup-kafka: + name: Get latest Kafka releases + runs-on: ubuntu-latest + steps: + - name: Pull Kafka releases + run: build_integration.sh + # TODO: Cache releases to expedite testing test-pytest: name: Tests on ${{ matrix.python-version }} needs: - build-sdist -# - setup-kafka + - setup-kafka runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental }} strategy: @@ -97,6 +97,11 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: '' + java-version: 8 - name: Set up Python uses: actions/setup-python@v4 with: diff --git a/test/test_assignors.py b/test/test_assignors.py index 67e91e131..858ef426d 100644 --- a/test/test_assignors.py +++ b/test/test_assignors.py @@ -655,7 +655,7 @@ def test_conflicting_previous_assignments(mocker): 'execution_number,n_topics,n_consumers', [(i, randint(10, 20), randint(20, 40)) for i in range(100)] ) def test_reassignment_with_random_subscriptions_and_changes(mocker, execution_number, n_topics, n_consumers): - all_topics = set(['t{}'.format(i) for i in range(1, n_topics + 1)]) + all_topics = sorted(['t{}'.format(i) for i in range(1, n_topics + 1)]) partitions = dict([(t, set(range(1, i + 1))) for i, t in enumerate(all_topics)]) cluster = create_cluster(mocker, topics=all_topics, topic_partitions_lambda=lambda t: partitions[t]) From 5ddacca3162e8f09caf904679d628f500c27a011 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:11:21 -0400 Subject: [PATCH 08/37] cleanup commands --- .github/workflows/python-package.yml | 20 ++++++++------------ travis_java_install.sh | 0 2 files changed, 8 insertions(+), 12 deletions(-) mode change 100644 => 100755 travis_java_install.sh diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0db4d7546..2e8a314f0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,19 +50,10 @@ jobs: path: dist/${{ env.sdist-name }} retention-days: 15 - setup-kafka: - name: Get latest Kafka releases - runs-on: ubuntu-latest - steps: - - name: Pull Kafka releases - run: build_integration.sh - # TODO: Cache releases to expedite testing - - test-pytest: + test: name: Tests on ${{ matrix.python-version }} needs: - build-sdist - - setup-kafka runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental }} strategy: @@ -109,9 +100,14 @@ jobs: cache: pip cache-dependency-path: | requirements-dev.txt + - name: Check Java installation + run: source travis_java_install.sh + - name: Pull Kafka releases + run: build_integration.sh + # TODO: Cache releases to expedite testing - name: Install dependencies run: | - sudo apt install -y libsnappy-dev + sudo apt install -y libsnappy-dev libzstd-dev python -m pip install --upgrade pip python -m pip install tox tox-gh-actions pip install . @@ -126,7 +122,7 @@ jobs: if: always() needs: - build-sdist - - test-pytest + - test runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/travis_java_install.sh b/travis_java_install.sh old mode 100644 new mode 100755 From 75a9ef7e369f804dac6b7805814e7e10e2693298 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:13:16 -0400 Subject: [PATCH 09/37] remove --- .github/workflows/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2e8a314f0..3735d1a38 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -91,7 +91,6 @@ jobs: - name: Setup java uses: actions/setup-java@v3 with: - distribution: '' java-version: 8 - name: Set up Python uses: actions/setup-python@v4 From 21a36f8ec0a085dee6db159d634a63fa323fdf6e Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:15:38 -0400 Subject: [PATCH 10/37] specify oracle distribution --- .github/workflows/python-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3735d1a38..c8ac576ec 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -91,6 +91,7 @@ jobs: - name: Setup java uses: actions/setup-java@v3 with: + distribution: oracle java-version: 8 - name: Set up Python uses: actions/setup-python@v4 From 9759af4b1089d083508b38ee89428ae17c67960a Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:19:19 -0400 Subject: [PATCH 11/37] just use temurin 11 for now --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c8ac576ec..2ad30f2b2 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -91,8 +91,8 @@ jobs: - name: Setup java uses: actions/setup-java@v3 with: - distribution: oracle - java-version: 8 + distribution: temurin + java-version: 11 - name: Set up Python uses: actions/setup-python@v4 with: From fa4b11a70a51cc104690781b7e3b50926ef6414c Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:28:22 -0400 Subject: [PATCH 12/37] run ./build_integration.sh lol --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2ad30f2b2..efe43ca69 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -103,7 +103,7 @@ jobs: - name: Check Java installation run: source travis_java_install.sh - name: Pull Kafka releases - run: build_integration.sh + run: ./build_integration.sh # TODO: Cache releases to expedite testing - name: Install dependencies run: | From d05e798f8f72da9d7c4452f62af5ee1f6ec4e016 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:40:12 -0400 Subject: [PATCH 13/37] add more releases to build_integration.sh --- build_integration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_integration.sh b/build_integration.sh index c020b0fe2..ab77c6126 100755 --- a/build_integration.sh +++ b/build_integration.sh @@ -1,6 +1,6 @@ #!/bin/bash -: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"} +: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 0.11.0.2 0.11.0.1 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"} : ${SCALA_VERSION:=2.11} : ${DIST_BASE_URL:=https://archive.apache.org/dist/kafka/} : ${KAFKA_SRC_GIT:=https://github.com/apache/kafka.git} From 60ad460a518543f3381a43cf5f0442eaf8a81eb4 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:50:03 -0400 Subject: [PATCH 14/37] specify kafka version in env --- .github/workflows/python-package.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index efe43ca69..a8f20e754 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -65,20 +65,16 @@ jobs: - "3.10" - "3.11" - "pypy3.9" -# kafka-version: -# - "0.8" -# - "0.9" -# - "0.10" -# - "0.11" -# - "1.0" -# - "1.1" -# - "2.0" -# - "2.1" -# - "2.2" -# - "2.3" -# - "2.4" -# - "2.5" -# - "2.6" + kafka-version: +# - "0.8.2.2" +# - "0.9.0.1" +# - "0.10.2.2" + - "0.11.0.2" +# - "0.11.0.3" +# - "1.1.1" +# - "2.4.0" +# - "2.5.0" +# - "2.6.0" experimental: [ false ] # include: # - python-version: "~3.12.0-0" @@ -116,6 +112,7 @@ jobs: run: tox env: PLATFORM: ${{ matrix.platform }} + KAFKA_VERSION: ${{ matrix.kafka-version }} check: # This job does nothing and is only used for the branch protection name: ✅ Ensure the required checks passing From ddd2c0d4a75092be1700d5ce0188d948183e3bfe Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 11:53:44 -0400 Subject: [PATCH 15/37] specify kafka versions --- .github/workflows/python-package.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a8f20e754..f50fe51c3 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -66,15 +66,15 @@ jobs: - "3.11" - "pypy3.9" kafka-version: -# - "0.8.2.2" -# - "0.9.0.1" -# - "0.10.2.2" - - "0.11.0.2" -# - "0.11.0.3" -# - "1.1.1" -# - "2.4.0" -# - "2.5.0" -# - "2.6.0" + - "0.8.2.2" + - "0.9.0.1" + - "0.10.2.2" + - "0.11.0.2" + - "0.11.0.3" + - "1.1.1" + - "2.4.0" + - "2.5.0" + - "2.6.0" experimental: [ false ] # include: # - python-version: "~3.12.0-0" @@ -100,6 +100,9 @@ jobs: run: source travis_java_install.sh - name: Pull Kafka releases run: ./build_integration.sh + env: + PLATFORM: ${{ matrix.platform }} + KAFKA_VERSION: ${{ matrix.kafka-version }} # TODO: Cache releases to expedite testing - name: Install dependencies run: | From 2b600c787b4649c15396abd4b2ee1f7a1ea08c57 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 12:20:22 -0400 Subject: [PATCH 16/37] just pull major and minor versions --- .github/workflows/python-package.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f50fe51c3..fe0818c99 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,7 +51,7 @@ jobs: retention-days: 15 test: - name: Tests on ${{ matrix.python-version }} + name: Tests on ${{ matrix.python-version }} for ${{ matrix.kafka-version }} needs: - build-sdist runs-on: ubuntu-latest @@ -66,15 +66,19 @@ jobs: - "3.11" - "pypy3.9" kafka-version: - - "0.8.2.2" - - "0.9.0.1" - - "0.10.2.2" - - "0.11.0.2" - - "0.11.0.3" - - "1.1.1" - - "2.4.0" - - "2.5.0" - - "2.6.0" + - "0.8" + - "0.9" + - "0.10" + - "0.11" + - "1.0" + - "1.1" + - "2.0" + - "2.1" + - "2.2" + - "2.3" + - "2.4" + - "2.5" + - "2.6" experimental: [ false ] # include: # - python-version: "~3.12.0-0" From 4d1077c83cd31600c652e78e0e2f066dbab51d42 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 12:22:22 -0400 Subject: [PATCH 17/37] Revert "just pull major and minor versions" This reverts commit 2b600c787b4649c15396abd4b2ee1f7a1ea08c57. --- .github/workflows/python-package.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index fe0818c99..f50fe51c3 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,7 +51,7 @@ jobs: retention-days: 15 test: - name: Tests on ${{ matrix.python-version }} for ${{ matrix.kafka-version }} + name: Tests on ${{ matrix.python-version }} needs: - build-sdist runs-on: ubuntu-latest @@ -66,19 +66,15 @@ jobs: - "3.11" - "pypy3.9" kafka-version: - - "0.8" - - "0.9" - - "0.10" - - "0.11" - - "1.0" - - "1.1" - - "2.0" - - "2.1" - - "2.2" - - "2.3" - - "2.4" - - "2.5" - - "2.6" + - "0.8.2.2" + - "0.9.0.1" + - "0.10.2.2" + - "0.11.0.2" + - "0.11.0.3" + - "1.1.1" + - "2.4.0" + - "2.5.0" + - "2.6.0" experimental: [ false ] # include: # - python-version: "~3.12.0-0" From 1f6ce7238938546b8c57ba533f55ffbaeac7a1db Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 12:25:58 -0400 Subject: [PATCH 18/37] split kafka and python tests --- .github/workflows/python-package.yml | 64 ++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f50fe51c3..0e98bc93d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,6 +16,7 @@ env: PIP_DISABLE_PIP_VERSION_CHECK: "1" PIP_NO_PYTHON_VERSION_WARNING: "1" PYTHON_LATEST: "3.11" + KAFKA_LATEST: "2.6.0" # For re-actors/checkout-python-sdist sdist-artifact: python-package-distributions @@ -50,8 +51,8 @@ jobs: path: dist/${{ env.sdist-name }} retention-days: 15 - test: - name: Tests on ${{ matrix.python-version }} + test-python: + name: Tests on ${{ matrix.python-version }} for Kafka ${{ env.KAFKA_LATEST }} needs: - build-sdist runs-on: ubuntu-latest @@ -65,6 +66,56 @@ jobs: - "3.10" - "3.11" - "pypy3.9" + experimental: [ false ] +# include: +# - python-version: "~3.12.0-0" +# experimental: true + steps: + - name: Checkout the source code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: | + requirements-dev.txt + - name: Check Java installation + run: source travis_java_install.sh + - name: Pull Kafka releases + run: ./build_integration.sh + env: + PLATFORM: ${{ matrix.platform }} + KAFKA_VERSION: ${{ env.KAFKA_LATEST }} + # TODO: Cache releases to expedite testing + - name: Install dependencies + run: | + sudo apt install -y libsnappy-dev libzstd-dev + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + pip install . + pip install -r requirements-dev.txt + - name: Test with tox + run: tox + env: + PLATFORM: ${{ matrix.platform }} + KAFKA_VERSION: ${{ env.KAFKA_LATEST }} + + test-kafka: + name: Tests on ${{ env.PYTHON_LATEST }} for Kafka ${{ matrix.kafka-version }} + needs: + - build-sdist + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: kafka-version: - "0.8.2.2" - "0.9.0.1" @@ -75,10 +126,6 @@ jobs: - "2.4.0" - "2.5.0" - "2.6.0" - experimental: [ false ] -# include: -# - python-version: "~3.12.0-0" -# experimental: true steps: - name: Checkout the source code uses: actions/checkout@v3 @@ -92,7 +139,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ env.PYTHON_LATEST }} cache: pip cache-dependency-path: | requirements-dev.txt @@ -122,7 +169,8 @@ jobs: if: always() needs: - build-sdist - - test + - test-python + - test-kafka runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From 4ec8f04ebea8a37f137978b50c9419540266bae1 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 12:26:58 -0400 Subject: [PATCH 19/37] remove kafka note --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0e98bc93d..d57b08e02 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -52,7 +52,7 @@ jobs: retention-days: 15 test-python: - name: Tests on ${{ matrix.python-version }} for Kafka ${{ env.KAFKA_LATEST }} + name: Tests on ${{ matrix.python-version }} needs: - build-sdist runs-on: ubuntu-latest From ea2e8a0d486a25447c99a743e6e9992fccbc09ea Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 12:27:46 -0400 Subject: [PATCH 20/37] remove env from name again --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d57b08e02..73570d596 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -109,7 +109,7 @@ jobs: KAFKA_VERSION: ${{ env.KAFKA_LATEST }} test-kafka: - name: Tests on ${{ env.PYTHON_LATEST }} for Kafka ${{ matrix.kafka-version }} + name: Tests for Kafka ${{ matrix.kafka-version }} needs: - build-sdist runs-on: ubuntu-latest From 24ce0963f47b891042128a04c551259e375fc381 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 13:06:50 -0400 Subject: [PATCH 21/37] replace py.test with pytest --- Makefile | 6 +++--- tox.ini | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b4dcbffc9..fc8fa5b21 100644 --- a/Makefile +++ b/Makefile @@ -20,14 +20,14 @@ test37: build-integration test27: build-integration KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) tox -e py27 -- $(FLAGS) -# Test using py.test directly if you want to use local python. Useful for other +# Test using pytest directly if you want to use local python. Useful for other # platforms that require manual installation for C libraries, ie. Windows. test-local: build-integration - KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) py.test \ + KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) pytest \ --pylint --pylint-rcfile=pylint.rc --pylint-error-types=EF $(FLAGS) kafka test cov-local: build-integration - KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) py.test \ + KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) pytest \ --pylint --pylint-rcfile=pylint.rc --pylint-error-types=EF --cov=kafka \ --cov-config=.covrc --cov-report html $(FLAGS) kafka test @echo "open file://`pwd`/htmlcov/index.html" diff --git a/tox.ini b/tox.ini index c9dceaf49..970afa8fc 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ deps = xxhash crc32c commands = - py.test {posargs:--pylint --pylint-rcfile=pylint.rc --pylint-error-types=EF --cov=kafka --cov-config=.covrc} + pytest {posargs:--pylint --pylint-rcfile=pylint.rc --pylint-error-types=EF --cov=kafka --cov-config=.covrc} setenv = CRC32C_SW_MODE = auto PROJECT_ROOT = {toxinidir} @@ -37,7 +37,7 @@ passenv = KAFKA_VERSION [testenv:pypy] # pylint is super slow on pypy... -commands = py.test {posargs:--cov=kafka --cov-config=.covrc} +commands = pytest {posargs:--cov=kafka --cov-config=.covrc} [testenv:docs] deps = From 1a13baeddc6fdb071419cfdc634e7ba895f0388c Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 13:15:07 -0400 Subject: [PATCH 22/37] fix pypy syntax --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 970afa8fc..77b570948 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ python = 3.9: py39 3.10: py310 3.11: py311 - pypy3.9: py + pypy3.9: pypy [testenv] deps = From 873bc2dc0c9190acc86c009dc781fc4a87b1ed16 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 14:04:46 -0400 Subject: [PATCH 23/37] install pylint for everyone --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 77b570948..f65b4c073 100644 --- a/tox.ini +++ b/tox.ini @@ -18,8 +18,8 @@ python = deps = pytest pytest-cov - py{38,39,310,311,py}: pylint - py{38,39,310,311,py}: pytest-pylint + pylint + pytest-pylint pytest-mock mock python-snappy From c895bbabeaf562f60e0704bb134f0e733b9306cc Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 14:19:41 -0400 Subject: [PATCH 24/37] disable travis_java_install --- .github/workflows/python-package.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 73570d596..f581b0821 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -143,14 +143,15 @@ jobs: cache: pip cache-dependency-path: | requirements-dev.txt - - name: Check Java installation - run: source travis_java_install.sh +# - name: Check Java installation +# run: source travis_java_install.sh - name: Pull Kafka releases run: ./build_integration.sh env: + # This is fast enough as long as you pull only one release at a time, + # no need to worry about caching PLATFORM: ${{ matrix.platform }} KAFKA_VERSION: ${{ matrix.kafka-version }} - # TODO: Cache releases to expedite testing - name: Install dependencies run: | sudo apt install -y libsnappy-dev libzstd-dev From f186ae15d56a36b74018905d97e6a2243df5f98e Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 14:23:33 -0400 Subject: [PATCH 25/37] try java 8 --- .github/workflows/python-package.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f581b0821..033baf26d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -135,7 +135,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: temurin - java-version: 11 + java-version: 8 - name: Set up Python uses: actions/setup-python@v4 with: @@ -143,8 +143,6 @@ jobs: cache: pip cache-dependency-path: | requirements-dev.txt -# - name: Check Java installation -# run: source travis_java_install.sh - name: Pull Kafka releases run: ./build_integration.sh env: From 674ab785401b70f54a093afb839181e59d88e167 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 14:37:43 -0400 Subject: [PATCH 26/37] extend timeout from 35s to 60s since PyPy tests are slow --- test/test_admin_integration.py | 2 +- test/test_consumer_group.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_admin_integration.py b/test/test_admin_integration.py index 06c40a223..6a5d8d529 100644 --- a/test/test_admin_integration.py +++ b/test/test_admin_integration.py @@ -181,7 +181,7 @@ def consumer_thread(i, group_id): threads[i] = t try: - timeout = time() + 35 + timeout = time() + 60 while True: for c in range(num_consumers): diff --git a/test/test_consumer_group.py b/test/test_consumer_group.py index 58dc7ebf9..b55b056ac 100644 --- a/test/test_consumer_group.py +++ b/test/test_consumer_group.py @@ -71,7 +71,7 @@ def consumer_thread(i): threads[i] = t try: - timeout = time.time() + 35 + timeout = time.time() + 60 while True: for c in range(num_consumers): From 5a0a6624bb11dad8179f47203b5cecd35aeda8f7 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 14:51:37 -0400 Subject: [PATCH 27/37] Revert "extend timeout from 35s to 60s since PyPy tests are slow" This reverts commit 674ab785401b70f54a093afb839181e59d88e167. --- test/test_admin_integration.py | 2 +- test/test_consumer_group.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_admin_integration.py b/test/test_admin_integration.py index 6a5d8d529..06c40a223 100644 --- a/test/test_admin_integration.py +++ b/test/test_admin_integration.py @@ -181,7 +181,7 @@ def consumer_thread(i, group_id): threads[i] = t try: - timeout = time() + 60 + timeout = time() + 35 while True: for c in range(num_consumers): diff --git a/test/test_consumer_group.py b/test/test_consumer_group.py index b55b056ac..58dc7ebf9 100644 --- a/test/test_consumer_group.py +++ b/test/test_consumer_group.py @@ -71,7 +71,7 @@ def consumer_thread(i): threads[i] = t try: - timeout = time.time() + 60 + timeout = time.time() + 35 while True: for c in range(num_consumers): From 6baa9d7212fbb602ffdd7f43df9be5961b54d0d9 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:03:58 -0400 Subject: [PATCH 28/37] change syntax to pypy-3.9 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f65b4c073..7a38ee4a8 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ python = 3.9: py39 3.10: py310 3.11: py311 - pypy3.9: pypy + pypy-3.9: pypy [testenv] deps = From abf77061aff073f96b995ebf4c810edd06857f2e Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:17:15 -0400 Subject: [PATCH 29/37] remove CODE_OF_CONDUCT.md --- .github/CODE_OF_CONDUCT.md | 42 -------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 .github/CODE_OF_CONDUCT.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index 2eff8ca8c..000000000 --- a/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,42 +0,0 @@ -# Code of Conduct - -Everyone interacting in the project's codebases, issue trackers, chat rooms, -and mailing lists is expected to follow the Faust Code of Conduct. - -As contributors and maintainers of these projects, and in the interest of fostering -an open and welcoming community, we pledge to respect all people who contribute -through reporting issues, posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in these projects a harassment-free -experience for everyone, regardless of level of experience, gender, -gender identity and expression, sexual orientation, disability, -personal appearance, body size, race, ethnicity, age, -religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, such as physical - or electronic addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct. By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently applying -these principles to every aspect of managing this project. Project maintainers -who do not follow or enforce the Code of Conduct may be permanently removed from -the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by opening an issue or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the Contributor Covenant, -version 1.2.0 available at http://contributor-covenant.org/version/1/2/0/. From 4d05fd9499beefa7e5a03a6e2c0c6ec651d4ef2e Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:18:57 -0400 Subject: [PATCH 30/37] mark PyPy as experimental in CI/CD until we know why it keeps failing --- .github/workflows/python-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 033baf26d..b548d2c89 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -65,9 +65,10 @@ jobs: - "3.9" - "3.10" - "3.11" - - "pypy3.9" experimental: [ false ] -# include: + include: + - python-version: "pypy3.9" + experimental: true # - python-version: "~3.12.0-0" # experimental: true steps: From 4ef5dbc4202bc2bfa44e1f95b5fdf02d76b010ca Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:21:16 -0400 Subject: [PATCH 31/37] remove automatic publish --- .github/workflows/python-package.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b548d2c89..9ef4846bd 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -177,22 +177,3 @@ jobs: uses: re-actors/alls-green@release/v1 with: jobs: ${{ toJSON(needs) }} - - publish: # Run only on creating release for new tag - name: đŸ“Ļ Publish to PyPI - runs-on: ubuntu-latest - needs: check - permissions: - id-token: write - environment: pypi - if: github.event_name == 'release' && github.event.action == 'created' - steps: - - name: Download the sdist artifact - uses: actions/download-artifact@v3 - with: - name: ${{ env.sdist-artifact }} - path: dist - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file From f43e002589cd2e41f025e79c822385b7d7b17227 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:21:58 -0400 Subject: [PATCH 32/37] revert changes to ALL_RELEASES --- build_integration.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_integration.sh b/build_integration.sh index ab77c6126..3d0bf364d 100755 --- a/build_integration.sh +++ b/build_integration.sh @@ -1,7 +1,6 @@ #!/bin/bash -: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 0.11.0.2 0.11.0.1 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"} -: ${SCALA_VERSION:=2.11} +: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"}: ${SCALA_VERSION:=2.11} : ${DIST_BASE_URL:=https://archive.apache.org/dist/kafka/} : ${KAFKA_SRC_GIT:=https://github.com/apache/kafka.git} From b8e9e516a522db719798d53c33afd95af7c2396a Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:22:14 -0400 Subject: [PATCH 33/37] fix typo --- build_integration.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_integration.sh b/build_integration.sh index 3d0bf364d..c020b0fe2 100755 --- a/build_integration.sh +++ b/build_integration.sh @@ -1,6 +1,7 @@ #!/bin/bash -: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"}: ${SCALA_VERSION:=2.11} +: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"} +: ${SCALA_VERSION:=2.11} : ${DIST_BASE_URL:=https://archive.apache.org/dist/kafka/} : ${KAFKA_SRC_GIT:=https://github.com/apache/kafka.git} From 30bfa8cd0160b9372fc31c4486705bcba6d14fbf Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:31:12 -0400 Subject: [PATCH 34/37] Update dependabot.yml --- .github/dependabot.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5656e69c6..2c7d17083 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,9 +5,3 @@ updates: directory: "/" schedule: interval: "daily" - - # Maintain dependencies for pip - - package-ecosystem: "pip" - directory: "/requirements" - schedule: - interval: "daily" From 7fc76d15ab22479f6810b8e44622e0b077e835e6 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 15:35:05 -0400 Subject: [PATCH 35/37] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a3b198892..78a92a884 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Kafka Python client .. image:: https://coveralls.io/repos/dpkp/kafka-python/badge.svg?branch=master&service=github :target: https://coveralls.io/github/dpkp/kafka-python?branch=master .. image:: https://img.shields.io/badge/license-Apache%202-blue.svg - :target: https://github.com/dpkp/kafka-python/blob/master/license + :target: https://github.com/dpkp/kafka-python/blob/master/LICENSE .. image:: https://img.shields.io/pypi/dw/kafka-python.svg :target: https://pypistats.org/packages/kafka-python .. image:: https://img.shields.io/pypi/v/kafka-python.svg From 63837d64a79ab290169492802cef9120a50495f0 Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 17:25:23 -0400 Subject: [PATCH 36/37] revert tags to setup.py --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index cb677ce5d..414cba702 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,12 @@ def run(cls): "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 9ef7d6299f994fdf08abc69e776771c77676f52d Mon Sep 17 00:00:00 2001 From: William Barnhart Date: Wed, 2 Aug 2023 17:26:01 -0400 Subject: [PATCH 37/37] Update setup.py to have " "Programming Language :: Python :: 2"," again --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 414cba702..2b5ca380f 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ def run(cls): "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4",