[tahoe-dev] [tahoe-lafs] #1274: eliminate pywin32 dependency
tahoe-lafs
trac at tahoe-lafs.org
Wed Jan 19 16:51:04 UTC 2011
#1274: eliminate pywin32 dependency
------------------------------+---------------------------------------------
Reporter: davidsarah | Owner: davidsarah
Type: defect | Status: new
Priority: major | Milestone: 1.8.2
Component: code-storage | Version: 1.8.0
Resolution: | Keywords: pywin32 windows win64 docs-needed news-needed
Launchpad Bug: |
------------------------------+---------------------------------------------
Comment (by davidsarah):
Replying to [comment:12 zooko]:
> We can now update [http://tahoe-lafs.org/source/tahoe-
lafs/trunk/docs/quickstart.html quickstart.html] to no longer mention
{{{pywin32}}}! Hooray! :-)
Not so fast! Tahoe itself no longer directly depends on pywin32, but
Twisted does. Specifically, in [source:src/allmydata/test/test_runner.py],
Tahoe uses
[http://twistedmatrix.com/trac/browser/trunk/twisted/internet/utils.py?rev=24810#L161
twisted.internet.utils.getProcessOutputAndValue], which indirectly uses
[http://twistedmatrix.com/trac/browser/trunk/twisted/internet/_dumbwin32proc.py
_dumbwin32proc.py] and
[http://twistedmatrix.com/trac/browser/trunk/twisted/internet/_pollingfile.py
_pollingfile.py] from Twisted.
Tahoe also has one call to {{{getProcessOutput}}} in
[source:src/allmydata/util/iputil.py].
There are two options for getting rid of this indirect dependency:
* change the Twisted code to use ctypes. The two files I mentioned use 12
Win32 API functions (!WaitForSingleObject, !GetExitCodeProcess,
!CreatePipe, !SetNamedPipeHandleState, !GetCurrentProcess,
!DuplicateHandle, !CloseHandle, !CreateProcess, !TerminateProcess,
!PeekNamedPipe, !ReadFile, !WriteFile), and two structures
(SECURITY_ATTRIBUTES, STARTUPINFO). This is probably a few hours work to
translate to ctypes.
* change {{{test_runner.py}}} and {{{iputil.py}}} to use the
{{{subprocess}}} module.
I was originally thinking of the first of these options, but the second
seems easier, and maybe even feasible for 1.8.2. I'll try it after I'm
done pushing the 1.8.2 patches that have already been reviewed.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1274#comment:14>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-dev
mailing list