Remove old deprecated unittest features #89325
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee = None closed_at = None created_at = <Date 2021-09-10.10:15:06.032> labels = ['deferred-blocker', 'type-bug', 'library', '3.11'] title = 'Remove old deprecated unittest features' updated_at = <Date 2022-01-27.04:40:24.789> user = 'https://github.com/serhiy-storchaka'
activity = <Date 2022-01-27.04:40:24.789> actor = 'gregory.p.smith' assignee = 'none' closed = False closed_date = None closer = None components = ['Library (Lib)'] creation = <Date 2021-09-10.10:15:06.032> creator = 'serhiy.storchaka' dependencies =  files =  hgrepos =  issue_num = 45162 keywords = ['patch'] message_count = 4.0 messages = ['401568', '402033', '411808', '411838'] nosy_count = 5.0 nosy_names = ['gregory.p.smith', 'rbcollins', 'ezio.melotti', 'michael.foord', 'serhiy.storchaka'] pr_nums = ['28268', '30935'] priority = 'deferred blocker' resolution = None stage = 'patch review' status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue45162' versions = ['Python 3.11']
The text was updated successfully, but these errors were encountered:
The proposed PR removes the following unittest features:
Most features were deprecated in 3.2, "fail*" methods in 3.1, assertNotRegexpMatches in 3.5. They were kept mostly for compatibility with 2.7 (although some of them were new in Python 3 and not compatible with 2.7).
Using deprecated assertEquals instead of assertEqual is a common error which we need to fix regularly, so removing deprecated features will not only make the current code clearer, but save as from future errors.
Per https://email@example.com/thread/GJTREADEXYAETECE5JDTPYWK4WMTKYGR/ we want to revert this change for 3.11 as it causes adoption pain for little benefit.
To determine if we should proceed with this in 3.12 or future versions, run a stable Python with this change applied on the test suites of external projects to find regressions. (many will have been addressed by then thanks to the work by RedHat)
and remember that those are only open source projects. Peoples internal codebases are full of use of these names and this will prevent upgrading until they take the time to address those.
There are targeted pieces of this change that may make sense to go forward with individually. But it is easier to reason about after a rollback and consider new PRs to move those forward.