-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
No longer require pyWin32 #9639
Conversation
I think add-on developers currently rely on our inclusion of pyWin32, also we have an updated dependency ready to go: nvaccess/pywin32-bin#1 We may still want to remove pyWin32, but we should talk about what this will mean for add-on authors first, as well as consider other risks. |
hello
most things could be rewritten using ctypes and corresponding libs, so
i don't think there could be too much to worry.
…On 5/30/19, Reef Turner ***@***.***> wrote:
I think add-on developers currently rely on our inclusion of pyWin32, also
we have an updated dependency ready to go:
nvaccess/pywin32-bin#1
We may still want to remove pyWin32, but we should talk about what this will
mean for add-on authors first, as well as consider other risks.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#9639 (comment)
--
with best regards beqa
|
|
||
GMEM_MOVEABLE=2 | ||
|
||
class HGLOBAL(HANDLE): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a short descriptive doc string here?
source/winUser.py
Outdated
# But make sure not to free the memory accidentally -- it is not ours | ||
h=winKernel.HGLOBAL(h,autoFree=False) | ||
with h.lock() as addr: | ||
if addr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if not addr
?
I think that most add-ons that utilize pywin32 use win32con. There is also an explicit requirement in setup.py to include win32api, see #7642. If we decide to keep win32con and win32api, I'm fine with that. I really like getting rid of win32com, though. |
It looks like this failed building because PyGetWindow did not install properly for system tests. |
Since we are breaking all add-ons anyway, and there are easy ways to
replace win32api now with ctypes, I don't see the need for keeping
pyWin32 modules as a dependency for the sake of add-on developers.
However, if the consensus is to keep them for add-ons, I still feel that
we should stop relying on them in NVDA core. Mixing comtypes and
pythoncom is very confusing, similarly ctypes. And surely one less
dependency is always a good thing, when it comes to security updates etc.
|
@michaelDCurran commented on 31 May 2019, 11:54 CEST:
Agreed
We could consider keeping win32con, but it feels slightly weird to keep a file with constants only for the sake of add-ons. Furthermore, add-ons can easily bundle it themselves. |
@LeonarddeR Are there any pending review actions from you I need to address? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the reference to win32api from setup.py as well? AFter that, feel free to merge
Ah that has trashed focus highlight version 6 then This taken from the
threshold snap.
ERROR - globalPluginHandler.listPlugins (20:12:35.267):
Error importing global plugin focusHighlight
Traceback (most recent call last):
File "globalPluginHandler.pyc", line 22, in listPlugins
File "C:\nvda test
folder\userConfig\addons\focusHighlight\globalPlugins\focusHighlight.py",
line 30, in <module>
ImportError: No module named win32con
DEBUG - core.main (20:12:35.286):
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal E-mail to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
Newsgroup monitored: alt.comp.blind-users
-----
|
This is expected, add-ons need to be updated.
|
Viewing the moves of add on writers to update many that are used widely, I
think anything that can ease the work a bit and not upset users when the new
version appears is perhaps a good thing here, Also do any of the legacy app
modules use it that might break things?
It seems a lot of add on authors are rather too busy now to update their
add ons and I wonder how many have the ability or inclination to update
somebody elses code fast enough?
Just thinking aloud.
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal E-mail to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
Newsgroup monitored: alt.comp.blind-users
-----
|
In a perfect world yes, but this is not one of those.
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal E-mail to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
Newsgroup monitored: alt.comp.blind-users
----- Original Message -----
From: "Leonard de Ruijter" <notifications@github.com>
To: "nvaccess/nvda" <nvda@noreply.github.com>
Cc: "Brian Gaff" <bglists@blueyonder.co.uk>; "Comment"
<comment@noreply.github.com>
…Sent: Monday, June 03, 2019 8:53 PM
Subject: Re: [nvaccess/nvda] No longer require pyWin32 (#9639)
This is expected, add-ons need to be updated.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#9639 (comment)
|
This pull request is closed, and I don't think this is the right place to discuss implications for add-on authors. Please use the development list for this if you really think it is necessary that this should be reconsidered. Again, authors will have to update their add-ons in any case, with or without this change. |
By performing pip freeze in the NVDA virtual environment, it appears we no longer use or depend on the library pywin32 - #9639 Pywin32 also has changed licence to the Python Software Foundation licence which is also included in our license file. Therefore, we should remove this custom license from our licence.
By performing pip freeze in the NVDA virtual environment, it appears we no longer use or depend on the library pywin32 - nvaccess#9639 Pywin32 also has changed licence to the Python Software Foundation licence which is also included in our license file. Therefore, we should remove this custom license from our licence.
By performing pip freeze in the NVDA virtual environment, it appears we no longer use or depend on the library pywin32 - nvaccess#9639 Pywin32 also has changed licence to the Python Software Foundation licence which is also included in our license file. Therefore, we should remove this custom license from our licence.
By performing pip freeze in the NVDA virtual environment, it appears we no longer use or depend on the library pywin32 - nvaccess#9639 Pywin32 also has changed licence to the Python Software Foundation licence which is also included in our license file. Therefore, we should remove this custom license from our licence.
Link to issue number:
None.
Summary of the issue:
Since 2006 NVDA has relied on the pyWin32 package for particular things such as some Windows constants, certain COM interfaces, and clipboard functionality.
However, over the years we have replaced much of the code that relies on pyWin32, except for a small particular code paths.
Description of how this pull request fixes the issue:
this pr totally removes the requirement for pyWin32 by doing the following:
Testing performed:
Known issues with pull request:
None.
Change log entry:
changes for developers: