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

DeprecationWarning: DocumentLS.async is deprecated; use DocumentLS.async_ #542

Closed
jbwdevries opened this issue Aug 6, 2020 · 3 comments
Closed

Comments

@jbwdevries
Copy link

Also, 'DeprecationWarning: Document.async is deprecated; use Document.async_'

venv/lib/python3.6/site-packages/pyfakefs/pytest_plugin.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.6/site-packages/pyfakefs/fake_filesystem_unittest.py:591: in setUp
    self._find_modules()
venv/lib/python3.6/site-packages/pyfakefs/fake_filesystem_unittest.py:559: in _find_modules
    for f, i, d in self._def_values(fct):
venv/lib/python3.6/site-packages/pyfakefs/fake_filesystem_unittest.py:507: in _def_values
    predicate=inspect.isfunction):
/usr/lib/python3.6/inspect.py:342: in getmembers
    value = getattr(object, key)
/usr/lib/python3.6/xml/dom/xmlbuilder.py:346: in __get__
    self.warn(cls)

The item being inspected is xml.dom.xmlbuilder.DocumentLS

test_foo.py:

def test_my_func(fs):
    assert True

requirements.txt:

pyfakefs==4.1.0
pytest==6.0.1
pytest-cov==2.9.0

Makefile:

setup:
	python3 -m venv venv
	venv/bin/python -m pip install -r requirements.txt

test:
	venv/bin/python -m pytest

python 3.6.9

@mrbean-bremen
Copy link
Member

Thanks for the report.

Hm, if some module issues a warning while inspecting one of its attributes, the only thing we can do here is just suppress all warnings, or at least deprecation warnings at this point, as we have no control over which modules are loaded.
This should be ok... I will probably check this over the weekend.

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Aug 8, 2020
@mrbean-bremen
Copy link
Member

@jbwdevries - shall be fixed in master, please check!

@jbwdevries
Copy link
Author

Yes, it's fixed, thank you!

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

No branches or pull requests

2 participants