falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.53k stars 945 forks source link

Deprecate `testtools` support #2156

Open vytas7 opened 1 year ago

vytas7 commented 1 year ago

At the time of writing, our documentation might give an impression that using testtools is the preferred way to write tests for a Falcon app.

I haven't done any research or survey in the area, but just subjectively it feels that the most popular testing frameworks in 2023 are pytest followed by the stdlib's unittest (both are also well supported by Falcon). Moreover, IIRC I had to exclude testtools from our test dependencies when adding Python 3.10 CI gates, since it wasn't 3.10-ready by the time. So it's becoming a maintenance burden, too.

OTOH, it seems that there has been a new testtools release, and the project is still maintained. So after all maybe it doesn't hurt to keep the integration?

Even if we decide to keep testtools, we should IMHO reword the docs not to give the impression it is the preferred way, and link to our tutorial for using pytest in the same paragraph.

vytas7 commented 1 year ago

Another option is to drop testtools, but leave an escape hatch via an envvar along the lines of Custom HTTP Methods if anyone is still using that.

CaselIT commented 1 year ago

I have no opinion on this, either way works for me

kgriffs commented 1 year ago

I don't think we need to keep supporting it. It's a minor convenience left over from early OpenStack days for a very small community relative to the broader python ecosystem.

vytas7 commented 1 month ago

We won't be able to fully drop it until 5.0, but we should emit a deprecation warning whenever the TestCase is rebased on top of testtools.TestCase, and add an escape hatch via an envvar to be able to import a custom testcase base.

EricGoulart commented 1 week ago

I’m sorry for the mistake with my previous pull request. I realize now that this wasn’t the correct process, and I apologize for any inconvenience it may have caused. I’m currently in the process of fixing this and will submit the pull request the correct way.

vytas7 commented 1 week ago

No worries @EricGoulart, and thanks for your interest in contributing to this issue! These mistakes do no real harm except a notification or two in our mailboxes, which is not the end of the world :sweat_smile: