PyPy 3.8 nightly breaks Trio deprecation module
With the latest PyPy 3.8 nightly, Trio test suite breaks with:
________________________ test_module_with_deprecations _________________________
recwarn_always = WarningsRecorder(record=True)
def test_module_with_deprecations(recwarn_always):
assert module_with_deprecations.regular == "hi"
assert len(recwarn_always) == 0
filename, lineno = _here()
> assert module_with_deprecations.dep1 == "value1"
E AttributeError: module 'trio.tests.module_with_deprecations' has no attribute 'dep1'
I bisected, and this is caused by c63bab7cb045 (cc @cfbolz).
Please find attached repro_deprecation_bug.zip. To reproduce, unzip it, pip install attrs pytest
and run pytest
. It fails like this:
____________________________________________ test_module_with_deprecations ____________________________________________
recwarn_always = WarningsRecorder(record=True)
> ???
E AttributeError: module 'repro.module_with_deprecations' has no attribute 'dep1'