-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge kafka-python #932
Merge kafka-python #932
Conversation
git-subtree-dir: kafka git-subtree-split: c89bd5169277e2e7a6f29674d54c085a8cdbbfe3
Scenario (working branch is merge-kafka-python): git remote add kafka-python git@github.com:dpkp/kafka-python.git git fetch kafka-python git branch kafka-python-master kafka-python/master git switch kafka-python-master git subtree split --prefix=kafka -b kafka-python-kafka git switch merge-kafka-python git subtree add --squash --prefix=kafka kafka-python-kafka
git-subtree-dir: tests/kafka git-subtree-split: 1d17d3b7950b40aeeeef52281b8b7ab51622b272
Scenario (assumes kafka-python-master still exists from previous subtree add): git switch kafka-python-master git subtree split --prefix=test -b kafka-python-test git switch merge-kafka-python git subtree add --squash --prefix=tests/kafka kafka-python-test
Codecov Report
@@ Coverage Diff @@
## master #932 +/- ##
===========================================
- Coverage 97.56% 84.21% -13.35%
===========================================
Files 30 87 +57
Lines 5451 10085 +4634
===========================================
+ Hits 5318 8493 +3175
- Misses 133 1592 +1459
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Could you also add Python 3.12 to the CI? |
I don't think it's good to mix those changes, PR is already too big |
I managed to run the tests with Python 3.11.5 in a conda environment. However, when I created a Python 3.12.0 environment, I got the following error with flake8 while running the tests:
I will investigate it a bit and get back to you. |
@kPsarakis Thank you for starting working on it. I suggest to concentrate on this merge using Python versions that are used in test matrix. Support for 3.12 is not just adding one version to YAML files, there is bunch of problems to solve:
|
|
||
|
||
# https://github.com/apache/kafka/blob/0.8.2/clients/src/main/java/org/apache/kafka/common/utils/Utils.java#L244 | ||
def murmur2(data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the reason for using this and not mmh3 that we do not want to depend on another external project?
Could this be a performance inhibitor? I did a small test with 1 KB data, and murmur2
is x100 slower than mmh3.hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason. Would you please create a separate issue with this suggestion not to lose it? Let's keep just merge in this PR.
@ods I got confused jumping to this PR from the Python 3.12 compatibility issue. That's why I focused on 3.12. I managed to run the tests with 3.12 by bumping the following requirements in the
And I was running them with Now, regarding this PR: I searched for any remaining Additionally, we use Kafka as an ingress/egress for a system we are building and |
Thanks, testing with real-life scenarios are really valuable for this change! |
Changes
Merges relevant code from
kafka-python
. Motivations: it's not possible to support new Python versions without changes inkafka-python
. See statement fromkafka-python
's author.The changes are divided on subtree split & add commits that brings original code without changes and separate commits to adopt those changes into
aiokafka
. This allows to see changes made into the code when reviewed commit-by-commit.Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.