From 3b1f3fddf093f9bad80522287b8425a713ea8c5e Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 28 Jun 2011 11:06:44 -0700 Subject: [PATCH] Reorganized stream level stanzas. --- sleekxmpp/clientxmpp.py | 3 +-- sleekxmpp/stanza/__init__.py | 9 ++++----- sleekxmpp/stanza/stream/__init__.py | 13 +++++++++++++ sleekxmpp/stanza/{ => stream}/bind.py | 3 ++- .../stanza/{stream_error.py => stream/error.py} | 0 .../{stream_features.py => stream/features.py} | 0 sleekxmpp/stanza/{ => stream}/sasl.py | 0 sleekxmpp/stanza/{ => stream}/session.py | 3 ++- sleekxmpp/stanza/{ => stream}/tls.py | 0 9 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 sleekxmpp/stanza/stream/__init__.py rename sleekxmpp/stanza/{ => stream}/bind.py (86%) rename sleekxmpp/stanza/{stream_error.py => stream/error.py} (100%) rename sleekxmpp/stanza/{stream_features.py => stream/features.py} (100%) rename sleekxmpp/stanza/{ => stream}/sasl.py (100%) rename sleekxmpp/stanza/{ => stream}/session.py (86%) rename sleekxmpp/stanza/{ => stream}/tls.py (100%) diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py index 3a5f41bd..ea9654a6 100644 --- a/sleekxmpp/clientxmpp.py +++ b/sleekxmpp/clientxmpp.py @@ -19,8 +19,7 @@ from sleekxmpp import plugins from sleekxmpp import stanza from sleekxmpp.basexmpp import BaseXMPP from sleekxmpp.stanza import * -from sleekxmpp.stanza import tls -from sleekxmpp.stanza import sasl +from sleekxmpp.stanza.stream import tls, sasl from sleekxmpp.xmlstream import XMLStream, RestartStream from sleekxmpp.xmlstream import StanzaBase, ET, register_stanza_plugin from sleekxmpp.xmlstream.matcher import * diff --git a/sleekxmpp/stanza/__init__.py b/sleekxmpp/stanza/__init__.py index 4481fa42..05df8837 100644 --- a/sleekxmpp/stanza/__init__.py +++ b/sleekxmpp/stanza/__init__.py @@ -8,11 +8,10 @@ from sleekxmpp.stanza.error import Error -from sleekxmpp.stanza.stream_error import StreamError from sleekxmpp.stanza.iq import Iq from sleekxmpp.stanza.message import Message from sleekxmpp.stanza.presence import Presence -from sleekxmpp.stanza.stream_features import StreamFeatures -from sleekxmpp.stanza.bind import Bind -from sleekxmpp.stanza.session import Session - +from sleekxmpp.stanza.stream import StreamFeatures +from sleekxmpp.stanza.stream import Bind +from sleekxmpp.stanza.stream import Session +from sleekxmpp.stanza.stream import StreamError diff --git a/sleekxmpp/stanza/stream/__init__.py b/sleekxmpp/stanza/stream/__init__.py new file mode 100644 index 00000000..a386bbac --- /dev/null +++ b/sleekxmpp/stanza/stream/__init__.py @@ -0,0 +1,13 @@ +""" + SleekXMPP: The Sleek XMPP Library + Copyright (C) 2010 Nathanael C. Fritz + This file is part of SleekXMPP. + + See the file LICENSE for copying permission. +""" + + +from sleekxmpp.stanza.stream.error import StreamError +from sleekxmpp.stanza.stream.features import StreamFeatures +from sleekxmpp.stanza.stream.bind import Bind +from sleekxmpp.stanza.stream.session import Session diff --git a/sleekxmpp/stanza/bind.py b/sleekxmpp/stanza/stream/bind.py similarity index 86% rename from sleekxmpp/stanza/bind.py rename to sleekxmpp/stanza/stream/bind.py index ae1f96f0..165afcb4 100644 --- a/sleekxmpp/stanza/bind.py +++ b/sleekxmpp/stanza/stream/bind.py @@ -6,7 +6,8 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import Iq, StreamFeatures +from sleekxmpp.stanza import Iq +from sleekxmpp.stanza.stream import StreamFeatures from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin diff --git a/sleekxmpp/stanza/stream_error.py b/sleekxmpp/stanza/stream/error.py similarity index 100% rename from sleekxmpp/stanza/stream_error.py rename to sleekxmpp/stanza/stream/error.py diff --git a/sleekxmpp/stanza/stream_features.py b/sleekxmpp/stanza/stream/features.py similarity index 100% rename from sleekxmpp/stanza/stream_features.py rename to sleekxmpp/stanza/stream/features.py diff --git a/sleekxmpp/stanza/sasl.py b/sleekxmpp/stanza/stream/sasl.py similarity index 100% rename from sleekxmpp/stanza/sasl.py rename to sleekxmpp/stanza/stream/sasl.py diff --git a/sleekxmpp/stanza/session.py b/sleekxmpp/stanza/stream/session.py similarity index 86% rename from sleekxmpp/stanza/session.py rename to sleekxmpp/stanza/stream/session.py index c9d97157..87f21857 100644 --- a/sleekxmpp/stanza/session.py +++ b/sleekxmpp/stanza/stream/session.py @@ -6,7 +6,8 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import Iq, StreamFeatures +from sleekxmpp.stanza import Iq +from sleekxmpp.stanza.stream import StreamFeatures from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin diff --git a/sleekxmpp/stanza/tls.py b/sleekxmpp/stanza/stream/tls.py similarity index 100% rename from sleekxmpp/stanza/tls.py rename to sleekxmpp/stanza/stream/tls.py