| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add logic for inferring newer broker versions
- New Fetch / ListOffsets request / response objects
- Add new test cases to inferr code based on mentioned objects
- Add unit test to check inferred version against whatever resides in KAFKA_VERSION
- Add new kafka broker versions to integration list
- Add more kafka broker versions to travis task list
- Add support for broker version 2.5 id
* Implement PR change requests: fewer versions for travis testing, remove unused older versions for inference code, remove one minor version from known server list
Do not use newly created ACL request / responses in allowed version lists, due to flexible versions enabling in kafka actually requiring a serialization protocol header update
Revert admin client file change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the 2.0 release, we're removing:
* `SimpleClient`
* `SimpleConsumer`
* `SimpleProducer`
* Old partitioners used by `SimpleProducer`; these are superceded by
the `DefaultPartitioner`
These have been deprecated for several years in favor of `KafkaClient`
/ `KafkaConsumer` / `KafkaProducer`.
Since 2.0 allows breaking changes, we are removing the deprecated
classes.
Additionally, since the only usage of `unittest` was in tests for these
old Simple* clients, this also drops `unittest` from the library. All
tests now run under `pytest`.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This makes it so the only remaining use of `unittest` is in the old
tests of the deprecated `Simple*` clients. All `KafkaConsumer` tests are
migrated to `pytest`.
I also had to bump the test iterations up on one of the tests, I think there was a race condition there that was more commonly hit under pytest , planning to cleanup that in a followup PR. See https://github.com/dpkp/kafka-python/pull/1886#discussion_r316860737 for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we are using `pytest`, there is no need for a custom decorator
because we can use `pytest.mark.skipif()`.
This makes the code significantly simpler. In particular, dropping the
custom `@kafka_versions()` decorator is necessary because it uses
`func.wraps()` which doesn't play nice with `pytest` fixtures:
- https://github.com/pytest-dev/pytest/issues/677
- https://stackoverflow.com/a/19614807/770425
So this is a pre-requisite to migrating some of those tests to using
pytest fixtures.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`random_string` now comes from `test.fixtures` and was being
transparently imported via `test.testutil` so this bypasses the
pointless indirect import.
Similarly, `kafka_version` was transparently imported by `test.testutil`
from `test.fixtures`.
Also removed `random_port()` in `test.testutil` because its unused as its been replaced
by the one in `test.fixtures`.
This is part of the pytest migration that was started back in
a1869c4be5f47b4f6433610249aaf29af4ec95e5.
|
|
|
|
| |
Use vendored `six`, and also `six.moves.range` rather than `xrange`
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This commits adds new pytest fixtures in prepation for the
migration of unittest.TestCases to pytest test cases. The handling
of temporary dir creation was also changed so that we can use
the pytest tmpdir fixture after the migration.
|
| |
|
| |
|
|
|
|
| |
message format
|
| |
|
| |
|
|
|
|
| |
review issues
|
| |
|
| |
|
|
|
|
| |
and send in parallel.
|
| |
|
|
|
|
| |
more data than 0.10
|
| |
|
| |
|
| |
|
|
|
|
| |
* Added `max_bytes` option and FetchRequest_v3 usage.
* Add checks for versions above 0.10 based on ApiVersionResponse
|
| |
|
|
|
|
|
| |
[Legacy Protocol] Update legacy protocol to handle compressed messages
* [SimpleConsumer] Fix legacy SimpleConsumer when using compressed messages
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
kafka/codec.py
kafka/version.py
test/test_producer.py
test/test_producer_integration.py
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove debug call to deprecated .offsets() method
- Manually assign TopicPartition to avoid group subscription overhead
- Use next(consumer), not consumer.next()
- consumer_timeout_ms now raises StopIteration, not ConsumerTimeout
- auto_commit_enable is now enable_auto_commit
- auto_offset_reset -> earliest, not smallest
- new consumer does not support auto_commit_interval_messages
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Modified MultiProcessConsumer's and SimpleConsumer's `block` argument to
allow integer value which defines the number of messages to block for.
This allows callers to ask for a high number of messages and block only
until some of them are received. Otherwise callers would have to request
messages one by one or block for some time.
|
| |
|
| |
|