launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25468
[Merge] ~pappacena/turnip:fix-multiplexed-session-env into turnip:master
Thiago F. Pappacena has proposed merging ~pappacena/turnip:fix-multiplexed-session-env into turnip:master.
Commit message:
Bumping Twisted and fixing problem with multiplexed ssh env vars
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/391318
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/turnip:fix-multiplexed-session-env into turnip:master.
diff --git a/requirements.txt b/requirements.txt
index fe3f1ac..8e6f5e1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -67,7 +67,7 @@ translationstring==1.3
# Backport of SSH session env variables setter from
# https://github.com/twisted/twisted/pull/1173 to Twisted version 20.3.0.
# See https://code.launchpad.net/~launchpad/twisted/+git/twisted/+ref/pr-1173
-Twisted[conch]==20.3.0+lp1
+Twisted[conch]==20.3.0+lp2
unittest2==1.1.0
vine==1.3.0
venusian==2.1.0
diff --git a/turnip/pack/ssh.py b/turnip/pack/ssh.py
index 8e87aa8..610766e 100644
--- a/turnip/pack/ssh.py
+++ b/turnip/pack/ssh.py
@@ -213,20 +213,6 @@ class SmartSSHAvatar(LaunchpadAvatar):
# Disable SFTP.
self.subsystemLookup = {}
- def getSession(self):
- """Adapt a SmartSSHAvatar to a SmartSSHSession object.
-
- We need to keep track of the avatar's current session due to an
- internal implementation detail of ISessionSetEnv. If we don't keep
- track of the current session, Twisted will adapt the avatar to
- ISession and ISessionSetEnv in different moments, which causes
- SmartSSHSession.env to be cleared (and we end up losing the env
- variables set). See components.registerAdapter() call below.
- """
- if self.current_session is None:
- self.current_session = SmartSSHSession(self)
- return self.current_session
-
@implementer(IRealm)
class SmartSSHRealm:
@@ -261,5 +247,4 @@ class SmartSSHService(SSHService):
components.registerAdapter(
- lambda avatar: avatar.getSession(), SmartSSHAvatar,
- ISession, ISessionSetEnv)
+ SmartSSHSession, SmartSSHAvatar, ISession, ISessionSetEnv)