Twisted endpoints introduce a dependency on pywin32 #2028

Closed
opened 2013-07-17 14:49:34 +00:00 by daira · 15 comments
daira commented 2013-07-17 14:49:34 +00:00
Owner

In #1274 we managed to eliminate Tahoe's problematic dependency on pywin32, which significantly complicated building on Windows. However this dependency seems to have crept in again via Twisted's endpoints code:

On 10/07/13 18:44, Mike Nation wrote:
>      File "C:\tahoe\support\Lib\site-packages\twisted-12.3.0-py2.7-win-amd64.egg\twisted\internet\endpoints.py", line 25, in <module>
>     from twisted.internet import stdio
>      File "C:\tahoe\support\Lib\site-packages\twisted-12.3.0-py2.7-win-amd64.egg\twisted\internet\stdio.py", line 28, in <module>
>     from twisted.internet import _win32stdio
>      File "C:\tahoe\support\Lib\site-packages\twisted-12.3.0-py2.7-win-amd64.egg\twisted\internet\_win32stdio.py", line 7, in <module>
>     import win32api
>
> exceptions.ImportError: No module named win32api
>
> Failed to load application: No module named win32api

Note that we probably didn't detect this earlier because of #1334.

In #1274 we managed to eliminate Tahoe's problematic dependency on pywin32, which significantly complicated building on Windows. However this dependency seems to have crept in again via Twisted's endpoints code: ``` On 10/07/13 18:44, Mike Nation wrote: > File "C:\tahoe\support\Lib\site-packages\twisted-12.3.0-py2.7-win-amd64.egg\twisted\internet\endpoints.py", line 25, in <module> > from twisted.internet import stdio > File "C:\tahoe\support\Lib\site-packages\twisted-12.3.0-py2.7-win-amd64.egg\twisted\internet\stdio.py", line 28, in <module> > from twisted.internet import _win32stdio > File "C:\tahoe\support\Lib\site-packages\twisted-12.3.0-py2.7-win-amd64.egg\twisted\internet\_win32stdio.py", line 7, in <module> > import win32api > > exceptions.ImportError: No module named win32api > > Failed to load application: No module named win32api ``` Note that we probably didn't detect this earlier because of #1334.
tahoe-lafs added the
packaging
normal
defect
1.10.0
labels 2013-07-17 14:49:34 +00:00
tahoe-lafs added this to the undecided milestone 2013-07-17 14:49:34 +00:00
daira commented 2013-07-17 14:53:14 +00:00
Author
Owner
This would be fixed by <http://twistedmatrix.com/trac/ticket/6032>.
daira commented 2013-07-17 14:59:24 +00:00
Author
Owner

Workaround: manually install the pywin32 package from http://sourceforge.net/projects/pywin32/files/. Make sure to get the correct file for the version of Python you are using -- e.g. ending in "py2.7.exe" for Python v2.7. If using 64-bit Windows, the file should have "win-amd64" in its name.

Workaround: manually install the pywin32 package from <http://sourceforge.net/projects/pywin32/files/>. Make sure to get the correct file for the version of Python you are using -- e.g. ending in "py2.7.exe" for Python v2.7. If using 64-bit Windows, the file should have "win-amd64" in its name.
daira commented 2014-02-20 22:19:06 +00:00
Author
Owner

Options:

  1. Update source:docs/quickstart.rst to point to downloads of pywin32 (and describe how to select the right one). We used to have this information; adding it back is a usability regression.
  2. Build eggs of pywin32 for 32-bit and 64-bit Python 2.7, and make sure they are used by a quickstart build. This may be hampered by #142.
  3. Submit a patch to Twisted to remove the hard dependency on pywin32. Update source:src/allmydata/_auto_deps.py to allow only versions of Twisted that don't have the hard dependency (either before endpoints, or after the fix), when running on Windows.
  4. Update source:src/allmydata/_auto_deps.py to allow only versions of Twisted that are before endpoints, when running on Windows.
Options: 1. Update source:docs/quickstart.rst to point to downloads of pywin32 (and describe how to select the right one). We used to have this information; adding it back is a usability regression. 2. Build eggs of pywin32 for 32-bit and 64-bit Python 2.7, and make sure they are used by a quickstart build. This may be hampered by #142. 3. Submit a patch to Twisted to remove the hard dependency on pywin32. Update source:src/allmydata/_auto_deps.py to allow only versions of Twisted that don't have the hard dependency (either before endpoints, or after the fix), when running on Windows. 4. Update source:src/allmydata/_auto_deps.py to allow only versions of Twisted that are before endpoints, when running on Windows.

Let's do option 4 now, and then work on option 3.

Let's do option 4 now, and then work on option 3.
daira commented 2014-02-21 22:34:10 +00:00
Author
Owner
~~Please review <https://github.com/tahoe-lafs/tahoe-lafs/commit/228b5ef7dbcd56ff57c9a614c75df74a1c6ca0e1>.~~
daira commented 2014-02-21 22:39:27 +00:00
Author
Owner
~~Correction: <https://github.com/tahoe-lafs/tahoe-lafs/commit/0c81c6e22bdcb641ab9eb6c9cef0d78ad5e2ec00>.~~
daira commented 2014-02-21 22:48:25 +00:00
Author
Owner
Correction: <https://github.com/tahoe-lafs/tahoe-lafs/commit/d888b28b715020e879a52f5159b6e14c7dcab6b8>.
tahoe-lafs modified the milestone from undecided to 1.11.0 2014-05-23 15:08:22 +00:00

I think the dependency on pywin32 is part of, or even maybe most of, #1093 (win32 build hell).

I think the dependency on pywin32 is part of, or even maybe most of, #1093 (win32 build hell).

This interacts with https://github.com/twisted/nevow/issues/43 (why does Nevow depend on Twisted >= 13.0?).

This interacts with <https://github.com/twisted/nevow/issues/43> (why does Nevow depend on Twisted >= 13.0?).
daira commented 2014-08-30 00:09:41 +00:00
Author
Owner

The combination of this problem, #2193, and #2249, are making it almost impossible to install or build on Windows :-(

The combination of this problem, #2193, and #2249, are making it almost impossible to install or build on Windows :-(
Daira Hopwood <daira@jacaranda.org> commented 2014-10-08 11:45:57 +00:00
Author
Owner

In /tahoe-lafs/trac-2024-07-25/commit/b0b76a7c5b89c3fed5a65ef6732dc45e578f12f4:

Improve comments in _auto_deps.py. refs #2249, #2028, #2193, #2005, #1258

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
In [/tahoe-lafs/trac-2024-07-25/commit/b0b76a7c5b89c3fed5a65ef6732dc45e578f12f4](/tahoe-lafs/trac-2024-07-25/commit/b0b76a7c5b89c3fed5a65ef6732dc45e578f12f4): ``` Improve comments in _auto_deps.py. refs #2249, #2028, #2193, #2005, #1258 Signed-off-by: Daira Hopwood <daira@jacaranda.org> ```
daira commented 2014-10-08 11:53:06 +00:00
Author
Owner

Fixed by ec188d254cbb77204d1898d6a0dd8727e0f9bd6d/trunk, kind-of, but only by excluding Twisted >= 12.2.0 on Windows. We should revisit this if the upstream http://twistedmatrix.com/trac/ticket/6032 is fixed.

Fixed by ec188d254cbb77204d1898d6a0dd8727e0f9bd6d/trunk, kind-of, but only by excluding Twisted >= 12.2.0 on Windows. We should revisit this if the upstream <http://twistedmatrix.com/trac/ticket/6032> is fixed.
tahoe-lafs added the
fixed
label 2014-10-08 11:53:06 +00:00
daira closed this issue 2014-10-08 11:53:06 +00:00
daira commented 2015-10-29 00:44:14 +00:00
Author
Owner

Magic Folder requires Twisted >= 15.2.0, so we can no longer use the above workaround once that is landed.

http://twistedmatrix.com/trac/ticket/6032 shows no sign of progress. Note that the pypiwin32 package mentioned there is a wheel distribution, therefore not compatible with zetuptoolz.

Magic Folder requires Twisted >= 15.2.0, so we can no longer use the above workaround once that is landed. <http://twistedmatrix.com/trac/ticket/6032> shows no sign of progress. Note that the pypiwin32 package mentioned there is a wheel distribution, therefore not compatible with zetuptoolz.
tahoe-lafs removed the
fixed
label 2015-10-29 00:44:14 +00:00
daira reopened this issue 2015-10-29 00:44:14 +00:00
daira commented 2015-10-29 00:53:35 +00:00
Author
Owner

See also #2044 and #2077.

See also #2044 and #2077.

We are now ok with the dependency on pypiwin32, because we've switched to modern pip/setuptools/virtualenv, so the wheels work correctly.

We are now ok with the dependency on pypiwin32, because we've switched to modern pip/setuptools/virtualenv, so the wheels work correctly.
warner added the
fixed
label 2016-03-26 23:05:07 +00:00
warner modified the milestone from 1.10.1 to 1.11.0 2016-03-26 23:05:07 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2028
No description provided.