pytest-sugar: pytest-sugar is not working with pytest v5.4.0 (released on March 12th 2020)
pytest-sugar is not working with pytest v5.4.0 (released on March 12th 2020)
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 187, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/_pytest/config/__init__.py", line 820, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/hooks.py", line 308, in call_historic
INTERNALERROR> res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pytest_sugar.py", line 176, in pytest_configure
INTERNALERROR> sugar_reporter = SugarTerminalReporter(standard_reporter)
INTERNALERROR> File "/usr/local/lib/python3.7/site-packages/pytest_sugar.py", line 214, in __init__
INTERNALERROR> self.writer = self._tw
INTERNALERROR> AttributeError: can't set attribute
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 53
- Comments: 22 (1 by maintainers)
Commits related to this issue
- pytest-sugar not compatible with pytest 5.4.0+ See also: * Teemu/pytest-sugar#187 * Teemu/pytest-sugar#188 — committed to chris-allan/omero-web by chris-allan 7 years ago
- 🚨 Remove dependency on pytest-sugar pytest-sugar does not work with current pytest, as per Teemu/pytest-sugar#187. It's not vital to our test process, so we will do without. Closes #897. — committed to pretalx/pretalx by rixx 7 years ago
- Downgrade pytest to 5.3.5 to fix issue with pytest_sugar https://github.com/Teemu/pytest-sugar/issues/187 — committed to pcrespov/osparc-simcore by deleted user 7 years ago
- Downgrade pytest to 5.3.5 to fix issue with pytest_sugar https://github.com/Teemu/pytest-sugar/issues/187 — committed to pcrespov/osparc-simcore by deleted user 7 years ago
- freeze pytest version pytest-sugar does not work with new pytest version https://github.com/Teemu/pytest-sugar/issues/187 Let's just freeze pytest version in the meantime — committed to ToucanToco/peakina by PrettyWood 7 years ago
- TESTS: Try to fix CI pytest-sugar currently doesn't support pytest 5.4, see https://github.com/Teemu/pytest-sugar/issues/187 — committed to mne-tools/mne-bids by hoechenberger 7 years ago
- TESTS: Try to fix CI (#361) * TESTS: Try to fix CI pytest-sugar currently doesn't support pytest 5.4, see https://github.com/Teemu/pytest-sugar/issues/187 * Fix minimal install * Update doc... — committed to mne-tools/mne-bids by hoechenberger 7 years ago
- Pin pytest < 5.4 until pytest-sugar is fixed See https://github.com/Teemu/pytest-sugar/issues/187. — committed to pgjones/hypercorn by pgjones 7 years ago
- Remove pytest-sugar See https://github.com/Teemu/pytest-sugar/issues/187. — committed to 9dogs/tg-odesli-bot by 9dogs 7 years ago
- Currently doesn't work with pytest >=5.4 See https://github.com/Teemu/pytest-sugar/issues/187 — committed to hoechenberger/pytest-sugar-feedstock by hoechenberger 7 years ago
- Pin pytest < 5.4 until pytest-sugar is fixed See https://github.com/Teemu/pytest-sugar/issues/187. — committed to pallets/quart by pgjones 7 years ago
- requirements: Address pytest regression installing pytest<5.4.0 The version 5.4.0 of pytest introduced a regression preventing pytest-sugar from working (see [1] and [2]) It has been fixed in pytest... — committed to jcfr/word_cloud by jcfr 7 years ago
- [test] Pin to old pytest refs Teemu/pytest-sugar#187 — committed to mafrosis/jira-offline by mafrosis 7 years ago
- [test] Pin to old pytest refs Teemu/pytest-sugar#187 — committed to mafrosis/jira-offline by mafrosis 7 years ago
- [test] Pin to old pytest refs Teemu/pytest-sugar#187 — committed to mafrosis/jira-offline by mafrosis 7 years ago
- Pytest-sugar is not working for now (until pytest >= 5.4.2) See: https://github.com/Teemu/pytest-sugar/issues/187 Signed-off-by: Aurélien Bompard <aurelien@bompard.org> — committed to fedora-infra/fasjson by abompard 7 years ago
- Deactivate pytest-sugar plugin The plugin does currently not work with PyTest 5.4+, see https://github.com/Teemu/pytest-sugar/issues/187. Until this issue is fixed and a new version of the plugin is... — committed to se2p/pynguin by stephanlukasczyk 7 years ago
- Pin pytest < 5.4 until pytest-sugar is fixed See https://github.com/Teemu/pytest-sugar/issues/187. — committed to pgjones/quart-trio by pgjones 7 years ago
from personal experience i can say that a number of open-source maintainers currently have different priorities due to accommodating for stuff like daycare shut-down and corona preventions,
while i understand the unhappiness with delays, lets have patience and lets hope and wish for the good health of the maintainers and their families
Hello!
It looks like all fixes were merged already. Can I ask when the new version with fixes planned to be released?
Bump!
Can someone cut a release and put onto PyPi?
@igorbezr yes
Reposting a comment I posted on the PR for this:
This will work to get pytest-sugar working until this has merged:
It simply installs the version from @GuillaumeFavelier’s fork.
@GuillaumeFavelier Your patch looks good, please consider creating a PR with it.
It seems that direct access to
self.writeris deprecated:https://github.com/pytest-dev/pytest/blob/master/src/_pytest/terminal.py#L285-L293
and that
self.write()should be used instead ofself.writer.write():https://github.com/pytest-dev/pytest/blob/master/src/_pytest/terminal.py#L361-L362
I suggest:
https://github.com/pytest-dev/pytest/pull/6986 will hopefully solve the pytest side, once i had a bit of time and peace of mind it was done very quickly
great. thank you.
went for this:
Keep in mind though that this is basically a regression in pytest: it wanted to deprecate a property (out of nowhere TBH), and hasn’t considered that some plugins like pytest-sugar might actually set this property. Therefore (https://github.com/pytest-dev/pytest/issues/6951) it is more a pytest bug after all.
While this is unfortunate in general and I can see that parents have less time currently, it is still like ~2 weeks already without ttis being fixed.
IMHO:
pytest-sugar is not in the camp of having to fix the above after all: it should only have to adjust to DeprectionWarnings (which might still be fatal, but that is another issue) - an attempt to issue a DeprecationWarning that breaks things is a bug in the one that tried to issue it. /cc @nicoddemus