diff options
Diffstat (limited to 'slixmpp/xmlstream')
21 files changed, 105 insertions, 197 deletions
diff --git a/slixmpp/xmlstream/__init__.py b/slixmpp/xmlstream/__init__.py index b5302292..6c27c0cb 100644 --- a/slixmpp/xmlstream/__init__.py +++ b/slixmpp/xmlstream/__init__.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.jid import JID from slixmpp.xmlstream.stanzabase import StanzaBase, ElementBase, ET from slixmpp.xmlstream.stanzabase import register_stanza_plugin diff --git a/slixmpp/xmlstream/handler/__init__.py b/slixmpp/xmlstream/handler/__init__.py index 51a7ca6a..5fbfc0f8 100644 --- a/slixmpp/xmlstream/handler/__init__.py +++ b/slixmpp/xmlstream/handler/__init__.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.xmlstream.handler.callback import Callback from slixmpp.xmlstream.handler.coroutine_callback import CoroutineCallback from slixmpp.xmlstream.handler.collector import Collector diff --git a/slixmpp/xmlstream/handler/base.py b/slixmpp/xmlstream/handler/base.py index b6bff096..1e657777 100644 --- a/slixmpp/xmlstream/handler/base.py +++ b/slixmpp/xmlstream/handler/base.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.handler.base - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.handler.base +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details import weakref diff --git a/slixmpp/xmlstream/handler/callback.py b/slixmpp/xmlstream/handler/callback.py index 4cb329af..93cec6b7 100644 --- a/slixmpp/xmlstream/handler/callback.py +++ b/slixmpp/xmlstream/handler/callback.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.handler.callback - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.handler.callback +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.handler.base import BaseHandler diff --git a/slixmpp/xmlstream/handler/collector.py b/slixmpp/xmlstream/handler/collector.py index d9e20279..8d012873 100644 --- a/slixmpp/xmlstream/handler/collector.py +++ b/slixmpp/xmlstream/handler/collector.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.handler.collector - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2012 Nathanael C. Fritz, Lance J.T. Stout - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.handler.collector +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2012 Nathanael C. Fritz, Lance J.T. Stout +# :license: MIT, see LICENSE for more details import logging from queue import Queue, Empty diff --git a/slixmpp/xmlstream/handler/coroutine_callback.py b/slixmpp/xmlstream/handler/coroutine_callback.py index 0708a6e4..6568ba9f 100644 --- a/slixmpp/xmlstream/handler/coroutine_callback.py +++ b/slixmpp/xmlstream/handler/coroutine_callback.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.handler.callback - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.handler.callback +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.handler.base import BaseHandler from slixmpp.xmlstream.asyncio import asyncio diff --git a/slixmpp/xmlstream/handler/waiter.py b/slixmpp/xmlstream/handler/waiter.py index b82fa5ca..758cd1f1 100644 --- a/slixmpp/xmlstream/handler/waiter.py +++ b/slixmpp/xmlstream/handler/waiter.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.handler.waiter - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.handler.waiter +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details import logging import asyncio from asyncio import Queue, wait_for, TimeoutError diff --git a/slixmpp/xmlstream/handler/xmlcallback.py b/slixmpp/xmlstream/handler/xmlcallback.py index 60ccbaed..b44b2da1 100644 --- a/slixmpp/xmlstream/handler/xmlcallback.py +++ b/slixmpp/xmlstream/handler/xmlcallback.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.xmlstream.handler import Callback diff --git a/slixmpp/xmlstream/handler/xmlwaiter.py b/slixmpp/xmlstream/handler/xmlwaiter.py index dc014da0..6eb6577e 100644 --- a/slixmpp/xmlstream/handler/xmlwaiter.py +++ b/slixmpp/xmlstream/handler/xmlwaiter.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.xmlstream.handler import Waiter diff --git a/slixmpp/xmlstream/matcher/__init__.py b/slixmpp/xmlstream/matcher/__init__.py index 47487d4a..64af8270 100644 --- a/slixmpp/xmlstream/matcher/__init__.py +++ b/slixmpp/xmlstream/matcher/__init__.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.xmlstream.matcher.id import MatcherId from slixmpp.xmlstream.matcher.idsender import MatchIDSender from slixmpp.xmlstream.matcher.many import MatchMany diff --git a/slixmpp/xmlstream/matcher/base.py b/slixmpp/xmlstream/matcher/base.py index 4f15c63d..e2560d2b 100644 --- a/slixmpp/xmlstream/matcher/base.py +++ b/slixmpp/xmlstream/matcher/base.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.matcher.base - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.matcher.base +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details class MatcherBase(object): diff --git a/slixmpp/xmlstream/matcher/id.py b/slixmpp/xmlstream/matcher/id.py index ddef75dc..44df2c18 100644 --- a/slixmpp/xmlstream/matcher/id.py +++ b/slixmpp/xmlstream/matcher/id.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.matcher.id - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.matcher.id +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.matcher.base import MatcherBase diff --git a/slixmpp/xmlstream/matcher/idsender.py b/slixmpp/xmlstream/matcher/idsender.py index 79f73911..8f5d0303 100644 --- a/slixmpp/xmlstream/matcher/idsender.py +++ b/slixmpp/xmlstream/matcher/idsender.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.matcher.id - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.matcher.id +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.matcher.base import MatcherBase diff --git a/slixmpp/xmlstream/matcher/many.py b/slixmpp/xmlstream/matcher/many.py index ef6a64d3..e8ad54e7 100644 --- a/slixmpp/xmlstream/matcher/many.py +++ b/slixmpp/xmlstream/matcher/many.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.xmlstream.matcher.base import MatcherBase diff --git a/slixmpp/xmlstream/matcher/stanzapath.py b/slixmpp/xmlstream/matcher/stanzapath.py index c9f245e1..1bf3fa8e 100644 --- a/slixmpp/xmlstream/matcher/stanzapath.py +++ b/slixmpp/xmlstream/matcher/stanzapath.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.matcher.stanzapath - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.matcher.stanzapath +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.matcher.base import MatcherBase from slixmpp.xmlstream.stanzabase import fix_ns diff --git a/slixmpp/xmlstream/matcher/xmlmask.py b/slixmpp/xmlstream/matcher/xmlmask.py index 343bb340..d50b706e 100644 --- a/slixmpp/xmlstream/matcher/xmlmask.py +++ b/slixmpp/xmlstream/matcher/xmlmask.py @@ -1,11 +1,8 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2010 Nathanael C. Fritz +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. import logging from xml.parsers.expat import ExpatError diff --git a/slixmpp/xmlstream/matcher/xpath.py b/slixmpp/xmlstream/matcher/xpath.py index 0edef5a9..b7503b73 100644 --- a/slixmpp/xmlstream/matcher/xpath.py +++ b/slixmpp/xmlstream/matcher/xpath.py @@ -1,14 +1,9 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.matcher.xpath - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.matcher.xpath +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.stanzabase import ET, fix_ns from slixmpp.xmlstream.matcher.base import MatcherBase diff --git a/slixmpp/xmlstream/resolver.py b/slixmpp/xmlstream/resolver.py index 379c53ac..97798353 100644 --- a/slixmpp/xmlstream/resolver.py +++ b/slixmpp/xmlstream/resolver.py @@ -1,12 +1,8 @@ -# -*- encoding: utf-8 -*- -""" - slixmpp.xmlstream.dns - ~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2012 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.dns +# ~~~~~~~~~~~~~~~~~~~~~~~ +# :copyright: (c) 2012 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from slixmpp.xmlstream.asyncio import asyncio import socket diff --git a/slixmpp/xmlstream/stanzabase.py b/slixmpp/xmlstream/stanzabase.py index da9c7e06..0fa5ef27 100644 --- a/slixmpp/xmlstream/stanzabase.py +++ b/slixmpp/xmlstream/stanzabase.py @@ -1,17 +1,11 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.stanzabase - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - module implements a wrapper layer for XML objects - that allows them to be treated like dictionaries. - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.stanzabase +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# module implements a wrapper layer for XML objects +# that allows them to be treated like dictionaries. +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from __future__ import annotations import copy diff --git a/slixmpp/xmlstream/tostring.py b/slixmpp/xmlstream/tostring.py index f772ff63..efac124e 100644 --- a/slixmpp/xmlstream/tostring.py +++ b/slixmpp/xmlstream/tostring.py @@ -1,18 +1,12 @@ -# -*- coding: utf-8 -*- -""" - slixmpp.xmlstream.tostring - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - This module converts XML objects into Unicode strings and - intelligently includes namespaces only when necessary to - keep the output readable. - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.tostring +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# This module converts XML objects into Unicode strings and +# intelligently includes namespaces only when necessary to +# keep the output readable. +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details XML_NS = 'http://www.w3.org/XML/1998/namespace' diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index e6af3faa..de3ea8cf 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -1,17 +1,12 @@ -""" - slixmpp.xmlstream.xmlstream - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - This module provides the module for creating and - interacting with generic XML streams, along with - the necessary eventing infrastructure. - - Part of Slixmpp: The Slick XMPP Library - - :copyright: (c) 2011 Nathanael C. Fritz - :license: MIT, see LICENSE for more details -""" +# slixmpp.xmlstream.xmlstream +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# This module provides the module for creating and +# interacting with generic XML streams, along with +# the necessary eventing infrastructure. +# Part of Slixmpp: The Slick XMPP Library +# :copyright: (c) 2011 Nathanael C. Fritz +# :license: MIT, see LICENSE for more details from typing import ( Any, Callable, |