Skip to content

Commit

Permalink
move DefaultTCP to foolscap.connections.tcp
Browse files Browse the repository at this point in the history
This is a reasonably stable place to expose the DefaultTCP
connection-hint handler. I wasn't really satisfied with the previous
location (foolscap.connection_plugins). Also I want to add socks and Tor
handlers in their own files (foolscap.connections.socks and .tor) which
can be imported independently (in particular they can *fail* to be
imported, throwing Import Error when the necessary external
txsocksx/txtorcon dependencies aren't installed, without breaking
DefaultTCP).

closes ticket:260
  • Loading branch information
warner committed Jul 7, 2016
1 parent 3a7ce26 commit 8b857d5
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def run(self):

"package_dir": {"": "src"},
"packages": ["foolscap", "foolscap.slicers", "foolscap.logging",
"foolscap.connections",
"foolscap.appserver", "foolscap.test"],
"entry_points": {"console_scripts": [
"flogtool = foolscap.logging.cli:run_flogtool",
Expand Down
2 changes: 1 addition & 1 deletion src/foolscap/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from foolscap.logging.log import CURIOUS, UNUSUAL, OPERATIONAL
from foolscap.util import isSubstring
from foolscap.ipb import InvalidHintError
from foolscap.connection_plugins import convert_legacy_hint
from foolscap.connections.tcp import convert_legacy_hint

class TubConnectorFactory(protocol.Factory, object):
# this is for internal use only. Application code should use
Expand Down
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/foolscap/pb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from foolscap import ipb, base32, negotiate, broker, eventual, storage
from foolscap import connection, util
from foolscap.connection_plugins import DefaultTCP
from foolscap.connections.tcp import DefaultTCP
from foolscap.referenceable import SturdyRef
from foolscap.tokens import PBError, BananaError, WrongTubIdError, \
WrongNameError, NoLocationError
Expand Down
2 changes: 1 addition & 1 deletion src/foolscap/test/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from twisted.application import service
from foolscap.api import Tub
from foolscap.connection import get_endpoint
from foolscap.connection_plugins import convert_legacy_hint, DefaultTCP
from foolscap.connections.tcp import convert_legacy_hint, DefaultTCP
from foolscap.tokens import NoLocationHintsError
from foolscap.test.common import (certData_low, certData_high, Target,
ShouldFailMixin)
Expand Down

0 comments on commit 8b857d5

Please sign in to comment.