hi there, folks:
I'd really like to release 0.7.0 but I would like it to be at least a
little bit tested before I do so. Could those of you with CVS trees check
everything out and see if it performs as advertised? Deeper bugs than
that will have to wait for the next release, but I'd at least like to know
if it works for someone other than me.
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
The @deprecated decorator (at leas on py2.7) does not work when paired
For deprecated instance variables, our deprecation policy recommend
converting them into properties and emitted the warning from there.
It would be nice if we could use the standard @deprecated decorator here.
The problem is that when property are used the fget/fset are received by
the @deprecated wrapper as functions and not as methods
Is there a way to get the class in which a property is defined... or there
is no way to use the @deprecated decorator with the @property .. and we
should create a dedicated deprecatedMember method which is called as a
It looks like both https://github.com/twisted/newsbuilder/ and https://github.com/hawkowl/towncrier/ are extractions of the news-builder functionality in our release module. If "towncrier" is the official name, we should probably move that to the twisted org.
Also, does anyone feel like doing the work to remove the newsbuilder (IIRC, entirely private API, so no deprecation) and migrating our release process to use towncrier?
Tell me how to wait for the start of the log on twistd.
When I start twistd - i see print out in log in stdout.
log.msg("123") now work.
from twisted.application.service import Application
from twisted.python.log import ILogObserver, FileLogObserver
from twisted.python.logfile import DailyLogFile
# from twisted.python import log
from raspberry.raspberry import Raspberry
from raspberry.config import config
application = Application("raspberry")
logfile = DailyLogFile(config["log_file"], config["log_path"])
runner = Raspberry(application, config)
So expanding on the "Should the CFFI wrapper and functions for win32 be a
separate project" thread from six months ago I think I'd like some
feedback. The pywincffi <https://github.com/opalmer/pywincffi> project,
which I'm planning to use to start replacing pywin32 in Twisted, is getting
close to its first release. At this point there's enough code in place
that it could probably be used to replace pywin32 in
twisted.python.lockfile and other parts of pywin32 in Twisted. Before
proposing any patches however, I'd like to take this opportunity to welcome
feedback from people on this list. Although pywincffi will not be a
'Twisted project' Twisted will be the primary consumer of pywincffi so I'd
like to make sure developers here are happy with the direction that has
For some background, the core objectives and intended design features are
below (nothing all that special mostly):
* It should be easy to build and retrieve the binary files (wheels for now,
easy to add more later).
* Python 2.6, 2.7 and 3.x are supported from a single code base.
* Type conversion, error checking and other 'C like' code should be the
responsibility of the library where possible.
* APIs provided by pywincffi should mirror their Windows counterparts as
closely as possible so the MSDN documentation can be more easily used as
* For contributors, it should be possible to work on any platform. It
should also be possible to contribute without having to manually build a VM.
* For consumers, documentation and error messages should be descriptive,
consistent, complete and accessible. Examples should be provided for more
complex use cases.
>From a functionality and design standpoint, I think the above are more or
less achieved and can be maintained going forward. With that in mind, I'd
like to know if anyone here has other ideas that they believe should be
incorporated. Of course if anyone happens to look at the code and find
functional issues with it now would be a good time to address those issues
Thanks in advance for the help!
As per previous discussion on this list, the Twisted project has officially adopted the Contributor Covenant as our code of conduct. The official change took place here: https://twistedmatrix.com/trac/ticket/8173#comment:5 <https://twistedmatrix.com/trac/ticket/8173#comment:5> and you can find out more about the Contributor Covenant here: http://contributor-covenant.org <http://contributor-covenant.org/>. Thanks to everyone who helped figure out which policy to adopt and how to administer it.
Discussion of this sort of thing is often contentious, so I would just like to personally ask anyone who disagrees with either codes of conduct in general or this specific code of conduct to keep their feelings to themselves at this point; the time for discussion has passed. I don't do a lot of unilateral project-leader-y stuff, but it is extremely important to me that Twisted be a friendly place for everyone, and this is a necessary part of that.
We've been experimenting with creating an SSH virtual server for Windows
based on conch. We've made good process, but we've run into a problem
running child processes (children of spawnProcess()), in that stdout does
not make it back to the client.
I can demonstrate the problem using the example ptyserv.py script with a
slight change for Windows. Here's the code to demonstrate the problem:
from twisted.internet import reactor, protocol
commandToRun = ['c:\\Windows\\System32\\cmd.exe']
print 'connection made'
self.propro = ProcessProtocol(self)
def dataReceived(self, data):
def conectionLost(self, reason):
print 'connection lost'
def __init__(self, pr):
self.pr = pr
def outReceived(self, data):
def processEnded(self, reason):
print 'protocol connection lost'
f = protocol.Factory()
f.protocol = FakeTelnet
Run the above code on Windows, and telnet to localhost 5823.
After you get the CMD.exe prompt, try to launch python. This is what you'll
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
That's it. Hitting enter just drops down to another next blank line.
Now what's interesting is that writes to stdin of the spawned CMD.exe get
there. You can see this by pressing <CTRL>-D. The python subprocess will
exit and you'll still be connected to your telnet session, now back at the
I've experimented with modifying twisted.internet._dumbwin32proc.py so that
the DuplicateHandle() calls (lines 147 - 163) are not called, thinking that
inheritance was the cause, but no-go. I've also tried adding calls to
msvcrt.set_mode() to os.O_BINARY to make sure windows isn't somehow cooking
the child processes output, but that had no effect either.
I've been banging my head against this for a week and I've reached a stuck
point. I was wondering if someone could point me towards where I'm going
wrong. Any advice would be appreciated....
FYI - once we get this worked out, we'd be happy to share the code.
I'm trying to pass a TCP connection to a Twisted subprocess with
adoptStreamConnection, but I can't figure out how to get the Process
disposed in the main process after doing that.
My desired flow looks like this:
- Finish writing any data the Protocol transport has waiting
- When we know the write buffer is empty send the AMP message to
transfer the socket to the subprocess
- Dispose the Protocol instance in the main process
- I tried doing nothing, loseConnection, abortConnection, and monkey
patching _socketClose out and using loseConnection. See code here:
In all cases the Protocol object still exists in the main process after
the socket has been transferred, even if the main process isn't
listening to that socket anymore. How can I clean this up?
Thanks in advance.