Skip to content

Remove enum patches on Python 3.11#15531

Merged
seanbudd merged 1 commit intonvaccess:py311from
codeofdusk:remove-enum-patches
Sep 26, 2023
Merged

Remove enum patches on Python 3.11#15531
seanbudd merged 1 commit intonvaccess:py311from
codeofdusk:remove-enum-patches

Conversation

@codeofdusk
Copy link
Copy Markdown
Contributor

Link to issue number:

Partially reverts #12617.

Summary of the issue:

#12617 added a patched __new__ to work around a GC cycle in Python 3.7. However, on Python 3.11 and 3.12, this is no longer present.

Description of how this pull request fixes the issue:

Remove the patched method.

Testing strategy:

Tested that

  • On Python 3.7, the cyclic ref is present when the patched __new__ is removed.
  • On Python 3.11, no unreachable object error is reported in IA2 documents.
  • On Python 3.12, no unreachable object error is reported in IA2 documents.

Known issues with pull request:

None known

Change log entry:

None needed

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@codeofdusk codeofdusk requested a review from a team as a code owner September 26, 2023 20:27
@codeofdusk codeofdusk requested review from seanbudd and removed request for a team September 26, 2023 20:27
@seanbudd
Copy link
Copy Markdown
Member

The py311 branch is not ready yet, however, these fixes are not in conflict with expected changes

@seanbudd seanbudd merged commit 9927e81 into nvaccess:py311 Sep 26, 2023
@nvaccessAuto nvaccessAuto added this to the 2024.1 milestone Sep 26, 2023
seanbudd pushed a commit that referenced this pull request Sep 27, 2023
…sent in Python 3.11+. (#15531)

Partially reverts #12617.

Summary of the issue:
#12617 added a patched __new__ to work around a GC cycle in Python 3.7. However, on Python 3.11 and 3.12, this is no longer present.

Description of how this pull request fixes the issue:
Remove the patched method.

Testing strategy:
Tested that

On Python 3.7, the cyclic ref is present when the patched __new__ is removed.
On Python 3.11, no unreachable object error is reported in IA2 documents.
On Python 3.12, no unreachable object error is reported in IA2 documents.
@seanbudd seanbudd mentioned this pull request Sep 28, 2023
5 tasks
seanbudd added a commit that referenced this pull request Oct 18, 2023
Clean up of #15544

Summary of the issue:
from __future__ import annotations can be removed
gettext now supports pgettext and npgettext, NVDA's implementations can be abandoned
enum patches can be removed Remove enum patches on Python 3.11 #15531
Description of user facing changes
Should be none

Description of development approach
Straight forward code deprecation or implementation of noted comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants