mockafka-py icon indicating copy to clipboard operation
mockafka-py copied to clipboard

TypeError: FakeAIOKafkaConsumer.commit() takes 1 positional argument but 2 were given

Open zedr opened this issue 3 months ago • 2 comments

Describe the bug The signature of mockafka.FakeAIOKafkaConsumer.commit() does not match the signature of aiokafka.AioKafkaConsumer.commit(), which takes a single, optional keyword argument offsets.

To Reproduce Steps to reproduce the behavior:

  1. Implement a test that calls the commit() message of the Kafka consumer and passes the keyword argument offsets

Outcome An exception is raised: TypeError: FakeAIOKafkaConsumer.commit() takes 1 positional argument but 2 were given

Expected behavior The test does not raise a TypeError.

Additional context Versions:

  • aiokafka==0.10.0
  • mockafka-py==0.2.2

zedr avatar Aug 28 '25 15:08 zedr

Any chance we can get this MR reviewed? :)

bcmyguest avatar Nov 25 '25 20:11 bcmyguest

Thanks for the interest. The associated PR may work, however it hasn't been compared to either the library or Kafka's internal behaviours yet -- hence it being in draft. Unfortunately I don't know when those could happen, though if you're familiar with the behaviour and wanted to check it over that could be a useful contribution :)

PeterJCLaw avatar Nov 25 '25 21:11 PeterJCLaw