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

Fix DeprecationWarnings in unittest.* #143

Closed
76 tasks
sallner opened this issue Apr 13, 2022 · 3 comments
Closed
76 tasks

Fix DeprecationWarnings in unittest.* #143

sallner opened this issue Apr 13, 2022 · 3 comments

Comments

@sallner
Copy link
Member

sallner commented Apr 13, 2022

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

As reported in zopefoundation/zope.security#83, changes made in python/cpython#28382 are raising a range of DeprecationWarnings.

What I did:

tox -epy311
See also zopefoundation/zope.security#83 (comment)

What to do:

Fix the issue maybe with help of pre-commit and pyupgrade after this proposal is implemented asottile/pyupgrade#631

Fix the DeprecationWarnings in:

What version of Python and Zope/Addons I am using:

Python 3.11a6

@icemac icemac changed the title Fix DeprecatioonWarnings in unittest.* Fix DeprecationWarnings in unittest.* Apr 13, 2022
@mauritsvanrees
Copy link
Member

mauritsvanrees commented Apr 16, 2022

Speaking from memory, I think the whole def test_suite can be removed, except maybe in very special cases. Also in Python 2.7.

@icemac
Copy link
Member

icemac commented Apr 22, 2022

Speaking from memory, I think the whole 'def test_suite' can be removed, except maybe in very special cases. Also in Python 2.7.

It depends: zope.testrunner has an auto-detect feature for unittest subclasses, but we still need test_suite for doctests. So in most of the cases test_suite could be removed.

@icemac
Copy link
Member

icemac commented Apr 20, 2023

This issue should have been fixed by running meta/drop-legacy-python.py as it runs pyupgrade.

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

No branches or pull requests

3 participants