Description of problem: The EPEL package python2-requests-mock-1.5.0 includes a pytest plugin that is incompatible with the version of pytest shipped in base/7 repo (pytest-2.7.0). Trying to run `py.test` with any arguments will cause the program to exit with an assertion failure when both packages are installed. Version-Release number of selected component (if applicable): python2-requests-mock 1.5.0-1.el7 (from EPEL-7) pytest 2.7.0-1.el7 (from base/7) How reproducible: Issue can be reproduced consistently. Steps to Reproduce: 1. yum install -y pytest python2-requests-mock 2. py.test --help Actual results: py.test will fail to start and print a stack trace: Traceback (most recent call last): File "/usr/bin/py.test", line 9, in <module> load_entry_point('pytest==2.7.0', 'console_scripts', 'py.test-2.7')() File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 32, in main config = _prepareconfig(args, plugins) File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 85, in _prepareconfig pluginmanager=pluginmanager, args=args) File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__ return self._docall(self.methods, kwargs) File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall firstresult=self.firstresult).execute() File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 393, in execute return wrapped_call(method(*args), self.execute) File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 109, in wrapped_call wrap_controller.send(call_outcome) File "/usr/lib/python2.7/site-packages/_pytest/helpconfig.py", line 28, in pytest_cmdline_parse config = outcome.get_result() File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 138, in get_result py.builtin._reraise(*ex) File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 123, in __init__ self.result = func() File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute res = method(*args) File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 636, in pytest_cmdline_parse self.parse(args) File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 746, in parse self._preparse(args) File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 713, in _preparse self.pluginmanager.consider_setuptools_entrypoints() File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 282, in consider_setuptools_entrypoints self.register(plugin, name=name) File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 189, in register reg(plugin, name) # may call addhooks File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 611, in _register_plugin call_plugin(plugin, "pytest_addoption", {'parser': self._parser}) File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 360, in call_plugin kwargs=kwargs, firstresult=True).execute() File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute res = method(*args) File "/usr/lib/python2.7/site-packages/requests_mock/contrib/_pytest_plugin.py", line 9, in pytest_addoption default=False) File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 212, in addini assert type in (None, "pathlist", "args", "linelist") AssertionError Expected results: py.test should print the normal help message. Additional info: The plugin in python2-requests-mock _appears_ to be compatible with pytest versions starting from 2.9.0; I have only tested that `pytest --help` can be successfully run again. This was tested with upstream versions of the packages in PyPi using python-virtualenv and python2-pip. The following works: $ virtualenv env; source env/bin/activate; $ pip install pytest==2.9.0 requests-mock==1.5.0; $ env/bin/py.test --help; # This works! but this doesn't work $ virtualenv env; source env/bin/activate; $ pip install pytest==2.8.7 requests-mock==1.5.0; $ env/bin/py.test --help; # This does NOT work! The upstream source for requests-mock in GitHub does not define a version requirement for pytest. The relevant commit is here: https://github.com/jamielennox/requests-mock/commit/a455a735d7edba5d064380eb054021a11d076f57
python-requests-mock-1.5.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-22a3804ab4
python-requests-mock-1.5.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-368d4c20cf
Hey, sorry about that. It definitely exposes some tests that were missed in the RPM build process. Thanks for the detailed report as well, made it much easier to track down. I've fixed this upstream, I may as well carry the fix there instead of an RPM patch, and released it as 1.5.1. I've proposed it to F28 (not affected, but keep up to date), EPEL and master. If you want to check out the candidates and vote on bodhi that would be great, but I've verified it works and added the build tests so it shouldn't happen again.
python-requests-mock-1.5.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-2093d59cfe
python-requests-mock-1.5.2-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5211c688a8
Fix one bug, create on bug. Should now be fixed by 1.5.2. https://github.com/jamielennox/requests-mock/issues/66
python-requests-mock-1.5.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-2093d59cfe
python-requests-mock-1.5.2-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5211c688a8
python-requests-mock-1.5.2-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
python-requests-mock-1.5.2-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.