Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import transfer_markers in pytest 4.1.0 #104

Closed
kradem opened this issue Jan 6, 2019 · 4 comments
Closed

Can't import transfer_markers in pytest 4.1.0 #104

kradem opened this issue Jan 6, 2019 · 4 comments
Labels

Comments

@kradem
Copy link

kradem commented Jan 6, 2019

from _pytest.python import transfer_markers

Env

pytest==4.1.0
pytest-asyncio==0.9.0

Output

Traceback (most recent call last):
  File "/home/kradem/.virtualenvs/project/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/config/__init__.py", line 61, in main
    config = _prepareconfig(args, plugins)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/config/__init__.py", line 196, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/hooks.py", line 284, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/helpconfig.py", line 93, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/config/__init__.py", line 652, in pytest_cmdline_parse
    self.parse(args)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/config/__init__.py", line 838, in parse
    self._preparse(args, addopts=addopts)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/config/__init__.py", line 784, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pluggy/manager.py", line 267, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 308, in load_module
    six.exec_(co, mod.__dict__)
  File "/home/kradem/.virtualenvs/project/lib/python3.6/site-packages/pytest_asyncio/plugin.py", line 8, in <module>
    from _pytest.python import transfer_markers
ImportError: cannot import name 'transfer_markers'
@kradem kradem changed the title Can't import transfer_markers in pytest 4.10 Can't import transfer_markers in pytest 4.1.0 Jan 6, 2019
@Tadaboody
Copy link
Contributor

Looks like transfer_markers was removed in pytest 4.1

@Tadaboody
Copy link
Contributor

There are docs on the marks revamp this was part of, with some instructions forward

@Tadaboody Tadaboody added the bug label Jan 6, 2019
yan12125 pushed a commit to yan12125/nvchecker that referenced this issue Jan 7, 2019
Workaround pytest-asyncio incompatibility with pytest 4.1 [1]

[1] pytest-dev/pytest-asyncio#104
adam-stokes pushed a commit to charmed-kubernetes/jenkins that referenced this issue Jan 7, 2019
Breaking changes in 4.1.0

pytest-dev/pytest-asyncio#104

Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
@cmin764
Copy link

cmin764 commented Jan 7, 2019

Confirmed with 4.1.0 and pytest-asyncio 0.9.0 on Python 3.7.2.

@Gr1N
Copy link

Gr1N commented Jan 7, 2019

Looks like issue fixed in master, any plans for release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants