Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ crc32c = ["crc32c"]
lz4 = ["lz4"]
snappy = ["python-snappy"]
zstd = ["zstandard"]
testing = ["pytest", "mock", "pytest-mock"]
testing = ["pytest", "mock; python_version < '3.3'", "pytest-mock"]

[tool.setuptools]
include-package-data = false
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ crc32c
docker-py
flake8
lz4
mock
mock; python_version < '3.3'
py
pylint
pytest
Expand Down
5 changes: 4 additions & 1 deletion test/record/test_default_records.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from mock import patch
try:
from unittest.mock import patch
except ImportError:
from mock import patch
import kafka.codec
from kafka.record.default_records import (
DefaultRecordBatch, DefaultRecordBatchBuilder
Expand Down
5 changes: 4 additions & 1 deletion test/record/test_legacy_records.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from __future__ import unicode_literals
import pytest
from mock import patch
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from kafka.record.legacy_records import (
LegacyRecordBatch, LegacyRecordBatchBuilder
)
Expand Down
5 changes: 4 additions & 1 deletion test/test_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
from errno import EALREADY, EINPROGRESS, EISCONN, ECONNRESET
import socket

import mock
try:
from unittest import mock
except ImportError:
import mock
import pytest

from kafka.conn import BrokerConnection, ConnectionStates, collect_hosts
Expand Down
5 changes: 4 additions & 1 deletion test/test_consumer_integration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import logging
import time

from mock import patch, ANY
try:
from unittest.mock import patch, ANY
except ImportError:
from mock import patch, ANY
import pytest
from kafka.vendor.six.moves import range

Expand Down
Loading