Skip to content

Update to Python 3.11#15544

Merged
seanbudd merged 33 commits into
masterfrom
py311-min
Oct 16, 2023
Merged

Update to Python 3.11#15544
seanbudd merged 33 commits into
masterfrom
py311-min

Conversation

@seanbudd

@seanbudd seanbudd commented Sep 28, 2023

Copy link
Copy Markdown
Member

Link to issue number:

Closes #12064
Closes #12551
Closes #15577
Closes #15167

Summary of the issue:

Python needs to be updated to 3.11, as Python 3.7 is EOL.
Python pip dependencies need to be updated to match the python upgrade.
typing_extensions is no longer needed.

Description of user facing changes

Performance and security enhancements from dependency upgrades.

Description of development approach

  • Updates python in build scripts
  • Updates pip dependencies
  • Set Windows 8.1 (Blue) as minimum windows version
  • Update references to python and windows version in docs
  • nose is replaced by the unittest module with xmlrunner to generate XML test output
  • drop python optimization to level 0 from level 1. level 1 removes asserts.

Testing strategy:

Alpha testing required

Known issues with pull request:

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.

@seanbudd seanbudd mentioned this pull request Sep 28, 2023
5 tasks
@codeofdusk

This comment was marked as resolved.

@AppVeyorBot

This comment was marked as resolved.

@seanbudd

This comment was marked as resolved.

@seanbudd seanbudd marked this pull request as draft September 28, 2023 03:25
Comment thread user_docs/en/changes.t2t Outdated

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really love to see this flying!
Before this is merged, I'd like to suggest changing the launcher nsis script so that it has Windows 8.1 as the minimum required version as well.

Comment thread requirements.txt Outdated
Comment thread nvdaHelper/readme.md
@AppVeyorBot

This comment was marked as resolved.

@AppVeyorBot

This comment was marked as resolved.

@AppVeyorBot

This comment was marked as resolved.

Comment thread requirements.txt Outdated
Comment thread requirements.txt Outdated
Comment thread requirements.txt
Comment thread source/setup.py
Comment thread user_docs/en/userGuide.t2t Outdated
@seanbudd

Copy link
Copy Markdown
Member Author

Hi all, this is still a draft PR

@seanbudd

seanbudd commented Oct 2, 2023

Copy link
Copy Markdown
Member Author

Before this is merged, I'd like to suggest changing the launcher nsis script so that it has Windows 8.1 as the minimum required version as well.

@LeonarddeR

As far as I am aware nvdaLauncher.nsi doesn't check Windows versions

@AppVeyorBot

This comment was marked as resolved.

@LeonarddeR

Copy link
Copy Markdown
Collaborator

@seanbudd Would it be possible to provide a signed try build?

@seanbudd seanbudd marked this pull request as draft October 12, 2023 02:26
Fix-up of #15513 #15514 .

Description of how this pull request fixes the issue:
Add @codeofdusk attributions for Python 3.11 upgrade
@seanbudd

Copy link
Copy Markdown
Member Author

@LeonarddeR

LeonarddeR commented Oct 12, 2023

Copy link
Copy Markdown
Collaborator

Thanks for the try build @seanbudd
From my first observations, all seems to work smoothly. That said, it looks like the garbage handler kicks in more often with errors like this:

Log snipped WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Garbage collector has found one or more unreachable objects. See further warnings for specific objects. Stack trace: File "nvda.pyw", line 399, in File "core.pyc", line 813, in main File "wx\core.pyc", line 2262, in MainLoop File "wx\core.pyc", line 3427, in File "core.pyc", line 746, in processRequest File "core.pyc", line 762, in Notify File "queueHandler.pyc", line 97, in pumpAll File "queueHandler.pyc", line 64, in flushQueue File "eventHandler.pyc", line 84, in _queueEventCallback File "eventHandler.pyc", line 322, in executeEvent File "eventHandler.pyc", line 355, in doPreGainFocus File "api.pyc", line 163, in setFocusObject File "treeInterceptorHandler.pyc", line 50, in update File "NVDAObjects\__init__.pyc", line 430, in _get_treeInterceptor File "treeInterceptorHandler.pyc", line 42, in getTreeInterceptor File "NVDAObjects\IAccessible\chromium.pyc", line 84, in __contains__ File "comtypes\_memberspec.pyc", line 482, in __call__ File "comtypes\client\__init__.pyc", line 47, in wrap_outparam File "comtypes\client\__init__.pyc", line 100, in GetBestInterface File "comtypes\client\dynamic.pyc", line 29, in Dispatch File "comtypes\automation.pyc", line 776, in GetTypeInfo File "monkeyPatches\comtypesMonkeyPatches.pyc", line 157, in newGetTypeInfo File "monkeyPatches\comtypesMonkeyPatches.pyc", line 31, in __call__ File "monkeyPatches\comtypesMonkeyPatches.pyc", line 128, in newCpbDel File "garbageHandler.pyc", line 67, in notifyObjectDeletion WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.115) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.116) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.117) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object WARNING - garbageHandler.notifyObjectDeletion (08:34:36.118) - MainThread (17080): Deleting unreachable object ERROR - garbageHandler._collectionCallback (08:34:36.119) - MainThread (17080): Found at least 40 unreachable objects in run

This was observed when arrowing through the list of chats in Teams 2.0.

I think we need to investigate what changes happend to garbage collection. It somehow looks like newer Python 3 is better in detecting abandoned objects itself.

@seanbudd

Copy link
Copy Markdown
Member Author

@LeonarddeR @codeofdusk - these minor issues will have to be handled in a separate issue/PR, once this has been merged

@seanbudd seanbudd marked this pull request as ready for review October 15, 2023 22:44

@michaelDCurran michaelDCurran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to get maximum testing, I would recommend merging this sooner than later, acknowledging though that brlTTY support is currently not functional and a fix may still be some time away. We should not however branch for beta until a new brlAPI module compatible with Python 3.11 is available of course.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dropping Windows 7 support: Remove nvda_eoaProxy Update wx for 2024.1 Task: Update to latest (most appropriate) version of Python

7 participants