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

Deprecate testtools support #2156

Open
vytas7 opened this issue Jul 14, 2023 · 6 comments · May be fixed by #2405
Open

Deprecate testtools support #2156

vytas7 opened this issue Jul 14, 2023 · 6 comments · May be fixed by #2405
Labels
community documentation good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks!
Milestone

Comments

@vytas7
Copy link
Member

vytas7 commented Jul 14, 2023

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
Copy link
Member Author

vytas7 commented Jul 14, 2023

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
Copy link
Member

CaselIT commented Jul 16, 2023

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

@kgriffs
Copy link
Member

kgriffs commented Jul 20, 2023

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
Copy link
Member Author

vytas7 commented Oct 7, 2024

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.

@vytas7 vytas7 added good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! labels Oct 7, 2024
@vytas7 vytas7 changed the title Drop testtools support? Deprecate testtools support Oct 7, 2024
EricGoulart added a commit to EricGoulart/falcon that referenced this issue Nov 10, 2024
Remove conditional dependency on testtools in TestCase to simplify maintenance and prepare for
Falcon 5.0 where testtools will no longer be supported. Instead, unittest is now the default,
and users are encouraged to use pytest for testing Falcon applications. This change emits a
deprecation warning if testtools is still enabled via environment variables.

BREAKING CHANGE: testtools support is deprecated and scheduled for removal in Falcon 5.0.

Closes falconry#2156
@EricGoulart
Copy link
Contributor

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.

EricGoulart added a commit to EricGoulart/falcon that referenced this issue Nov 10, 2024
Remove conditional dependency on testtools in TestCase to simplify maintenance and prepare for
Falcon 5.0 where testtools will no longer be supported. Instead, unittest is now the default,
and users are encouraged to use pytest for testing Falcon applications. This change emits a
deprecation warning if testtools is still enabled via environment variables.

Closes falconry#2156
@vytas7
Copy link
Member Author

vytas7 commented Nov 10, 2024

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 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community documentation good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks!
Projects
None yet
4 participants