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

Update comtypes to version 1.4.6 #17061

Merged
merged 8 commits into from
Aug 29, 2024
Merged

Conversation

LeonarddeR
Copy link
Collaborator

@LeonarddeR LeonarddeR commented Aug 27, 2024

Link to issue number:

None

Summary of the issue:

There have been many updates to Comtypes since last time we updated.

Description of user facing changes

None

Description of development approach

  • Updated comtypes to 1.4.6.
  • Updated the UIAutomation comtypes wrapper.

Testing strategy:

Should be tested during daily use.

Known issues with pull request:

None known

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.

Summary by CodeRabbit

  • New Features

    • Updated the Comtypes library to version 1.4.6, enhancing functionality and performance.
    • Introduced new enumerations in UI automation to improve type safety and code clarity.
  • Bug Fixes

    • Improved import structure in UIAutomationClient.py for better reliability.
  • Documentation

    • Added notes on breaking changes in the Add-on API, advising developers to re-test and update their Add-ons.

@LeonarddeR LeonarddeR added the merge-early Merge Early in a developer cycle label Aug 27, 2024
@LeonarddeR LeonarddeR marked this pull request as ready for review August 27, 2024 07:53
@LeonarddeR LeonarddeR requested a review from a team as a code owner August 27, 2024 07:53
Copy link
Contributor

coderabbitai bot commented Aug 27, 2024

Walkthrough

The recent updates involve modifications to the requirements.txt file, upgrading the comtypes library version from 1.2.0 to 1.4.6. The UIAutomationClient.py file has undergone significant enhancements, including a direct import structure and the introduction of new classes using the IntFlag enumeration for better clarity. Additionally, the comtypesMonkeyPatches.py file has updated copyright years and restructured an import statement. A breaking change for the Add-on API is also noted in the documentation.

Changes

Files Change Summary
requirements.txt Updated comtypes version from 1.2.0 to 1.4.6.
source/comInterfaces/UIAutomationClient.py Replaced import mechanism, defined multiple new classes using IntFlag for UI automation states and options.
source/monkeyPatches/comtypesMonkeyPatches.py Updated copyright notice to 2009-2024; modified import of _compointer_base from comtypes to comtypes._post_coinit.unknwn.
user_docs/en/changes.md Noted breaking change for Add-on API compatibility, requiring developers to re-test and update their manifests; mentioned update to comtypes version 1.4.6.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

coderabbitai bot commented Aug 27, 2024

Oops, something went wrong! Please try again later. 🐰 💔

@LeonarddeR
Copy link
Collaborator Author

@coderabbitai you'wrote:

Added notes on breaking changes in the Add-on API, advising developers to re-test and update their Add-ons.

You're erroneously suggesting that this info is part of this pr.

Copy link
Contributor

coderabbitai bot commented Aug 27, 2024

Tip

For best results, initiate chat on the files or code changes.

@LeonarddeR, my apologies for the mistake. I incorrectly suggested that the PR includes notes on breaking changes in the Add-on API. Thank you for pointing this out, and I will ensure that this error is not repeated in the future.


Learnings added
Learnt from: LeonarddeR
URL: https://github.com/nvaccess/nvda/pull/17061

Timestamp: 2024-08-27T16:21:18.344Z
Learning: Ensure that the AI-generated summary accurately reflects the changes in the PR and does not include erroneous information, such as suggesting breaking changes in the Add-on API when they are not part of the PR.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@seanbudd
Copy link
Member

How are these files generated / where are you adding them from? can you please add this to the dev approach and/or docs somewhere

@LeonarddeR
Copy link
Collaborator Author

Any suggestions where I should add this?

@seanbudd
Copy link
Member

@LeonarddeR either in projectDocs\dev\createDevEnvironment.md or in a separate doc referenced by this

@seanbudd
Copy link
Member

seanbudd commented Aug 28, 2024

Actually, probably source\comInterfaces\readme.md but please add a reference to it from projectDocs\dev\createDevEnvironment.md

@LeonarddeR
Copy link
Collaborator Author

That file reads:

Only UIAutomation.py is not generated, UIA has historically been updated regularly and the version on
Appveyor build servers could not be guaranteed.

I wonder whether we should reconsider this position for two reasons:

  1. It has been quite some time since this wrapper needed an update
  2. I'm pretty sure Server 2022 has the right version on board.

@LeonarddeR
Copy link
Collaborator Author

Note that you suggested this in #15522 (comment), but then @lukaszgo1 pointed out in #15522 (review) that Server 2019 contained an outdated version. However, appveyor is on server 2022 now.

@AppVeyorBot
Copy link

See test results for failed build of commit cfb74ff2c6

@seanbudd seanbudd added the blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. label Aug 29, 2024
@seanbudd
Copy link
Member

@LeonarddeR - you are right, as far as we are aware the UIA interface should be fairly stable now. Lets use AppVeyor now

@seanbudd seanbudd removed the blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. label Aug 29, 2024
@seanbudd
Copy link
Member

Can you please fix up the git excludes and ruff format?

https://results.pre-commit.ci/run/github/45885732/1724844260.36kQ5pFwQpmFQXxO-uMqNw

@seanbudd seanbudd merged commit c23aed9 into nvaccess:master Aug 29, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-early Merge Early in a developer cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants