<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/atagar/pytorctl, branch stem-integration</title>
<subtitle>Damian's PythonTorCtl repository</subtitle>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/'/>
<entry>
<title>Replace _read_reply with stem.types.ControlMessage</title>
<updated>2011-10-18T15:41:23+00:00</updated>
<author>
<name>Damian Johnson</name>
<email>atagar@torproject.org</email>
</author>
<published>2011-10-18T15:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=d3a12d5724e44dac9096a56d0706bbc342efa304'/>
<id>d3a12d5724e44dac9096a56d0706bbc342efa304</id>
<content type='text'>
Dropping TorCtl's _read_reply and unescape_dots in favor of stem's
ControlMessage object. This should be largely transparent to users, the only
visible impact being...

- The _read_reply method now only raises TorCtlClosed or TorCtlError
  exceptions, not socket.error (which was a pita to catch since it's not a
  subclass of TorCtlError). Exception messages differ.

- TorCtl would strip trailing whitespace from the content, stem preserves it.

- When TorCtl.Connection._loop encountered a CLOSE message it would set the
  socket (self._s) to None. I'm not sure why it was doing that, and troubling
  since it didn't make any effort to close the socket. I've removed it.

- The behavior of stem in the case of malformed tor responses differs...
  - Both stem and TorCtl read lines with \n terminators, though stem will raise
    a ProtocolError if it lacks a \r\n ending while TorCtl would accept it.

  - When reading a data block with an unescaped leading period TorCtl would
    strip it off (ie ". my line" would become " my line"). I'm not spotting how
    we're supposed to handle this in the control-spec so I'm leaving the period
    alone (I wonder if I should raise a ProtocolError instead...).

This also removes the BufSock class, which was largely unneeded. The socket
object has a makefile() method, which provides a file with a readline() method.
Using this not only simplifies the code but likely gives some performance
advantages.

The stem.types.ControlMessage class and parser have both unit and integration
tests - suggestions welcome if you spot something I missed. I've done manual
tests for the TorCtl integration and also exercised it by running arm.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dropping TorCtl's _read_reply and unescape_dots in favor of stem's
ControlMessage object. This should be largely transparent to users, the only
visible impact being...

- The _read_reply method now only raises TorCtlClosed or TorCtlError
  exceptions, not socket.error (which was a pita to catch since it's not a
  subclass of TorCtlError). Exception messages differ.

- TorCtl would strip trailing whitespace from the content, stem preserves it.

- When TorCtl.Connection._loop encountered a CLOSE message it would set the
  socket (self._s) to None. I'm not sure why it was doing that, and troubling
  since it didn't make any effort to close the socket. I've removed it.

- The behavior of stem in the case of malformed tor responses differs...
  - Both stem and TorCtl read lines with \n terminators, though stem will raise
    a ProtocolError if it lacks a \r\n ending while TorCtl would accept it.

  - When reading a data block with an unescaped leading period TorCtl would
    strip it off (ie ". my line" would become " my line"). I'm not spotting how
    we're supposed to handle this in the control-spec so I'm leaving the period
    alone (I wonder if I should raise a ProtocolError instead...).

This also removes the BufSock class, which was largely unneeded. The socket
object has a makefile() method, which provides a file with a readline() method.
Using this not only simplifies the code but likely gives some performance
advantages.

The stem.types.ControlMessage class and parser have both unit and integration
tests - suggestions welcome if you spot something I missed. I've done manual
tests for the TorCtl integration and also exercised it by running arm.
</pre>
</div>
</content>
</entry>
<entry>
<title>Document a pythonism that briefly confused Aaron and me.</title>
<updated>2011-10-05T00:39:44+00:00</updated>
<author>
<name>Mike Perry</name>
<email>mikeperry-git@fscked.org</email>
</author>
<published>2011-10-05T00:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=750d7c392766476d12cc9e47bdffffcce84bcdf5'/>
<id>750d7c392766476d12cc9e47bdffffcce84bcdf5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>4024 - get_git_version does not work for submodule</title>
<updated>2011-09-30T23:24:41+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-09-14T23:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=520722b8e3a7bb72bf9b5063f3c1649b53110225'/>
<id>520722b8e3a7bb72bf9b5063f3c1649b53110225</id>
<content type='text'>
Added support for detached heads
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added support for detached heads
</pre>
</div>
</content>
</entry>
<entry>
<title>use local sessions</title>
<updated>2011-09-04T19:42:20+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-08-31T23:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=e99394c46b30ed73ffbf02d5c6a39bf9b04416a2'/>
<id>e99394c46b30ed73ffbf02d5c6a39bf9b04416a2</id>
<content type='text'>
see:
http://www.sqlalchemy.org/docs/orm/session.html#lifespan-of-a-contextual-session
  "This has the effect such that each web request starts fresh with a brand new
  session, and is the most definitive approach to closing out a request."
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
see:
http://www.sqlalchemy.org/docs/orm/session.html#lifespan-of-a-contextual-session
  "This has the effect such that each web request starts fresh with a brand new
  session, and is the most definitive approach to closing out a request."
</pre>
</div>
</content>
</entry>
<entry>
<title>NOTICE when git repo not found rather than ERROR</title>
<updated>2011-09-01T20:53:22+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-09-01T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=097a95c4185b086dbac67e0d2618bd15b9f41521'/>
<id>097a95c4185b086dbac67e0d2618bd15b9f41521</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add function to get current branch and head</title>
<updated>2011-09-01T00:46:30+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-09-01T00:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=a3ed3d01ff93df9d25dc64ffbacfcb6b4ef0befa'/>
<id>a3ed3d01ff93df9d25dc64ffbacfcb6b4ef0befa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>remove ;</title>
<updated>2011-09-01T00:46:28+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-08-31T23:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=4a990f47e5ecd26af4f6459ae6d63ea36dd88f00'/>
<id>4a990f47e5ecd26af4f6459ae6d63ea36dd88f00</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>use Elixir model delete method</title>
<updated>2011-08-31T23:09:00+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-08-31T23:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=db835ef1f6a252d9923be766f1d7dc813ea9a4eb'/>
<id>db835ef1f6a252d9923be766f1d7dc813ea9a4eb</id>
<content type='text'>
try to use the same session for deletes and queries where possible,
this may be the cause of an ObjectNotFound exception that occurs
right after _update_db(), despite the Router object being in the
consensus and also in the db.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
try to use the same session for deletes and queries where possible,
this may be the cause of an ObjectNotFound exception that occurs
right after _update_db(), despite the Router object being in the
consensus and also in the db.
</pre>
</div>
</content>
</entry>
<entry>
<title>placeholder for call to refresh_all()</title>
<updated>2011-08-01T22:07:33+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-07-07T22:21:26+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=741cc04db278cede4bbe0c9e0147066fbfd00a4b'/>
<id>741cc04db278cede4bbe0c9e0147066fbfd00a4b</id>
<content type='text'>
suspicious session behavior may require refreshing all
objects in order to keep tc_session and sessions bound
to Elixir synchronized
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
suspicious session behavior may require refreshing all
objects in order to keep tc_session and sessions bound
to Elixir synchronized
</pre>
</div>
</content>
</entry>
<entry>
<title>WARN when circ_status_event fails to query Router</title>
<updated>2011-08-01T22:07:29+00:00</updated>
<author>
<name>aagbsn</name>
<email>aagbsn@extc.org</email>
</author>
<published>2011-07-07T21:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/atagar/pytorctl.git/commit/?id=37f612706ad384d7a1d34a33268f3d1d8449d5f2'/>
<id>37f612706ad384d7a1d34a33268f3d1d8449d5f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
