Permalink
Commits on Oct 20, 2018
  1. test_info: tolerate new IPv4Address stringification form

    warner committed Oct 20, 2018
    It looks like IPv4Address was ported to use 'attrs' starting with
    twisted-18.7.0, and this test happened to depend on the earlier format (from
    18.4.0 and earlier). Now it should tolerate both.
Commits on Apr 20, 2018
  1. flappserver: update recommended --location format (add tcp: prefix)

    warner committed Apr 20, 2018
Commits on Dec 10, 2017
  1. increase TubConnector.CONNECTION_TIMEOUT to 120s, to match negotiation

    warner committed Dec 10, 2017
    Some connectors (e.g. Tor or I2P) require spinning up a daemon and letting it
    connect to the network before we can get a useful connection out of it.
    Negotiation gives this 120 seconds, so Connectors should too.
Commits on Nov 21, 2017
  1. NEWS: update for 0.13.1 release

    warner committed Nov 21, 2017
  2. Merge branch 'flappclient-tor'

    warner committed Nov 21, 2017
    This adds a pair of environment variables to "flappclient",
    $FOOLSCAP_TOR_CONTROL_PORT and $FOOLSCAP_TOR_SOCKS_PORT. If set, the
    flappclient will set up a "connection hint handler" for Tor, allowing the
    client to use FURLs that include "tor:" -type connection hints.
    
    If txtorcon is unimportable, the environment variables are ignored.
Commits on Nov 20, 2017
  1. test_reconnector: improve reliability

    warner committed Nov 20, 2017
    This test depended upon the stall() values being long enough to allow a
    connection attempt (and loss, and reattempt) to complete first. On slower
    systems, this wasn't enough.
    
    I've added poll() calls to make sure the cycle is complete before allowing
    the test to proceed. To improve test coverage, I've left the poll()s in
    place (so most of the time we'll exercise the timer-expiration and
    reconnection code too), but they should no longer be critical to allowing the
    test to pass.
    
    A future project is to replace all of the polls() and stalls() with explicit
    timer manipulation, ala Twisted's "clock" pattern (e.g. the Reconnector
    doesn't get a real reactor, it gets a controlled Clock object, and the test
    deliberately increments it at a known pace to examine the intermediate
    state).
  2. NEWS: update for 0.13.0 release

    warner committed Nov 20, 2017
  3. Merge branch '247-jsonlogs'

    warner committed Nov 20, 2017
    This replaces the old pickle-based log-event serialization with JSON, which
    is safer, more portable, and works with modern Twisted (Failure objects
    ceased to be pickle-serializable in Twisted-17.9.0, causing the Foolscap unit
    tests to fail).
    
    No attempt is made at backwards compatibility, however if the newer
    JSON-based "flogtool" is asked to look at an old pickle-based flogfile, it
    will print a warning message, directing the user to dig up an old version.
    
    Closes ticket:247 (https://foolscap.lothar.com/trac/ticket/247)
    Closes ticket:275 (https://foolscap.lothar.com/trac/ticket/275)
  4. test_pb: local logged failures are no longer CopiedFailure objects

    warner committed Nov 20, 2017
    We used to replace Failures with CopiedFailures in the local circular
    buffers, because pickle would put the original Failure's exception type into
    the serialized objects (in an Incident file), which would require the
    subsequent loading application (e.g. flogtool dump) to try to import the same
    exception, which would probably fail.
    
    Now that Failures are being transformed by the JSON serializer, we don't need
    to muck with the circular buffers: Failures remain as-is until they get
    serialized.
  5. logs: fix serialization of unserializable objects

    warner committed Nov 20, 2017
    If an error occurs during serialization (e.g. one of the event arguments
    cannot be expressed in JSON), we now use a placeholder object that holds its
    repr(). If repr() fails, we use a second type placeholder that holds the
    repr() of the exception. If the repr() of the exception fails, we use a third
    type of placeholder that merely contains a message of sympathy and hope for
    the unlucky developer.
  6. fix Gatherer: wire-side Events need bytes keys, gathered incidents ne…

    warner committed Nov 20, 2017
    …ed magic
    
    The foolscap.logging.interfaces schema requires both Events and Headers (as
    used by trigger= arguments) to be dictionarys with keys that are bytes ("str"
    in py2). But since we're pulling these from a JSON object, we get unicode.
    The fix is to add a function that encodes everything to ASCII before sending
    over the wire. This is safe because all these keys are static strings (added
    by foolscap's logging functions). The application-provided data, which could
    be of any type, lives in the values, not the keys.
    
    Also, the incident files written by the gatherer were lacking the version
    prefix (aka MAGIC), so the fix was to write this just after opening the file
    for writing, before the header dict is written.
Commits on Nov 19, 2017
  1. fix Web: JSON logfile yields unicode, but twisted.web requires bytes

    warner committed Nov 19, 2017
    Also improve the error messages when the server 500s when a renderer function
    returns unicode, to track this sort of thing down more easily in the future
  2. fix Filter: need to write MAGIC into filter output file

    warner committed Nov 19, 2017
    Also the test's complex comparison function can be removed, since we no
    longer return CopiedFailure instances anywhere
  3. fix Dumper: sometimes we get u-prefixed output strings

    warner committed Nov 19, 2017
    also fix expected whitespace in ThisIsActuallyAFurlFileError message
  4. remove some debug prints

    warner committed Nov 19, 2017
  5. debug prints

    warner committed Dec 15, 2015
    more WIP on logging Failures
  6. switch flogfiles to JSON. Doesn't work yet.

    warner committed Dec 11, 2015
    help diagnose bad magic
    
    LogFileObserver: write magic too
    
    WIP: use serializable ascii incarnation/unique strings
    
    serialize failure= as object by extending the JSON encoder
    
    format_message: handle events coming out of JSON decode
    
    json.load() gives us unicode strings, not bytestrings, and
    format_message() was too picky
  7. add OldPickleDumper test, currently reverse polarity

    warner committed Dec 25, 2015
    (it currently asserts that we *can* dump pickle-based files)
Commits on Nov 18, 2017
  1. tox: remove "skip_install", causes problems with latest tox-2.9.0

    warner committed Nov 18, 2017
    We have "usedevelop = True". Previously, I think this didn't work *unless* we
    also had "skip_install = True", but tox-2.9.0 fixed this bug, and now
    skip_install overrides usedevelop, so having both of them prevents
    Foolscap (or Twisted's "trial" executable) from being installed at all.
    
    This *might* cause problems on older versions of Tox.. I've done a cursory
    test against tox-2.7.0, which seemed ok, but, I'm not sure. I'd like to avoid
    bumping the "minversion=" if at all possible, since that makes the "how to
    test" instructions more complicated for environments that include
    some (older) version of tox already. But if you see problems, please file a
    bug and I'll bump it.
Commits on Jul 27, 2017
  1. NEWS: update for 0.12.7 release

    warner committed Jul 27, 2017
  2. upgrade to Versioneer-0.18

    warner committed Jul 27, 2017
Commits on Jul 26, 2017
  1. Merge PR38: Tub.stopService waits for connections to be closed

    warner committed Jul 26, 2017
    Closes ticket:274
  2. Tub.stopService Deferred now waits for Broker connection loss

    exarkun committed Jul 26, 2017
Commits on Apr 3, 2017
Commits on Jan 17, 2017
  1. .gitignore: add coverage.xml

    warner committed Jan 17, 2017
  2. tox: simplify with new-ish tox features

    warner committed Jan 17, 2017
    use 'extras' and 'usedevelop' instead of 'deps = --editable=.[dev]'