GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove old deprecated unittest features · Issue #89325 · python/cpython

Remove old deprecated unittest features #89325

New issue
Copy link
New issue
Copy link
Closed
#92556
Closed
Remove old deprecated unittest features#89325
#92556
Copy link
Labels
3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@serhiy-storchaka
serhiy-storchaka
opened on Sep 10, 2021
Issue body actions
BPO 45162
Nosy @gpshead, @rbtcollins, @ezio-melotti, @voidspace, @serhiy-storchaka
PRs
  • bpo-45162: Remove many old deprecated unittest features #28268
  • bpo-45162: Revert "Remove many old deprecated unittest features" #30935
  • 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

    GitHub fields:

    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'

    bugs.python.org fields:

    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']

    Activity

    Next
    1. serhiy-storchaka commented on Sep 10, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Sep 10, 2021
      MemberAuthor
      More actions

      The proposed PR removes the following unittest features:

      • "fail*" and "assert*" aliases of TestCase methods.
      • Broken from start TestCase method assertDictContainsSubset().
      • Ignored TestLoader.loadTestsFromModule() parameter use_load_tests.
      • Old alias _TextTestResult of TextTestResult.

      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.

    2. serhiy-storchaka
      added
      type-featureA feature request or enhancementA feature request or enhancement
      3.11only security fixesonly security fixes
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Sep 10, 2021
    3. serhiy-storchaka commented on Sep 17, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Sep 17, 2021
      MemberAuthor
      More actions

      New changeset b0a6ede by Serhiy Storchaka in branch 'main':
      bpo-45162: Remove many old deprecated unittest features (GH-28268)
      b0a6ede

    4. serhiy-storchaka
      closed this as completedon Sep 17, 2021
    5. serhiy-storchaka
      closed this as completedon Sep 17, 2021
    6. gpshead commented on Jan 26, 2022

      @gpshead
      gpshead
      on Jan 26, 2022
      Member
      More actions

      Per https://mail.python.org/archives/list/[email protected]/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.

    7. gpshead
      reopened this on Jan 26, 2022
    8. gpshead
      added
      deferred-blocker
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      and removed
      type-featureA feature request or enhancementA feature request or enhancement
      on Jan 26, 2022
    9. 11 remaining items

    10. ezio-melotti
      moved this to Deferred Blocker in Release and Deferred blockers 🚫on Apr 14, 2022
    11. pablogsal commented on May 9, 2022

      @pablogsal
      pablogsal
      on May 9, 2022
      Member
      More actions

      ⚠️ This issue has been updated from 'deferred-blocker' to 'release blocker' as we are past beta1. This issue will block the next release (Python 3.11.0 beta 2). ⚠️

    12. pablogsal
      added
      release-blocker
      and removed
      deferred-blocker
      on May 9, 2022
    13. serhiy-storchaka
      added
      3.12only security fixesonly security fixes
      and removed
      release-blocker
      3.11only security fixesonly security fixes
      on May 9, 2022
    14. serhiy-storchaka commented on May 9, 2022

      @serhiy-storchaka
      serhiy-storchaka
      on May 9, 2022
      MemberAuthor
      More actions

      It is not a blocker at all. The changes were moved from 3.11 to 3.12.

      Reacted by Pablo Galindo Salgado and Gregory P. Smith
    15. ezio-melotti
      removed this from Release and Deferred blockers 🚫on May 10, 2022
    16. serhiy-storchaka
      added this to Unittest & doctest issueson May 20, 2022
    17. serhiy-storchaka
      closed this as completedin #92556on Jun 26, 2022
    18. serhiy-storchaka
      moved this to Done in Unittest & doctest issueson Jun 26, 2022
    19. hroncok
      added a commit that references this issue on May 17, 2023

      Update unittest asserts to support Python 3.12+

      44ee235
    20. arkamar
      added a commit that references this issue on May 31, 2023

      Refactor failIf to assertFalse for Python 3.12 Compatibility

      7bb62a1
    21. 4383
      added a commit that references this issue on Dec 15, 2023

      Fixes Python 3.12 compatilibity #817

      e51f72a
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      • Unittest & doctest issues
        Status
        Done
        Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.