Make the "mock" dependency optional (only used in Python 2.7).#2518
Make the "mock" dependency optional (only used in Python 2.7).#2518dpkp merged 1 commit intodpkp:masterfrom
Conversation
|
I think I can merge this, thanks for the update. Can you show me what commands you are using to package that break on the current master? Our intent was to make testing dependencies / requirements-dev optional and wouldn't expect them to be included generally. The are not included in wheels uploaded to pypi, for example. |
|
Actually we have upgraded python-kafka in Fedora + EPEL 10 this week-end, including the diff of the closed pull request #2516: https://src.fedoraproject.org/rpms/python-kafka/pull-request/4#request_diff They way most fedora python packages are built are via some |
pyproject.toml
Outdated
| snappy = ["python-snappy"] | ||
| zstd = ["zstandard"] | ||
| testing = ["pytest", "mock", "pytest-mock"] | ||
| testing = ["pytest", "mock; python_version < '2.7'", "pytest-mock"] |
requirements-dev.txt
Outdated
| flake8 | ||
| lz4 | ||
| mock | ||
| mock; python_version < '2.7' |
There was a problem hiding this comment.
same -- prefer to cover all python before unittest.mock added in 3.3
28b7e6c to
553f302
Compare
|
I have update the version constraint to |
|
sorry, i also removed |
"mock" is included inside the standard "unittest" package in Python >= 3.3
553f302 to
fa0a6b7
Compare
|
Thanks! |
"mock" is included inside the standard "unittest" package in Python >= 3.3.
(This is an alternatve version of what was proposed (and declined) earlier in #2516. The idea is to allow distributions to package kafka-python without having to patch it explicitly to remove the "mock" dependency).