Hello community, here is the log from the commit of package python-Epsilon for openSUSE:Factory checked in at 2018-07-06 10:40:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Epsilon (Old) and /work/SRC/openSUSE:Factory/.python-Epsilon.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Epsilon" Fri Jul 6 10:40:58 2018 rev:8 rq:620273 version:0.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Epsilon/python-Epsilon.changes 2018-06-08 23:14:52.649338233 +0200 +++ /work/SRC/openSUSE:Factory/.python-Epsilon.new/python-Epsilon.changes 2018-07-06 10:41:14.879308112 +0200 @@ -1,0 +2,19 @@ +Mon Jul 2 14:54:56 UTC 2018 - mcepl@suse.com + +- Apply upstream patches 01_df6d0f2bd0.patch and 02_5c11436751159.patch + for making tests pass. + Originally from https://github.com/twisted/epsilon/pull/31 + +------------------------------------------------------------------- +Sun Jun 24 06:32:04 UTC 2018 - mcepl@suse.com + +- Upgrade to 0.7.2: + * certcreate should now be installed properly. + * An asRFC1123 method was added to extime.Time. + * As Twisted is dropping Python 2.6, Epsilon will also not support + 2.6 from the next release. + * epsilon.benchmark now uses /proc/self/mounts instead of relying on + /etc/mtab which is often wrong, or does not even exist. + * Fixed a test that interacted badly with Twisted 15.4.0. + +------------------------------------------------------------------- Old: ---- Epsilon-0.7.1.tar.gz New: ---- 01_df6d0f2bd0.patch 02_5c11436751159.patch Epsilon-0.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Epsilon.spec ++++++ --- /var/tmp/diff_new_pack.iboXML/_old 2018-07-06 10:41:15.315307593 +0200 +++ /var/tmp/diff_new_pack.iboXML/_new 2018-07-06 10:41:15.315307593 +0200 @@ -21,16 +21,20 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Epsilon -Version: 0.7.1 +Version: 0.7.2 Release: 0 Summary: Divmod utility package License: MIT Group: Development/Languages/Python URL: https://github.com/twisted/epsilon Source0: https://files.pythonhosted.org/packages/source/E/Epsilon/Epsilon-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/twisted/epsilon/pull/31 +Patch0: 01_df6d0f2bd0.patch +Patch1: 02_5c11436751159.patch BuildRequires: %{python_module Twisted >= 13.2.0} BuildRequires: %{python_module devel} BuildRequires: %{python_module pyOpenSSL >= 0.13} +BuildRequires: %{python_module service_identity} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -57,6 +61,8 @@ %prep %setup -q -n Epsilon-%{version} # fix end-of-line +%patch0 -p1 +%patch1 -p1 sed -i 's/\r//' NAME.txt %build @@ -68,14 +74,11 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# Tests fail for some incompatibility with the current version of -# Twisted -# https://github.com/twisted/epsilon/issues/25 -# python_exec setup.py test +%python_exec setup.py test %files %{python_files} %license LICENSE -%doc README NAME.txt NEWS.txt +%doc README.rst NAME.txt NEWS.rst %{_bindir}/certcreate %{python_sitelib}/* ++++++ 01_df6d0f2bd0.patch ++++++
From df6d0f2bd0f13606ceaed7b85ba0a03a15c8d9fe Mon Sep 17 00:00:00 2001 From: Tristan Seligmann
Date: Sun, 24 Jun 2018 12:51:48 +0200 Subject: [PATCH] Make discoverCurrentWorkingDevice more lenient.
--- epsilon/scripts/benchmark.py | 16 ++++++++++------ epsilon/test/test_benchmark.py | 11 +++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/epsilon/scripts/benchmark.py b/epsilon/scripts/benchmark.py index 8b35bdd..2dae1c7 100644 --- a/epsilon/scripts/benchmark.py +++ b/epsilon/scripts/benchmark.py @@ -412,19 +412,23 @@ def reportResults(results): -def discoverCurrentWorkingDevice(): +def discoverCurrentWorkingDevice(procMounts='/proc/self/mounts'): """ Return a short string naming the device which backs the current working directory, ie C{/dev/hda1}. """ possibilities = [] cwd = os.getcwd() - for L in file('/proc/self/mounts'): - parts = L.split() - if cwd.startswith(parts[1]): - possibilities.append((len(parts[1]), parts[0])) + with file(procMounts, 'rb') as f: + for L in f: + parts = L.split() + if cwd.startswith(parts[1]): + possibilities.append((len(parts[1]), parts[0])) possibilities.sort() - return possibilities[-1][-1] + try: + return possibilities[-1][-1] + except IndexError: + return '<unknown>' diff --git a/epsilon/test/test_benchmark.py b/epsilon/test/test_benchmark.py index c938822..0681ee9 100644 --- a/epsilon/test/test_benchmark.py +++ b/epsilon/test/test_benchmark.py @@ -445,3 +445,14 @@ def testProcessStopTimingCommand(self): p.stopTiming = lambda: stopped.append(None) self.mock.proto.childDataReceived(p.BACKCHANNEL_OUT, p.STOP) self.assertEquals(stopped, [None]) + + + +class DiscoverDeviceTests(unittest.TestCase): + def test_emptyMounts(self): + p = filepath.FilePath(self.mktemp()) + p.makedirs() + m = p.child('mounts') + m.touch() + self.assertEquals( + benchmark.discoverCurrentWorkingDevice(m.path), '<unknown>') ++++++ 02_5c11436751159.patch ++++++
From 5c11436751159d31d3b07c4633e5d48c402871f1 Mon Sep 17 00:00:00 2001 From: Tristan Seligmann
Date: Sun, 24 Jun 2018 12:58:08 +0200 Subject: [PATCH] Update changelog.
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index b7d5fb5..2d69391 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,3 +1,8 @@
+0.7.3 (2018-06-24):
+ Minor:
+
+ - Make ``epsilon.benchmark`` handle ``/proc/self/mounts`` more leniently.
+
0.7.2 (2018-06-24):
Minor:
++++++ Epsilon-0.7.1.tar.gz -> Epsilon-0.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/.coveragerc new/Epsilon-0.7.2/.coveragerc
--- old/Epsilon-0.7.1/.coveragerc 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/.coveragerc 2017-09-26 08:11:57.000000000 +0200
@@ -0,0 +1,9 @@
+[run]
+branch = True
+source =
+ epsilon
+
+[report]
+exclude_lines =
+ pragma: no cover
+show_missing = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/.gitattributes new/Epsilon-0.7.2/.gitattributes
--- old/Epsilon-0.7.1/.gitattributes 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/.gitattributes 2015-10-10 13:53:21.000000000 +0200
@@ -0,0 +1 @@
+epsilon/_version.py export-subst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/.gitignore new/Epsilon-0.7.2/.gitignore
--- old/Epsilon-0.7.1/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/.gitignore 2017-09-26 08:11:57.000000000 +0200
@@ -0,0 +1,3 @@
+*.egg-info/
+.coverage
+.tox/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/.travis.yml new/Epsilon-0.7.2/.travis.yml
--- old/Epsilon-0.7.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/.travis.yml 2018-06-19 00:30:53.000000000 +0200
@@ -0,0 +1,32 @@
+sudo: false
+
+language: "python"
+
+branches:
+ only:
+ - master
+
+matrix:
+ include:
+ - python: 2.7.13
+ env: TOXENV=py27
+ - python: pypy2.7-5.8.0
+ env: TOXENV=pypy
+
+install:
+ - pip install -U pip setuptools wheel
+ - pip install tox codecov
+
+script:
+ - tox
+
+after_success:
+ - codecov
+
+notifications:
+ email: false
+ irc:
+ channels: "chat.freenode.net#divmod"
+ template:
+ - "%{repository}@%{branch} - %{author}: %{message} (%{build_url})"
+ use_notice: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/Epsilon.egg-info/PKG-INFO new/Epsilon-0.7.2/Epsilon.egg-info/PKG-INFO
--- old/Epsilon-0.7.1/Epsilon.egg-info/PKG-INFO 2015-10-10 15:54:51.000000000 +0200
+++ new/Epsilon-0.7.2/Epsilon.egg-info/PKG-INFO 2018-06-24 08:15:20.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Epsilon
-Version: 0.7.1
+Version: 0.7.2
Summary: A set of utility modules used by Divmod projects
Home-page: https://github.com/twisted/epsilon
Author: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/Epsilon.egg-info/SOURCES.txt new/Epsilon-0.7.2/Epsilon.egg-info/SOURCES.txt
--- old/Epsilon-0.7.1/Epsilon.egg-info/SOURCES.txt 2015-10-10 15:54:51.000000000 +0200
+++ new/Epsilon-0.7.2/Epsilon.egg-info/SOURCES.txt 2018-06-24 08:15:20.000000000 +0200
@@ -1,10 +1,17 @@
+.coveragerc
+.gitattributes
+.gitignore
+.travis.yml
LICENSE
MANIFEST.in
NAME.txt
-NEWS.txt
-README
+NEWS.rst
+README.rst
+requirements-testing.txt
setup.cfg
setup.py
+testhotfix
+tox.ini
versioneer.py
Epsilon.egg-info/PKG-INFO
Epsilon.egg-info/SOURCES.txt
@@ -13,6 +20,18 @@
Epsilon.egg-info/top_level.txt
bin/benchmark
bin/certcreate
+doc/amp-auth.xhtml
+doc/amp-routes.xhtml
+doc/index.xhtml
+doc/stylesheet.css
+doc/template.tpl
+doc/listings/amp/amp_auth_client.py
+doc/listings/amp/amp_auth_server.py
+doc/listings/amp/auth_client.py
+doc/listings/amp/auth_server.py
+doc/listings/amp/route_client.py
+doc/listings/amp/route_server.py
+doc/listings/amp/route_setup.py
epsilon/__init__.py
epsilon/_version.py
epsilon/ampauth.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/Epsilon.egg-info/requires.txt new/Epsilon-0.7.2/Epsilon.egg-info/requires.txt
--- old/Epsilon-0.7.1/Epsilon.egg-info/requires.txt 2015-10-10 15:54:51.000000000 +0200
+++ new/Epsilon-0.7.2/Epsilon.egg-info/requires.txt 2018-06-24 08:15:20.000000000 +0200
@@ -1,2 +1,3 @@
+zope.interface
Twisted>=13.2.0
PyOpenSSL>=0.13
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/NEWS.rst new/Epsilon-0.7.2/NEWS.rst
--- old/Epsilon-0.7.1/NEWS.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/NEWS.rst 2018-06-24 08:14:46.000000000 +0200
@@ -0,0 +1,139 @@
+0.7.2 (2018-06-24):
+ Minor:
+
+ - Fix ``epsilon.benchmark`` compatibility with newer *Twisted* versions.
+ - Add explicit dependency on ``zope.interface``.
+
+0.7.1 (2015-10-10):
+ Major:
+
+ - *certcreate* should now be installed properly.
+ - An ``asRFC1123`` method was added to ``extime.Time``.
+ - As *Twisted* is dropping Python 2.6, Epsilon will also not support 2.6 from
+ the next release.
+
+ Minor:
+
+ - ``epsilon.benchmark`` now uses ``/proc/self/mounts`` instead of relying on
+ ``/etc/mtab`` which is often wrong, or does not even exist.
+ - Fixed a test that interacted badly with *Twisted* 15.4.0.
+ - Updated the metadata in *setup.py*.
+
+0.7.0 (2014-01-15):
+ Major:
+
+ - Only *Python* 2.6 and 2.7 are supported now. 2.4, 2.5 is deprecated.
+ - setup.py now uses setuptools, and stores its dependencies. This
+ means you no longer need to manually install dependencies.
+ - *setup.py* no longer requires *Twisted* for *egg_info*, making it easier
+ to install *Epsilon* using *pip*.
+ - Significant improvements to *PyPy* support. *PyPy* is now a supported
+ platform, with CI support.
+ - ``epsilon.release`` is now removed. It relied on a bunch of machinery
+ specific to *Divmod* that no longer existed.
+ - ``epsilon.sslverify`` is now removed. Use ``twisted.internet.ssl`` instead.
+ - ``epsilon.asTwistedVersion`` takes a string version (``"1.2.3"``) and
+ turns it into a ``twisted.python.versions.Version``.
+
+ Minor:
+
+ - Several deprecation warnings have been cleaned up.
+
+0.6.0 (2009-11-25):
+ - Disable loopback hotfix on *Twisted* 8.2 and newer.
+ - Remove the implementation of ``Cooperator`` and use *Twisted*'s
+ implementation instead.
+ - Use *Twisted*'s ``deferLater`` implementation.
+ - Add a service for communicating via *stdio*.
+ - Add a ``precision`` argument to ``Time.asHumanly`` to control the precision
+ of the returned string.
+
+0.5.12 (2008-12-09):
+ - Added support for *AMP* authentication via one-time pads.
+
+0.5.11 (2008-10-02):
+ - ``epsilon.amprouter`` added, providing support for multiplexing
+ unrelated *AMP* communications over the same connection.
+
+0.5.10 (2008-08-12):
+ - Added the ``epsilon.caseless`` module, with case-insensitive string
+ wrappers.
+ - Better ``repr()`` for ``epsilon.structlike.record`` added.
+ - ``epsilon.juice`` now uses ``twisted.internet.ssl`` instead of
+ ``epsilon.sslverify``.
+
+0.5.9 (2008-01-18):
+ - No noted changes.
+
+0.5.8 (2007-11-27):
+ - ``extime.Time.asHumanly`` no longer shows a time of day for all-day
+ timestamps.
+
+0.5.7 (2007-04-27):
+ - ``view.SlicedView`` added, allowing slicing and indexing of large
+ sequences without copying.
+
+0.5.6 (2006-11-20):
+ - Added a ``--quiet`` option to *Epsilon's* *certcreate* and use it in a few
+ unit tests to avoid spewing garbage during test runs.
+
+0.5.5 (2006-10-21):
+ - ``extime.Time`` now accepts RFC2822-like dates with invalid fields: it
+ rounds them to the nearest valid value.
+
+0.5.4 (2006-10-17):
+ - ``extime.Time`` now accepts RFC2822-like dates with no timezone.
+
+0.5.3 (2006-09-20):
+ - ``structlike.Record`` now raises ``TypeError`` on unexpected args.
+
+0.5.2 (2006-09-12):
+ - ``extime.Time`` now avoids ``time_t`` overflow bugs.
+
+0.5.1 (2006-06-22):
+ - Added hotfix for ``twisted.test.proto_helpers.StringTransport``.
+
+0.5.0 (2006-06-12):
+ - Replaced ``'%y'`` with ``'%Y'`` in ``Time.asHumanly`` output - the year is
+ now four digits, rather than two.
+ - Added new ``epsilon.structlike`` functionality for simple record.
+ - All uses of ``defer.wait`` and ``deferredResult`` were removed from the tests.
+ - Added ``epsilon.juice``, an asynchronous messaging protocol slated for
+ inclusion in *Twisted*. Improved a few features, such as the ``repr`` of
+ ``JuiceBox`` instances. This was moved from *Vertex*.
+ - Added ``epsilon.sslverify``, a set of utilities for dealing with
+ *PyOpenSSL* using simple high-level objects, performing operations such as
+ signing and verifying certificates. This was also moved from *Vertex*, and
+ slated for inclusion in *Twisted*.
+ - Added ``epsilon.spewer``, a prettier version of the spewer in
+ ``twisted.python.util``.
+ - Added *benchmark* tool for measuring and reporting run-times of python
+ programs.
+
+0.4.0 (2005-12-20):
+ - Disabled crazy ``sys.modules`` hackery in ``test_setuphelper``.
+ - Added module for creating a directory structure from a string template.
+ - Added support for *now* to ``Time.fromHumanly``.
+ - Added a structured *hotfix* system to abstract and formalize monkey
+ patches and version testing logic away from code which requires it.
+
+0.3.2 (2005-11-05):
+ - Added automatic support for *Twisted* plugins to ``autosetup``.
+
+0.3.1 (2005-11-02):
+ - Removed bogus dependency on *Axiom*.
+
+0.3.0 (2005-11-02):
+ - Added ``SchedulingService``, an ``IService`` implementation, to
+ ``epsilon.cooperator``.
+ - Added ``autosetup``, a utility to actually include files in *distutils*
+ releases, to ``epsilon.setuphelper``.
+
+0.2.1 (2005-10-25):
+ - Added ``short`` to ``epsilon.versions.Version``.
+ - Fixed *setup.py* to use ``epsilon.version.short`` rather than static
+ string.
+
+0.2.0 (2005-10-25):
+ - Added ``epsilon.modal.ModalType``, metaclass for writing classes that
+ behave in some respects like state machines.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/NEWS.txt new/Epsilon-0.7.2/NEWS.txt
--- old/Epsilon-0.7.1/NEWS.txt 2015-10-10 15:53:30.000000000 +0200
+++ new/Epsilon-0.7.2/NEWS.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,113 +0,0 @@
-0.7.0 (2014-01-15):
- Major:
-
- - Only Python 2.6 and 2.7 are supported now. 2.4, 2.5 is deprecated.
- - setup.py now uses setuptools, and stores its dependencies. This
- means you no longer need to manually install dependencies.
- - setup.py no longer requires Twisted for egg_info, making it easier
- to install Epsilon using pip.
- - Significant improvements to PyPy support. PyPy is now a supported
- platform, with CI support.
- - epsilon.release is now removed. It relied on a bunch of machinery
- specific to divmod that no longer existed.
- - epsilon.sslverify is now removed. Use twisted.internet.ssl instead.
- - epsilon.asTwistedVersion takes a string version ("1.2.3") and
- turns it into a twisted.python.versions.Version.
-
- Minor:
-
- - Several deprecation warnings have been cleaned up.
-
-0.6.0 (2009-11-25):
- - Disable loopback hotfix on Twisted 8.2 and newer.
- - Remove the implementation of Cooperator and use Twisted's implementation
- instead.
- - Use Twisted's deferLater implementation.
- - Add a service for communicating via stdio.
- - Add a `precision` argument to `Time.asHumanly` to control the precision
- of the returned string.
-
-0.5.12 (2008-12-09):
- - Added support for AMP authentication via one-time pads.
-
-0.5.11 (2008-10-02):
- - epsilon.amprouter added, providing support for multiplexing
- unrelated AMP communications over the same connection.
-
-0.5.10 (2008-08-12):
- - Added the epsilon.caseless module, with case-insensitive string
- wrappers.
- - Better repr() for epsilon.structlike.record added.
- - epsilon.juice now uses twisted.internet.ssl instead of epsilon.sslverify.
-
-0.5.9 (2008-01-18):
-
-0.5.8 (2007-11-27):
- - extime.Time.asHumanly() no longer shows a time of day for all-day timestamps.
-
-0.5.7 (2007-04-27):
- - view.SlicedView added, allowing slicing and indexing of large
- sequences without copying.
-
-0.5.6 (2006-11-20):
- - Added a --quiet option to Epsilon's certcreate and use it in a few unit
- tests to avoid spewing garbage during test runs.
-
-0.5.5 (2006-10-21):
- - extime.Time now accepts RFC2822-like dates with invalid fields: it
- rounds them to the nearest valid value.
-
-0.5.4 (2006-10-17):
- - extime.Time now accepts RFC2822-like dates with no timezone.
-
-0.5.3 (2006-09-20):
- - structlike.Record now raises TypeError on unexpected args.
-
-0.5.2 (2006-09-12):
- - extime.Time now avoids time_t overflow bugs.
-
-0.5.1 (2006-06-22):
- - Added hotfix for twisted.test.proto_helpers.StringTransport.
-
-0.5.0 (2006-06-12):
- - Replaced '%y' with '%Y' in Time.asHumanly() output - the year is now
- four digits, rather than two.
- - Added new 'epsilon.structlike' functionality for simple record.
- - All uses of defer.wait and deferredResult were removed from the tests.
- - Added epsilon.juice, an asynchronous messaging protocol slated for
- inclusion in Twisted. Improved a few features, such as the repr() of
- JuiceBox instances. This was moved from Vertex.
- - Added epsilon.sslverify, a set of utilities for dealing with PyOpenSSL
- using simple high-level objects, performing operations such as signing and
- verifying certificates. This was also moved from Vertex, and slated for
- inclusion in Twisted.
- - Added epsilon.spewer, a prettier version of the spewer in
- twisted.python.util.
- - Added "benchmark" tool for measuring and reporting run-times of python
- programs.
-
-0.4.0 (2005-12-20):
- - Disabled crazy sys.modules hackery in test_setuphelper
- - Added module for creating a directory structure from a string template
- - Added support for 'now' to Time.fromHumanly()
- - Added a structured "hotfix" system to abstract and formalize monkey
- patches and version testing logic away from code which requires it.
-
-0.3.2 (2005-11-05):
- - Added automatic support for Twisted plugins to autosetup
-
-0.3.1 (2005-11-02):
- - Removed bogus dependency on Axiom.
-
-0.3.0 (2005-11-02):
- - Added SchedulingService, an IService implementation, to epsilon.cooperator
- - Added autosetup, a utility to actually include files in distutils releases,
- to epsilon.setuphelper
-
-0.2.1 (2005-10-25):
- - Added 'short()' to epsilon.versions.Version
- - fixed setup.py to use epsilon.version.short() rather than static string.
-
-0.2.0 (2005-10-25):
- - Added epsilon.modal.ModalType, metaclass for writing classes that
- behave in some respects like state machines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/PKG-INFO new/Epsilon-0.7.2/PKG-INFO
--- old/Epsilon-0.7.1/PKG-INFO 2015-10-10 15:54:51.000000000 +0200
+++ new/Epsilon-0.7.2/PKG-INFO 2018-06-24 08:15:20.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Epsilon
-Version: 0.7.1
+Version: 0.7.2
Summary: A set of utility modules used by Divmod projects
Home-page: https://github.com/twisted/epsilon
Author: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/README new/Epsilon-0.7.2/README
--- old/Epsilon-0.7.1/README 2015-01-24 22:02:05.000000000 +0100
+++ new/Epsilon-0.7.2/README 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-
-Divmod Epsilon
-==============
-
-Epsilon is a set of utility modules, commonly used by all Divmod projects.
-
-This is intended mainly as a support package for code used by Divmod projects,
-and not as an external library. However, it contains many useful modules and
-you can feel free to use them!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/README.rst new/Epsilon-0.7.2/README.rst
--- old/Epsilon-0.7.1/README.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/README.rst 2018-06-24 05:11:06.000000000 +0200
@@ -0,0 +1,9 @@
+
+Divmod Epsilon
+==============
+
+Epsilon is a set of utility modules, commonly used by all Divmod projects.
+
+This is intended mainly as a support package for code used by Divmod projects,
+and not as an external library. However, it contains many useful modules and
+you can feel free to use them!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/amp-auth.xhtml new/Epsilon-0.7.2/doc/amp-auth.xhtml
--- old/Epsilon-0.7.1/doc/amp-auth.xhtml 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/amp-auth.xhtml 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>AMP Authentication</title>
+ </head>
+ <body>
+ <h1>AMP Authentication</h1>
+
+ <h2>Overview</h2>
+
+ <p>
+ <code class="API">epsilon.ampauth</code> integrates Twisted Cred with
+ <code>twisted.protocols.amp</code>, providing support for selecting a
+ <code>IBoxReceiver</code> based on the result of a Cred login.
+ </p>
+
+ <p>
+ Readers should familiarize themselves with the following concepts in
+ order to understand all sections of this document:
+ </p>
+
+ <ul>
+ <li>
+ Twisted http://twistedmatrix.com/projects/core/documentation/howto/clients.html">TCP
+ clients</a> and http://twistedmatrix.com/projects/core/documentation/howto/servers.html">TCP
+ servers</a>
+ </li>
+ <li>
+ <a href="http://twistedmatrix.com/projects/core/documentation/howto/defer.html">
+ Using Deferreds
+ </a>
+ </li>
+ <li>
+ Twisted <code class="API" base="twisted.protocols.amp">AMP</code>
+ </li>
+ <li>
+ <a href="http://twistedmatrix.com/projects/core/documentation/howto/cred.html">
+ Twisted Cred
+ </a>
+ </li>
+ </ul>
+
+ <h2>Servers</h2>
+
+ <p>
+ <code class="API" base="epsilon.ampauth">CredAMPServerFactory</code>
+ is a factory for the CredReceiver</code> protocol, an
+ <code>AMP</code> subclass which implements responders for commands
+ which allow a client to prove their identity. It uses a
+ <code>Portal</code> to handle these commands and retrieve an
IBoxReceiver</code> which
+ will be used to handle all further AMP boxes it receives.
+ </p>
+
+ <a href="listings/amp/auth_server.py" class="py-listing">
+ AMP server with authentication
+ </a>
+
+ <p>
+ <code>Add</code> and <code>Adder</code> together define a simple AMP
+ protocol for adding two integers together. <code>AdditionRealm</code>
+ provides the necessary integration between this AMP protocol and Cred,
+ creating new <code>Adder</code> instances whenever an
+ <code>IBoxReceiver</code> is requested - which will be whenever a client
+ attempts to authenticate itself to the server.
+ </p>
+
+ <h2>Clients</h2>
+
+ <p>
+ AMP clients can authenticate with an AMP server using
login</code>. <code>login</code> takes a
+ connected AMP instance and a credentials object as arguments and returns
+ a <code>Deferred</code> which fires when authentication finishes.
+ </p>
+
+ <a href="listings/amp/auth_client.py" class="py-listing">
+ Authenticating AMP client
+ </a>
+
+ <p>
+ The TCP connection is set up as usual, and the <code>Add</code> command
+ is also issued in the usual way. The only change from a normal AMP
+ client is the use of <code>login</code> after a connection has been set
+ up but before any commands are issued.
+ </p>
+
+ <h2>One-Time Pad Authentication</h2>
+
+ <p>
+ <code class="API">epsilon.ampauth</code> includes an
CredentialsChecker</code> for validating
+ one-time pads:
OneTimePadChecker</code>. If this checker is
+ registered with the portal, clients may use the
OTPLogin</code> command to authenticate.
+ </p>
+
+ <a href="listings/amp/amp_auth_server.py" class="py-listing">
+ AMP server with OTP authentication
+ </a>
+
+ <p></p>
+
+ <a href="listings/amp/amp_auth_client.py" class="py-listing">
+ OTP-authenticating AMP client
+ </a>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/amp-routes.xhtml new/Epsilon-0.7.2/doc/amp-routes.xhtml
--- old/Epsilon-0.7.1/doc/amp-routes.xhtml 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/amp-routes.xhtml 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>AMP Routes</title>
+ </head>
+ <body>
+ <h1>AMP Routes</h1>
+
+ <h2>Overview</h2>
+
+ <p>
+ Normally, an AMP connection is between two
AMP</code> instances; each instance receives
+ all AMP boxes sent by the other side and handles them by interpreting
+ them as commands, responses to commands, or in some other way. This
+ typically means that the logic for handling boxes on each side of the
+ connection is completely defined by a single object. Sometimes it is
+ useful to allow multiple objects, perhaps of different types, to
+ participate in defining this logic.
+ </p>
+
+ <p>
+ <code>epsilon.amprouter</code> implements utilities which allow an
+ arbitrary number of objects, providers of <code>IBoxReceiver</code> (for
+ example, instances of <code>AMP</code>), to define how received AMP boxes
+ are interpreted. This is useful to multiplex unrelated <code>AMP</code>
+ instances over a single TCP connection, to split up a single AMP protocol
+ into multiple simpler protocols, and for many other purposes.
+ </p>
+
+ <p>
+ Readers should familiarize themselves with the following concepts in
+ order to understand all sections of this document:
+ </p>
+
+ <ul>
+ <li>
+ Twisted http://twistedmatrix.com/projects/core/documentation/howto/clients.html">TCP
+ clients</a> and http://twistedmatrix.com/projects/core/documentation/howto/servers.html">TCP
+ servers</a>
+ </li>
+ <li>
+ <a href="http://twistedmatrix.com/projects/core/documentation/howto/defer.html">
+ Using Deferreds
+ </a>
+ </li>
+ <li>
+ Twisted <code class="API" base="twisted.protocols.amp">AMP</code>
+ </li>
+ </ul>
+
+ <h2>Routers</h2>
+
+ <p>
+ When working with routes, the object primarily of interest will be a Router</a> instance. Each AMP
+ client and server will have a <code>Router</code> instance which they can
+ use to create new routes. They will use its
Router.bindRoute</code> method to set up
+ whatever routes they require.
+ </p>
+
+ <h2>Servers</h2>
+
+ <p>
+ <code>epsilon.amprouter</code> does not define a command for creating new
+ routes because different applications have different requirements for how
+ new routes are set up. An application may want to negotiate about the
+ <code>IBoxReceiver</code> implementation which is associated with a
+ route, it may want to supply initial arguments to that object, it may
+ want to do version negotiation, and so on. The first thing an
+ application using routes must do, then, is to define a way to create new
+ routes. Consider the following example which allows routes to be created
+ with a <code>NewRoute</code> AMP command and associates them with a
+ parameterized <code>IBoxReceiver</code> implementation.
+ </p>
+
+ <a href="listings/amp/route_setup.py" class="py-listing">
+ Creation of new routes
+ </a>
+
+ <p>
+ <code>AMPRouteServerFactory.buildProtocol</code> creates new
+ <code>RoutingAMP</code> instances, each with a new <code>Router</code>.
+ The <code>Router</code> instance will become the <code>RoutingAMP</code>
+ instance's <code>boxReceiver</code> attribute. This is important for two
+ reasons. First, it allows the router to work by causing all AMP boxes
+ received from the connection to be delivered to the router to be
+ dispatched appropriately. Second, it gives the <code>RoutingAMP</code>
+ instance a reference to the <code>Router</code> instance; this is
+ necessary so that new routes can be created.
+ </p>
+
+ <p>
+ After creating the <code>Router</code> and <code>RoutingAMP</code>,
+ <code>buildProtocol</code> also sets up the <code>RoutingAMP</code>
+ instance to be the default receiver by binding it to the
+ <code>None</code>. All AMP boxes without routing information will be
+ delivered to the default receiver. This is important because it allows
+ the <code>NewRoute</code> command to be handled by the
+ <code>RoutingAMP</code> instance.
+ </p>
+
+ <p>
+ <code>RoutingAMP</code>'s <code>NewRoute</code> responder uses
+ <code>self.boxReceiver</code>, the <code>Router</code> instance provided
+ by the factory, to <em>bind</em> the return value of
+ <code>self.factory.routeProtocol()</code> to a new route. Then, it
+ connects the route to the identifier specified in the
+ <code>NewRoute</code> command. Finally, it returns the identifier of the
+ route it has just created. Once this has happened, the route is
+ completely set up on the server.
+ </p>
+
+ <p>
+ Finally, the <code>connect</code> function wraps up the necessary calls
+ to routing methods and a use of the <code>NewRoute</code> command to form
+ the client side of the setup.
+ </p>
+
+ <p>
+ First, let's look at an example of using <code>AMPRouteServerFactory</code> and
+ <code>RoutingAMP</code> to run a server.
+ </p>
+
+ <a href="listings/amp/route_server.py" class="py-listing">
+ Routed counters server
+ </a>
+
+ <p>
+ In this example, a simple counting protocol is hooked up to the server.
+ Each route which is created is associated with a new instance of this
+ protocol. The protocol does just one simple thing, it keeps track of how
+ many times the <code>Count</code> command is issued to it and returns
+ this value in the response to that command.
+ </p>
+
+ <p>
+ Next we'll look at how a client can connect to this server, create new
+ routes, and issue commands over them.
+ </p>
+
+ <h2>Clients</h2>
+
+ <p>
+ Just as servers must, clients must first set up a route before they can
+ send boxes over it. A client uses the same methods as the server,
+ <code>Router.bindRoute</code> and <code>Route.connectTo</code>, to set up
+ a new route. Here's an example which makes one TCP connection to an AMP
+ server, sets up three routes, and then issues multiple commands over each
+ of them.
+ </p>
+
+ <a href="listings/amp/route_client.py" class="py-listing">
+ Routed counters client
+ </a>
+
+ <p>
+ Note first how <code>main</code> creates an <code>AMP</code> with a
+ <code>Router</code> instance. Note also how <code>makeRoutes</code>
+ binds and connects the protocol to the default route. This mirrors the
+ route setup which was done on the server and is necessary for the same
+ reasons.
+ </p>
+
+ <p>
+ Once an AMP connection is set up and the default route is bound,
+ <code>makeRoutes</code> uses the previously defined <code>connect</code>
+ function to establish three new routes. Each route is associated with a
+ <code>CountClient</code> instance which will issue several count commands
+ and report the results. The results of each command are tracked so that
+ when they have all been received the client can exit.
+ </p>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/index.xhtml new/Epsilon-0.7.2/doc/index.xhtml
--- old/Epsilon-0.7.1/doc/index.xhtml 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/index.xhtml 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Index</title>
+ </head>
+ <body>
+ <h1>Index</h1>
+
+ <ul class="toc">
+ <li>
+ <a href="amp-auth.xhtml">AMP Authentication</a>
+ </li>
+ <li>
+ <a href="amp-routes.xhtml">AMP Routes</a>
+ </li>
+ </ul>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/amp_auth_client.py new/Epsilon-0.7.2/doc/listings/amp/amp_auth_client.py
--- old/Epsilon-0.7.1/doc/listings/amp/amp_auth_client.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/amp_auth_client.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,42 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+"""
+An AMP client which connects to and authenticates with an AMP server using OTP,
+then issues a command.
+"""
+
+from twisted.internet.protocol import ClientCreator
+from twisted.cred.credentials import UsernamePassword
+from twisted.protocols.amp import AMP
+
+from epsilon.react import react
+from epsilon.ampauth import OTPLogin
+
+from auth_server import Add
+
+
+def add(proto):
+ return proto.callRemote(Add, left=17, right=33)
+
+
+def display(result):
+ print result
+
+
+def otpLogin(client):
+ client.callRemote(OTPLogin, pad='pad')
+ return client
+
+
+def main(reactor):
+ cc = ClientCreator(reactor, AMP)
+ d = cc.connectTCP('localhost', 7805)
+ d.addCallback(otpLogin)
+ d.addCallback(add)
+ d.addCallback(display)
+ return d
+
+
+if __name__ == '__main__':
+ from twisted.internet import reactor
+ react(reactor, main, [])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/amp_auth_server.py new/Epsilon-0.7.2/doc/listings/amp/amp_auth_server.py
--- old/Epsilon-0.7.1/doc/listings/amp/amp_auth_server.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/amp_auth_server.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,76 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+"""
+An AMP server which requires authentication of its clients before exposing an
+addition command.
+"""
+
+from sys import stdout
+
+from twisted.python.log import startLogging, msg
+from twisted.internet import reactor
+from twisted.cred.portal import Portal
+from twisted.protocols.amp import IBoxReceiver, Command, Integer, AMP
+
+from epsilon.ampauth import CredAMPServerFactory, OneTimePadChecker
+
+
+class Add(Command):
+ """
+ An example of an application-defined command which should be made available
+ to clients after they successfully authenticate.
+ """
+ arguments = [("left", Integer()),
+ ("right", Integer())]
+
+ response = [("sum", Integer())]
+
+
+
+class Adder(AMP):
+ """
+ An example of an application-defined AMP protocol, the responders defined
+ by which should only be available to clients after they have successfully
+ authenticated.
+ """
+ def __init__(self, avatarId):
+ AMP.__init__(self)
+ self.avatarId = avatarId
+
+
+ @Add.responder
+ def add(self, left, right):
+ msg("Adding %d to %d for %s" % (left, right, self.avatarId))
+ return {'sum': left + right}
+
+
+
+class AdditionRealm(object):
+ """
+ An example of an application-defined realm.
+ """
+ def requestAvatar(self, avatarId, mind, *interfaces):
+ """
+ Create Adder avatars for any IBoxReceiver request.
+ """
+ if IBoxReceiver in interfaces:
+ return (IBoxReceiver, Adder(avatarId), lambda: None)
+ raise NotImplementedError()
+
+
+
+def main():
+ """
+ Start the AMP server and the reactor.
+ """
+ startLogging(stdout)
+ checker = OneTimePadChecker({'pad': 0})
+ realm = AdditionRealm()
+ factory = CredAMPServerFactory(Portal(realm, [checker]))
+ reactor.listenTCP(7805, factory)
+ reactor.run()
+
+
+if __name__ == '__main__':
+ main()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/auth_client.py new/Epsilon-0.7.2/doc/listings/amp/auth_client.py
--- old/Epsilon-0.7.1/doc/listings/amp/auth_client.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/auth_client.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,37 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+"""
+An AMP client which connects to and authenticates with an AMP server, then
+issues a command.
+"""
+
+from twisted.internet.protocol import ClientCreator
+from twisted.cred.credentials import UsernamePassword
+from twisted.protocols.amp import AMP
+
+from epsilon.react import react
+from epsilon.ampauth import login
+
+from auth_server import Add
+
+
+def add(proto):
+ return proto.callRemote(Add, left=17, right=33)
+
+
+def display(result):
+ print result
+
+
+def main(reactor):
+ cc = ClientCreator(reactor, AMP)
+ d = cc.connectTCP('localhost', 7805)
+ d.addCallback(login, UsernamePassword("testuser", "examplepass"))
+ d.addCallback(add)
+ d.addCallback(display)
+ return d
+
+
+if __name__ == '__main__':
+ from twisted.internet import reactor
+ react(reactor, main, [])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/auth_server.py new/Epsilon-0.7.2/doc/listings/amp/auth_server.py
--- old/Epsilon-0.7.1/doc/listings/amp/auth_server.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/auth_server.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,77 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+"""
+An AMP server which requires authentication of its clients before exposing an
+addition command.
+"""
+
+from sys import stdout
+
+from twisted.python.log import startLogging, msg
+from twisted.internet import reactor
+from twisted.cred.checkers import InMemoryUsernamePasswordDatabaseDontUse
+from twisted.cred.portal import Portal
+from twisted.protocols.amp import IBoxReceiver, Command, Integer, AMP
+
+from epsilon.ampauth import CredAMPServerFactory
+
+
+class Add(Command):
+ """
+ An example of an application-defined command which should be made available
+ to clients after they successfully authenticate.
+ """
+ arguments = [("left", Integer()),
+ ("right", Integer())]
+
+ response = [("sum", Integer())]
+
+
+
+class Adder(AMP):
+ """
+ An example of an application-defined AMP protocol, the responders defined
+ by which should only be available to clients after they have successfully
+ authenticated.
+ """
+ def __init__(self, avatarId):
+ AMP.__init__(self)
+ self.avatarId = avatarId
+
+
+ @Add.responder
+ def add(self, left, right):
+ msg("Adding %d to %d for %s" % (left, right, self.avatarId))
+ return {'sum': left + right}
+
+
+
+class AdditionRealm(object):
+ """
+ An example of an application-defined realm.
+ """
+ def requestAvatar(self, avatarId, mind, *interfaces):
+ """
+ Create Adder avatars for any IBoxReceiver request.
+ """
+ if IBoxReceiver in interfaces:
+ return (IBoxReceiver, Adder(avatarId), lambda: None)
+ raise NotImplementedError()
+
+
+
+def main():
+ """
+ Start the AMP server and the reactor.
+ """
+ startLogging(stdout)
+ checker = InMemoryUsernamePasswordDatabaseDontUse()
+ checker.addUser("testuser", "examplepass")
+ realm = AdditionRealm()
+ factory = CredAMPServerFactory(Portal(realm, [checker]))
+ reactor.listenTCP(7805, factory)
+ reactor.run()
+
+
+if __name__ == '__main__':
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/route_client.py new/Epsilon-0.7.2/doc/listings/amp/route_client.py
--- old/Epsilon-0.7.1/doc/listings/amp/route_client.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/route_client.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,60 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+import random
+
+from twisted.internet.defer import Deferred, gatherResults
+from twisted.internet.protocol import ClientCreator
+from twisted.protocols.amp import AMP
+
+from epsilon.react import react
+from epsilon.amprouter import Router
+
+from route_setup import connect
+from route_server import Count
+
+
+def display(value, id):
+ print id, value
+
+
+class CountClient(AMP):
+ def __init__(self, identifier):
+ AMP.__init__(self)
+ self.identifier = identifier
+ self.finished = Deferred()
+
+ def startReceivingBoxes(self, sender):
+ AMP.startReceivingBoxes(self, sender)
+
+ counts = []
+ for i in range(random.randrange(1, 5)):
+ d = self.callRemote(Count)
+ d.addCallback(display, self.identifier)
+ counts.append(d)
+ gatherResults(counts).chainDeferred(self.finished)
+
+
+
+def makeRoutes(proto, router):
+ router.bindRoute(proto, None).connectTo(None)
+
+ finish = []
+ for i in range(3):
+ client = CountClient(i)
+ finish.append(connect(proto, router, client))
+ finish.append(client.finished)
+ return gatherResults(finish)
+
+
+
+def main(reactor):
+ router = Router()
+ cc = ClientCreator(reactor, AMP, router)
+ d = cc.connectTCP('localhost', 7805)
+ d.addCallback(makeRoutes, router)
+ return d
+
+
+if __name__ == '__main__':
+ from twisted.internet import reactor
+ react(reactor, main, [])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/route_server.py new/Epsilon-0.7.2/doc/listings/amp/route_server.py
--- old/Epsilon-0.7.1/doc/listings/amp/route_server.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/route_server.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,37 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+from sys import stdout
+
+from twisted.python.log import startLogging
+from twisted.protocols.amp import Integer, Command, AMP
+from twisted.internet import reactor
+
+from route_setup import AMPRouteServerFactory
+
+
+class Count(Command):
+ response = [('value', Integer())]
+
+
+
+class Counter(AMP):
+ _valueCounter = 0
+
+ @Count.responder
+ def count(self):
+ self._valueCounter += 1
+ return {'value': self._valueCounter}
+
+
+
+def main():
+ startLogging(stdout)
+ serverFactory = AMPRouteServerFactory()
+ serverFactory.routeProtocol = Counter
+ reactor.listenTCP(7805, serverFactory)
+ reactor.run()
+
+
+
+if __name__ == '__main__':
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/listings/amp/route_setup.py new/Epsilon-0.7.2/doc/listings/amp/route_setup.py
--- old/Epsilon-0.7.1/doc/listings/amp/route_setup.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/listings/amp/route_setup.py 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,49 @@
+# Copyright (c) 2008 Divmod. See LICENSE for details.
+
+import operator
+
+from twisted.internet.protocol import ServerFactory
+from twisted.protocols.amp import Unicode, Command, AMP
+
+from epsilon.amprouter import Router
+
+
+class NewRoute(Command):
+ arguments = [('name', Unicode())]
+ response = [('name', Unicode())]
+
+
+
+class RoutingAMP(AMP):
+ @NewRoute.responder
+ def newRoute(self, name):
+ route = self.boxReceiver.bindRoute(self.factory.routeProtocol())
+ route.connectTo(name)
+ return {'name': route.localRouteName}
+
+
+
+class AMPRouteServerFactory(ServerFactory):
+ protocol = RoutingAMP
+ routeProtocol = None
+
+ def buildProtocol(self, addr):
+ router = Router()
+ proto = self.protocol(router)
+ proto.factory = self
+ default = router.bindRoute(proto, None)
+ default.connectTo(None)
+ return proto
+
+
+
+def connect(proto, router, receiver):
+ route = router.bindRoute(receiver)
+ d = proto.callRemote(NewRoute, name=route.localRouteName)
+ d.addCallback(operator.getitem, 'name')
+ d.addCallback(lambda name: route.connectTo(name))
+ def connectionFailed(err):
+ route.unbind()
+ return err
+ d.addErrback(connectionFailed)
+ return d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/stylesheet.css new/Epsilon-0.7.2/doc/stylesheet.css
--- old/Epsilon-0.7.1/doc/stylesheet.css 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/stylesheet.css 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,129 @@
+body
+{
+ margin-left: 2em;
+ margin-right: 2em;
+ border: 0px;
+ padding: 0px;
+ font-family: sans-serif;
+}
+
+pre
+{
+ padding: 1em;
+ font-family: Neep Alt, Courier New, Courier;
+ font-size: 12pt;
+ border: thin black solid;
+}
+
+.python
+{
+ background-color: #dddddd;
+}
+
+.py-listing, .html-listing, .listing
+{
+ margin: 1ex;
+ border: thin solid black;
+ background-color: #eee;
+}
+
+.py-listing pre, .html-listing pre, .listing pre
+{
+ margin: 0px;
+ border: none;
+ border-bottom: thin solid black;
+}
+
+.py-listing .python
+{
+ margin-top: 0;
+ margin-bottom: 0;
+ border: none;
+ border-bottom: thin solid black;
+}
+
+.py-src-comment
+{
+ color: #1111CC
+}
+
+.py-src-keyword
+{
+ color: #3333CC;
+ font-weight: bold;
+}
+
+.py-src-parameter
+{
+ color: #000066;
+ font-weight: bold;
+}
+
+.py-src-identifier
+{
+ color: #CC0000
+}
+
+.py-src-string
+{
+ color: #115511
+}
+
+.py-src-endmarker
+{
+ display: block; /* IE hack; prevents following line from being sucked into the py-listing box. */
+}
+
+hr
+{
+ display: inline;
+}
+
+ul
+{
+ padding: 0px;
+ margin: 0px;
+ margin-left: 1em;
+ padding-left: 1em;
+ border-left: 1em;
+}
+
+li
+{
+ padding: 2px;
+}
+
+dt
+{
+ font-weight: bold;
+ margin-left: 1ex;
+}
+
+dd
+{
+ margin-bottom: 1em;
+}
+
+div.note
+{
+ background-color: #FFFFCC;
+ margin-top: 1ex;
+ margin-left: 5%;
+ margin-right: 5%;
+ padding-top: 1ex;
+ padding-left: 5%;
+ padding-right: 5%;
+ border: thin black solid;
+}
+
+.caption
+{
+ text-align: center;
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+}
+
+.filename
+{
+ font-style: italic;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/doc/template.tpl new/Epsilon-0.7.2/doc/template.tpl
--- old/Epsilon-0.7.1/doc/template.tpl 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/doc/template.tpl 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>
+ Epsilon:
+ </title>
+ <link type="text/css" rel="stylesheet" href="stylesheet.css" />
+ </head>
+
+ <body bgcolor="white">
+ <h1 class="title"></h1>
+ <div class="toc"></div>
+ <div class="body">
+
+ </div>
+
+ <p><a href="index.html">Index</a></p>
+ <span class="version">Version: </span>
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/epsilon/_version.py new/Epsilon-0.7.2/epsilon/_version.py
--- old/Epsilon-0.7.1/epsilon/_version.py 2015-10-10 15:54:51.000000000 +0200
+++ new/Epsilon-0.7.2/epsilon/_version.py 2018-06-24 08:15:20.000000000 +0200
@@ -11,8 +11,8 @@
{
"dirty": false,
"error": null,
- "full-revisionid": "a36710813df371d41a839d97f15e9580a8807034",
- "version": "0.7.1"
+ "full-revisionid": "1168ca87dc8e78c179934a35d86b7874938c6bcd",
+ "version": "0.7.2"
}
''' # END VERSION_JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/epsilon/scripts/benchmark.py new/Epsilon-0.7.2/epsilon/scripts/benchmark.py
--- old/Epsilon-0.7.1/epsilon/scripts/benchmark.py 2015-10-10 13:53:21.000000000 +0200
+++ new/Epsilon-0.7.2/epsilon/scripts/benchmark.py 2018-06-19 00:30:53.000000000 +0200
@@ -377,12 +377,8 @@
read_ms = None
write_ms = None
- twisted_version = twisted.version._getSVNVersion()
- if twisted_version is None:
- twisted_version = twisted.version.short()
- epsilon_version = epsilon.version._getSVNVersion()
- if epsilon_version is None:
- epsilon_version = epsilon.version.short()
+ twisted_version = twisted.version.short()
+ epsilon_version = epsilon.version.short()
Results(
version=STATS_VERSION,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/requirements-testing.txt new/Epsilon-0.7.2/requirements-testing.txt
--- old/Epsilon-0.7.1/requirements-testing.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/requirements-testing.txt 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,2 @@
+# Requirements for running the test suite using tox
+coverage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/setup.cfg new/Epsilon-0.7.2/setup.cfg
--- old/Epsilon-0.7.1/setup.cfg 2015-10-10 15:54:51.000000000 +0200
+++ new/Epsilon-0.7.2/setup.cfg 2018-06-24 08:15:20.000000000 +0200
@@ -9,5 +9,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/setup.py new/Epsilon-0.7.2/setup.py
--- old/Epsilon-0.7.1/setup.py 2015-10-10 13:53:21.000000000 +0200
+++ new/Epsilon-0.7.2/setup.py 2018-06-24 05:11:06.000000000 +0200
@@ -10,6 +10,7 @@
url="https://github.com/twisted/epsilon",
install_requires=[
+ "zope.interface",
"Twisted>=13.2.0",
"PyOpenSSL>=0.13"
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/testhotfix new/Epsilon-0.7.2/testhotfix
--- old/Epsilon-0.7.1/testhotfix 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/testhotfix 2015-01-24 22:02:05.000000000 +0100
@@ -0,0 +1,8 @@
+#!/usr/bin/python
+from epsilon import hotfix
+from twisted.python import filepath
+orig_a = filepath.FilePath('a')
+hotfix.require('twisted', 'filepath_copyTo')
+new_a = filepath.FilePath('a')
+print orig_a == new_a
+print orig_a.temporarySibling()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.1/tox.ini new/Epsilon-0.7.2/tox.ini
--- old/Epsilon-0.7.1/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/Epsilon-0.7.2/tox.ini 2017-09-26 08:11:57.000000000 +0200
@@ -0,0 +1,11 @@
+[tox]
+envlist = {py27,pypy}
+
+[testenv]
+deps =
+ .
+ coverage
+commands =
+ coverage run -m twisted.trial \
+ --temp-directory={envdir}/_trial {posargs:epsilon}
+ coverage report --rcfile={toxinidir}/.coveragerc