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
Last year I submitted a bug+PR for a few new RR types for which I needed support in Twisted. I got a lot of good review feedback from Adi Roiban, but he eventually decided that someone more familiar with twisted.names should review it, so the PR has just been sitting in github for the last couple months. Is there any such person who would be able to review it?
The PR is https://github.com/twisted/twisted/pull/954, for Trac ticket 9373.
-----BEGIN PGP SIGNED MESSAGE-----
I'm very pleased to announce txtorcon 18.0.0. This introduces a new
Onion services API (including v3 support) and a bunch of other changes
(including a new versioning scheme).
Starting now, versioning is more Twisted-like: the first number is the
year, the second is the "release in that year" and the minor number is
for bug-fixes. No backwards-incompatible changes will occur without
first being deprecated for at least one full release (this has been my
practice anyway, so using "SemVer" no longer made sense).
The documentation is updated with all the new Onion APIs, and a full
list of changes follows:
* await_all_uploads= option when creating Onions
* properly re-map progress percentages (including descriptor uploads)
* properly wait for all event-listeners during startup
* re-work how TorState.event_map works, hopefully reducing
* TorControlProtocol.add_event_listener and
TorControlProtocol.remove_event_listener are now async methods
returning Deferred -- they always should have been; new code can
now be assured that the event-listener change is known to Tor by
awaiting this Deferred.
* TorControlProtocol.get_conf_single method added, which gets and returns
(asynchronously) a single GETCONF key (instead of a dict)
* also TorControlProtocol.get_info_single similar to above
* if Tor disconnects while a command is in-progress or pending, the
.errback() for the corresponding Deferred is now correctly fired
(with a TorDisconnectError)
* tired: get_global_tor() (now deprecated)
* Adds a comprehensive set of Onion Services APIs (for all six
variations). For non-authenticated services, instances of
IOnionService represent services; for authenticated services,
instances of IAuthenticatedOnionClients encapsulated named lists of
clients (each client is an instance implementing IOnionService).
* Version 3 ("Proposition 279") Onion service support (same APIs) as
released in latest Tor
* Four new methods to handle creating endpoints for Onion services
(either ephemeral or not and authenticated or not):
* see create_onion for information on how to choose an
appropriate type of Onion Service.
* Tor.create_onion_service to add a new ephemeral Onion service to
Tor. This uses the ADD_ONION command under the hood and can be
version 2 or version 3. Note that there is an endpoint-style API as
well so you don't have to worry about mapping ports yourself (see
* Tor.create_filesystem_onion_service to add a new Onion service to
Tor with configuration (private keys) stored in a provided
directory. These can be version 2 or version 3 services. Note that
there is an endpoint-style API as well so you don't have to worry
about mapping ports yourself (see below).
* Additional APIs to make visiting authenticated Onion services as a
* Tor.add_onion_authentication will add a client-side Onion service
authentication token. If you add a token for a service which
already has a token, it is an error if they don't match. This
corresponds to HidServAuth lines in torrc.
* Tor.remove_onion_authentication will remove a previously added
client-side Onion service authentication token. Fires with True if
such a token existed and was removed or False if no existing token
* Tor.onion_authentication (Python3 only) an async context-manager
that adds and removes an Onion authentication token (i.e. adds in
on __aenter__ and removes it on __aexit__). Allows code like:
* onion services support listening on Unix paths.
* make sure README renders on Warehouse/PyPI
You can download the release from PyPI or GitHub (or of course "pip
Releases are also available from the hidden service:
...and now also available via a "version 3" service:
You can verify the sha256sum of both by running the following 4 lines
in a shell wherever you have the files downloaded:
cat <<EOF | sha256sum --check
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
I'm trying to timeout a really simple LineReceiver protocol.
It's function is to connect to a daemon, receive a line that's to be
displayed to an end-user upon which the user should undertake some
action. The action will trigger a second line (fail/success) at which
point the daemon will close the connection. If, however, the end-user
does not follow-up on the first challenge I want the script to timeout
with a failed result.
Now, I have the LineReceiver do exactly what I want, but I can't for
the life of me understand how I should "wrap" it in the TimoutProtocol
so that it disconnects after a couple of seconds?
This is my Factory:
pamh = None
client = None
def __init__(self, pamh):
self.pamh = pamh
def clientConnectionLost(self, connector, reason):
def buildProtocol(self, addr):
client = WebSSOClient()
#client = TimeoutProtocol(self, WebSSOClient, 5)
client.pamh = self.pamh
self.client = client
And this is the protocol:
line = None
pamh = None
state = 'start'
def lineReceived(self, line):
self.line = line
if self.state == 'start':
"Visit http://***/login/%s to login\nand press <enter> to continue." %
self.state = None
Before anyone starts to scream http (no s): This is all test/debug. I
want the timeout to work before I deploy to something more serious.
The client is loaded straightforward using a reactor.connectTCP() with
the instantiated factory object.
If 'but' was any useful, it would be a logic operator