diff options
-rw-r--r-- | Changes.rst | 8 | ||||
-rw-r--r-- | PKG-INFO | 13 | ||||
-rw-r--r-- | README.rst | 9 | ||||
-rw-r--r-- | debian/.git-dpm | 11 | ||||
-rw-r--r-- | debian/changelog | 11 | ||||
-rw-r--r-- | debian/control | 3 | ||||
-rw-r--r-- | debian/copyright | 2 | ||||
-rw-r--r-- | debian/patches/use-local-intersphinx.patch | 3 | ||||
-rw-r--r-- | dugong.egg-info/PKG-INFO | 13 | ||||
-rw-r--r-- | dugong.egg-info/SOURCES.txt | 23 | ||||
-rw-r--r-- | dugong/__init__.py | 22 | ||||
-rwxr-xr-x | setup.py | 2 |
12 files changed, 70 insertions, 50 deletions
diff --git a/Changes.rst b/Changes.rst index 2784f31..35dc941 100644 --- a/Changes.rst +++ b/Changes.rst @@ -1,5 +1,13 @@ .. currentmodule:: dugong +Release 3.7.4 (2019-01-19) +========================== + +* All traffic can now be dumped for debugging purposes using the + `DUGONG_TRACEFILE` environment variable. Make sure to include `%d` + somewhere in the filename - it will be replaced with a unique number + to distinguish between different connections. + Release 3.7.3 (2018-04-29) ========================== @@ -1,8 +1,8 @@ Metadata-Version: 1.1 Name: dugong -Version: 3.7.3 +Version: 3.7.4 Summary: A HTTP 1.1 client module supporting asynchronous IO, pipelining and `Expect: 100-continue`. Designed for RESTful protocols. -Home-page: https://bitbucket.org/nikratio/python-dugong +Home-page: https://github.com/python-dugong/python-dugong/ Author: Nikolaus Rath Author-email: Nikolaus@rath.org License: PSF @@ -74,12 +74,12 @@ Description: ========================== The documentation can be `read online`__ and is also included in the *doc/html* directory of the dugong tarball. - Please report any bugs on the `BitBucket issue tracker`_. For discussion and + Please report any bugs on the `issue tracker`_. For discussion and questions, please subscribe to the `dugong mailing list`_. .. __: http://www.rath.org/dugong-docs/ .. _dugong mailing list: https://groups.google.com/d/forum/python-dugong - .. _`BitBucket issue tracker`: https://bitbucket.org/nikratio/python-dugong/issues + .. _`issue tracker`: https://github.com/python-dugong/python-dugong/issues Development Status @@ -97,15 +97,14 @@ Description: ========================== Contributing ============ - The LLFUSE source code is available both on GitHub_ and BitBucket_. + The LLFUSE source code is available on GitHub_. Professional Support -------------------- Professional support is offered via `Rath Consulting`_. - .. _BitBucket: https://bitbucket.org/nikratio/python-dugong/ - .. _GitHub: https://github.com/python-dugong/main + .. _GitHub: https://github.com/python-dugong/python-dugong .. _`Rath Consulting`: http://www.rath-consulting.biz/ Keywords: http @@ -66,12 +66,12 @@ Getting Help The documentation can be `read online`__ and is also included in the *doc/html* directory of the dugong tarball. -Please report any bugs on the `BitBucket issue tracker`_. For discussion and +Please report any bugs on the `issue tracker`_. For discussion and questions, please subscribe to the `dugong mailing list`_. .. __: http://www.rath.org/dugong-docs/ .. _dugong mailing list: https://groups.google.com/d/forum/python-dugong -.. _`BitBucket issue tracker`: https://bitbucket.org/nikratio/python-dugong/issues +.. _`issue tracker`: https://github.com/python-dugong/python-dugong/issues Development Status @@ -89,13 +89,12 @@ dependency on ``dugong >= 3.5, < 4.0``. Contributing ============ -The LLFUSE source code is available both on GitHub_ and BitBucket_. +The LLFUSE source code is available on GitHub_. Professional Support -------------------- Professional support is offered via `Rath Consulting`_. -.. _BitBucket: https://bitbucket.org/nikratio/python-dugong/ -.. _GitHub: https://github.com/python-dugong/main +.. _GitHub: https://github.com/python-dugong/python-dugong .. _`Rath Consulting`: http://www.rath-consulting.biz/ diff --git a/debian/.git-dpm b/debian/.git-dpm deleted file mode 100644 index f7f542d..0000000 --- a/debian/.git-dpm +++ /dev/null @@ -1,11 +0,0 @@ -# see git-dpm(1) from git-dpm package -8ae81d99271fc55f21a40efcf76f5599a0109c07 -8ae81d99271fc55f21a40efcf76f5599a0109c07 -1629a34f7845e8f1a84c1542d872fe2c1a5ef43a -1629a34f7845e8f1a84c1542d872fe2c1a5ef43a -python-dugong_3.7.3+dfsg.orig.tar.bz2 -0f83814c6e7866b10eb901bd49b53c52e21f5462 -51513 -debianTag="debian/%e%v" -patchedTag="patched/%e%v" -upstreamTag="upstream/%e%u" diff --git a/debian/changelog b/debian/changelog index acb41fb..877833b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +python-dugong (3.7.4+dfsg-1) unstable; urgency=medium + + [ Ondřej Nový ] + * d/control: Remove ancient X-Python3-Version field + * Convert git repository from git-dpm to gbp layout + + [ Nikolaus Rath ] + * New upstream release. + + -- Nikolaus Rath <Nikolaus@rath.org> Sat, 19 Jan 2019 15:45:15 +0000 + python-dugong (3.7.3+dfsg-1) unstable; urgency=medium * New upstream version. diff --git a/debian/control b/debian/control index b20ddeb..b0575eb 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,5 @@ Source: python-dugong Section: python -X-Python3-Version: >= 3.4 Priority: optional Uploaders: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Maintainer: Nikolaus Rath <Nikolaus@rath.org> @@ -11,7 +10,7 @@ Build-Depends: debhelper (>= 9), dh-python, python3-setuptools Standards-Version: 4.1.1 -Homepage: https://bitbucket.org/nikratio/python-dugong +Homepage: https://github.com/python-dugong/python-dugong Vcs-Git: https://salsa.debian.org/python-team/modules/python-dugong.git Vcs-Browser: https://salsa.debian.org/python-team/modules/python-dugong diff --git a/debian/copyright b/debian/copyright index d1fb3e3..f8834df 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: python-dugong Upstream-Contact: Nikolaus Rath <Nikolaus@rath.org> -Source: https://bitbucket.org/nikratio/python-dugong/src +Source: https://github.com/python-dugong/python-dugong Files-Excluded: doc/html Files: * diff --git a/debian/patches/use-local-intersphinx.patch b/debian/patches/use-local-intersphinx.patch index 22a7594..ffba470 100644 --- a/debian/patches/use-local-intersphinx.patch +++ b/debian/patches/use-local-intersphinx.patch @@ -1,4 +1,3 @@ -From 8ae81d99271fc55f21a40efcf76f5599a0109c07 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath <Nikolaus@rath.org> Date: Thu, 8 Oct 2015 11:58:34 -0700 Subject: Use local intersphinx inventory @@ -13,7 +12,7 @@ Patch-Name: use-local-intersphinx.patch 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rst/conf.py b/rst/conf.py -index f3121..851f2 100644 +index f312145..851f20c 100644 --- a/rst/conf.py +++ b/rst/conf.py @@ -8,7 +8,8 @@ import os.path diff --git a/dugong.egg-info/PKG-INFO b/dugong.egg-info/PKG-INFO index ed1d3e4..4ba5e29 100644 --- a/dugong.egg-info/PKG-INFO +++ b/dugong.egg-info/PKG-INFO @@ -1,8 +1,8 @@ Metadata-Version: 1.1 Name: dugong -Version: 3.7.3 +Version: 3.7.4 Summary: A HTTP 1.1 client module supporting asynchronous IO, pipelining and `Expect: 100-continue`. Designed for RESTful protocols. -Home-page: https://bitbucket.org/nikratio/python-dugong +Home-page: https://github.com/python-dugong/python-dugong/ Author: Nikolaus Rath Author-email: Nikolaus@rath.org License: PSF @@ -74,12 +74,12 @@ Description: ========================== The documentation can be `read online`__ and is also included in the *doc/html* directory of the dugong tarball. - Please report any bugs on the `BitBucket issue tracker`_. For discussion and + Please report any bugs on the `issue tracker`_. For discussion and questions, please subscribe to the `dugong mailing list`_. .. __: http://www.rath.org/dugong-docs/ .. _dugong mailing list: https://groups.google.com/d/forum/python-dugong - .. _`BitBucket issue tracker`: https://bitbucket.org/nikratio/python-dugong/issues + .. _`issue tracker`: https://github.com/python-dugong/python-dugong/issues Development Status @@ -97,15 +97,14 @@ Description: ========================== Contributing ============ - The LLFUSE source code is available both on GitHub_ and BitBucket_. + The LLFUSE source code is available on GitHub_. Professional Support -------------------- Professional support is offered via `Rath Consulting`_. - .. _BitBucket: https://bitbucket.org/nikratio/python-dugong/ - .. _GitHub: https://github.com/python-dugong/main + .. _GitHub: https://github.com/python-dugong/python-dugong .. _`Rath Consulting`: http://www.rath-consulting.biz/ Keywords: http diff --git a/dugong.egg-info/SOURCES.txt b/dugong.egg-info/SOURCES.txt index 3124f96..8b7c9c6 100644 --- a/dugong.egg-info/SOURCES.txt +++ b/dugong.egg-info/SOURCES.txt @@ -6,9 +6,7 @@ setup.py ./dugong/__init__.py doc/html/.buildinfo doc/html/api.html -doc/html/coroutine.html doc/html/coroutines.html -doc/html/expect100.html doc/html/genindex.html doc/html/index.html doc/html/intro.html @@ -18,17 +16,13 @@ doc/html/search.html doc/html/searchindex.js doc/html/tutorial.html doc/html/whatsnew.html -doc/html/_modules/dugong.html -doc/html/_modules/index.html -doc/html/_sources/api.txt -doc/html/_sources/coroutine.txt -doc/html/_sources/coroutines.txt -doc/html/_sources/expect100.txt -doc/html/_sources/index.txt -doc/html/_sources/intro.txt -doc/html/_sources/issues.txt -doc/html/_sources/tutorial.txt -doc/html/_sources/whatsnew.txt +doc/html/_sources/api.rst.txt +doc/html/_sources/coroutines.rst.txt +doc/html/_sources/index.rst.txt +doc/html/_sources/intro.rst.txt +doc/html/_sources/issues.rst.txt +doc/html/_sources/tutorial.rst.txt +doc/html/_sources/whatsnew.rst.txt doc/html/_static/ajax-loader.gif doc/html/_static/basic.css doc/html/_static/classic.css @@ -37,15 +31,18 @@ doc/html/_static/comment-close.png doc/html/_static/comment.png doc/html/_static/default.css doc/html/_static/doctools.js +doc/html/_static/documentation_options.js doc/html/_static/down-pressed.png doc/html/_static/down.png doc/html/_static/file.png +doc/html/_static/jquery-3.2.1.js doc/html/_static/jquery.js doc/html/_static/minus.png doc/html/_static/plus.png doc/html/_static/pygments.css doc/html/_static/searchtools.js doc/html/_static/sidebar.js +doc/html/_static/underscore-1.3.1.js doc/html/_static/underscore.js doc/html/_static/up-pressed.png doc/html/_static/up.png diff --git a/dugong/__init__.py b/dugong/__init__.py index b76f9fa..aea9cc9 100644 --- a/dugong/__init__.py +++ b/dugong/__init__.py @@ -15,6 +15,7 @@ import socket import logging import errno import ssl +import os import hashlib from inspect import getdoc import textwrap @@ -39,7 +40,7 @@ try: except ImportError: Enum = object -__version__ = '3.7.3' +__version__ = '3.7.4' log = logging.getLogger(__name__) @@ -457,6 +458,9 @@ class HTTPConnection: #: attribute. self.timeout = None + #: Filehandler for tracing + self.trace_fh = None + # Implement bare-bones `io.BaseIO` interface, so that instances # can be wrapped in `io.TextIOWrapper` if desired. def writable(self): @@ -516,6 +520,10 @@ class HTTPConnection: self._in_remaining = None self._pending_requests = deque() + if 'DUGONG_TRACEFILE' in os.environ: + self.trace_fh = open(os.environ['DUGONG_TRACEFILE'] % id(self._sock), + 'wb+', buffering=0) + log.debug('done') def _co_tunnel(self): @@ -677,6 +685,8 @@ class HTTPConnection: try: if self._sock is None: raise ConnectionClosed('connection has been closed locally') + if self.trace_fh: + self.trace_fh.write(buf) len_ = self._sock.send(buf) # An SSL socket has the nasty habit of returning zero # instead of raising an exception when in non-blocking @@ -1026,6 +1036,8 @@ class HTTPConnection: buf2 = self._sock.recv(size - len(buf)) if not buf2: break + if self.trace_fh: + self.trace_fh.write(buf2) buf += buf2 else: buf += rbuf.exhaust() @@ -1170,6 +1182,8 @@ class HTTPConnection: raise ConnectionClosed('connection has been closed locally') try: read = self._sock.recv_into(buf[pos:len_]) + if self.trace_fh: + self.trace_fh.write(buf[pos:pos+read]) except (ConnectionResetError, BrokenPipeError): raise ConnectionClosed('connection was interrupted') except (socket.timeout, ssl.SSLWantReadError, BlockingIOError): @@ -1341,6 +1355,8 @@ class HTTPConnection: try: len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) + if self.trace_fh: + self.trace_fh.write(rbuf.d[rbuf.e:rbuf.e+len_]) except (socket.timeout, ssl.SSLWantReadError, BlockingIOError): log.debug('done (nothing ready)') return None @@ -1386,6 +1402,8 @@ class HTTPConnection: parts.append(buf) buf = _join(parts) log.debug('done (%d bytes)', len(buf)) + if self.trace_fh: + self.trace_fh.write(buf) return buf def discard(self): @@ -1419,6 +1437,8 @@ class HTTPConnection: '''Close HTTP connection''' log.debug('start') + if self.trace_fh: + self.trace_fh.close() if self._sock: try: self._sock.shutdown(socket.SHUT_RDWR) @@ -48,7 +48,7 @@ def main(): keywords=['http'], package_dir={'': '.'}, packages=setuptools.find_packages(), - url='https://bitbucket.org/nikratio/python-dugong', + url='https://github.com/python-dugong/python-dugong/', classifiers=['Programming Language :: Python :: 3', 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', |