pytest-dev / pytest-twisted

test twisted code with pytest
BSD 3-Clause "New" or "Revised" License
46 stars 24 forks source link

Twisted 24.7 is deprecating twisted.internet.defer.returnValue #183

Open hynek opened 4 months ago

hynek commented 4 months ago

When running a test suite under Twisted 24.7.0rc1, I get a lot of:

pytest_twisted.py:424: DeprecationWarning: twisted.internet.defer.returnValue was deprecated in Twisted 24.7.0rc1; please use standard return statement instead

Looks like it's used in two places:

https://github.com/pytest-dev/pytest-twisted/blob/23ba22090eb5d53c9a51f01c5ce61a3246fbe43e/pytest_twisted.py#L424

and

https://github.com/pytest-dev/pytest-twisted/blob/23ba22090eb5d53c9a51f01c5ce61a3246fbe43e/pytest_twisted.py#L338

altendky commented 3 months ago

Thanks for the heads up on this. I just last night got back from a two week vacation. With https://github.com/pytest-dev/pytest-twisted/pull/184#issuecomment-2282914368 in mind, any opinions? Or, if you use pytest-twisted somewhere, could you check if this breaks everything for you?

jpmckinney commented 3 months ago

I only use non-end-of-life Python versions, and a plain return works in those versions.

altendky commented 2 months ago

I blazed my own path and (after forgetting for a couple weeks, sorry) just published https://pypi.org/project/pytest-twisted/1.14.3/.