Hello community,

here is the log from the commit of package python-portend for 
openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-portend (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-portend.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-portend"

Sun Mar  1 08:50:57 2020 rev:11 rq:780304 version:2.5

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-portend/python-portend.changes  
2020-01-15 15:51:39.087536278 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-portend.new.26092/python-portend.changes   
    2020-03-01 08:51:02.305233212 +0100
@@ -1,0 +2,27 @@
+Mon Feb 24 11:13:56 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Fix up dependencies to match requirements
+
+-------------------------------------------------------------------
+Tue Jun 18 12:46:11 UTC 2019 - [email protected]
+
+- version update to 2.5
+  * #10: Fix race condition in ``occupied`` and ``free``
+
+-------------------------------------------------------------------
+Fri Apr  5 07:03:43 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.4:
+  * find_available_local_port now relies on socket.getaddrinfo to
+    find a suitable address family.
+
+-------------------------------------------------------------------
+Tue Mar  5 12:56:25 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.3:
+  * Fix README rendering.
+  * Merge with skeleton, including embedded license file.
+  * #1: Removed portend._getaddrinfo and its usage in Checker.assert_free.
+  * #5: Restored use of portend.client_host during assert_free check on 
Windows, fixing check when the bind address is *ADDR_ANY.
+
+-------------------------------------------------------------------

Old:
----
  portend-1.8.tar.gz

New:
----
  portend-2.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-portend.spec ++++++
--- /var/tmp/diff_new_pack.QUYdWo/_old  2020-03-01 08:51:02.617233832 +0100
+++ /var/tmp/diff_new_pack.QUYdWo/_new  2020-03-01 08:51:02.617233832 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-portend
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,27 +12,27 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-portend
-Version:        1.8
+Version:        2.5
 Release:        0
-License:        MIT
 Summary:        TCP port monitoring utilities
-Url:            https://github.com/jaraco/portend
+License:        MIT
 Group:          Development/Languages/Python
+URL:            https://github.com/jaraco/portend
 Source:         
https://files.pythonhosted.org/packages/source/p/portend/portend-%{version}.tar.gz
-BuildRequires:  python-rpm-macros
-BuildRequires:  %{python_module setuptools}
-BuildRequires:  %{python_module setuptools_scm}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module tempora}
-Requires:       python-tempora
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  %{python_module setuptools_scm >= 1.15.0}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module tempora >= 1.8}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+Requires:       python-tempora >= 1.8
 BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -47,18 +47,22 @@
 
 %prep
 %setup -q -n portend-%{version}
+# do not require cov/xdist/etc
+sed -i -e '/addopts/d' pytest.ini
 
 %build
 %python_build
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 %python_exec -m pytest test_portend.py
 
 %files %{python_files}
-%defattr(-,root,root,-)
+%license LICENSE
+%doc CHANGES.rst README.rst
 %{python_sitelib}/*
 
 %changelog

++++++ portend-1.8.tar.gz -> portend-2.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/.flake8 new/portend-2.5/.flake8
--- old/portend-1.8/.flake8     1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/.flake8     2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,9 @@
+[flake8]
+max-line-length = 88
+ignore =
+       # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
+       W503
+       # W504 has issues 
https://github.com/OCA/maintainer-quality-tools/issues/545
+       W504
+       # Black creates whitespace before colon
+       E203
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/.pre-commit-config.yaml 
new/portend-2.5/.pre-commit-config.yaml
--- old/portend-1.8/.pre-commit-config.yaml     1970-01-01 01:00:00.000000000 
+0100
+++ new/portend-2.5/.pre-commit-config.yaml     2019-06-11 02:56:58.000000000 
+0200
@@ -0,0 +1,5 @@
+repos:
+- repo: https://github.com/ambv/black
+  rev: 18.9b0
+  hooks:
+  - id: black
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/.readthedocs.yml 
new/portend-2.5/.readthedocs.yml
--- old/portend-1.8/.readthedocs.yml    1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/.readthedocs.yml    2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,5 @@
+python:
+  version: 3
+  extra_requirements:
+    - docs
+  pip_install: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/.travis.yml new/portend-2.5/.travis.yml
--- old/portend-1.8/.travis.yml 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/.travis.yml 2019-06-11 02:56:58.000000000 +0200
@@ -1,25 +1,33 @@
-sudo: false
+dist: xenial
 language: python
+
 python:
-- 2.6
 - 2.7
 - 3.6
+- &latest_py3 3.7
+
+jobs:
+  fast_finish: true
+  include:
+  - stage: deploy
+    if: tag IS present
+    python: *latest_py3
+    before_script: skip
+    env:
+    - TWINE_USERNAME=jaraco
+    # TWINE_PASSWORD
+    - secure: 
I9gYsaelJuAp9MzZCQnw5cVfaZxjNtf1MarEv94oh7tW73Y0i+VYVTa5r2NDqbX9r4W+rFxuSKKgcuKbOxk39DJL5Yy5EjTm0SkmIjdGQuxIiAseWbMKfnoIv14J6ebwnKN+fUIYum8G8UJD4uOUiDbjxhL/m7pUcNjtxP3NLxWyITk9XyTS+3pQDL2XB0/bNMEMgfXenHiW6H+u2piWTXxQfPV/JmdkU3upQ5bkkIXP3njyirif2e2kC974Zbs3ajxVQGpgqKZ/3dirzH834UhzTHzhY7KTSdMh2IVyZJG5rEnDDrry63G3zKbphtsg7z/7K5uu8Lnx/O+vh7FDQCIkfJ7oKXU6fBFTFlRvnOFRy43qBor7EbmJi5GEWKvFzz/7hahR667OdHdyiPn1CCtXUpAApZJS+SgOhHkMvpn+mY3u8L1e7cS+RbsJkbY94Gll1vcgn5JQAMVwdiOtyWi4xqOlu1OEPe12/yVGVPhUe/FlNRRw30JY6MT4bd2Y+vo3yW4Aur69QfIiRzND0aAG9z55WmzP+zw/R68jjxXO5O7pNUoxoxUSJ6ay+oTAOEc+WCP8dGzG32CUDabgcRJg0NJhQMF/aYb6pAleNvuCK+zVGUAEui7Vdc7A0IMJ3eGWjJ4hEao8PtkdmhVQJ6CuHlYhHle5mi1DTAFYOVU=
+    - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
+    script: tox -e release
+
+cache: pip
+
 install:
-- pip install tox "setuptools>=28.2"
-script:
-- tox
-branches:
-  except:
-  - skeleton
-deploy:
-  provider: pypi
-  server: https://upload.pypi.org/legacy/
-  on:
-    tags: true
-    all_branches: true
-    python: 3.6
-  user: jaraco
-  distributions: dists
-  skip_upload_docs: true
-  password:
-    secure: 
vdFaBpjDV3pL+wS+uBguSyrWzIMYI238bovE6TFeEbCeXkAFpoS+Po+HKw76dpcVN4eTRwOqYuw9kZ+4spnl1RmgeTEsT8VwJQQTkpRmQ6KzikTMXya2KI3wFuKpB1x7ZFVaLasxtZ4+MULwgH5tE31YDulLWKPIJ6mn5sYcL0d3BbbKS7QPalF3KhJatWHEXjpj7j0XzW9wkjmeY1cmaVj+YQxNk5wMJQtFnrzS6Q0VI3ju+2RSRQUjXvnTPkK9bR0HUAJQOG9BWfNjcSGkPLvSp5BqAUiER8WYP7EAxjy51GHJZnXl95LGd1i9rJX3S3fN/e7QrYcGsmXA/jNK9qJ3C+QBhF70DqgZn2m9t8bmTWIQexV2DLNTZydU6VfrLvXUUiudXmQV6wk5/yhiR9jAKY2cJAsbTZ8wtsjAqQybEJBDZGyMRiUhTpUXBxYI9v5kpdvPVNe/gmGRCjwMmzwvwdcVBGSkVqfWoijvIRiE5+5fqEn2WnfLc8r4aFIvf0kusS1ZgSy9tt9UKQIPPNt9s12BfKx/vobDrEbFLZvDR6Cxyucq4znR12LWijosZINWVwSOpTXfgGJpFbDHwWzI8Z7/xfeSYoWjg8XJl2yeiXG+jCKKvYjpOU3e2Pw5d+MvhIyJJnRFBb7+kDyZktGqECVsIUfWrrlkFXuVfAQ=
+- pip install tox tox-venv
+
+before_script:
+  # Disable IPv6. Ref travis-ci/travis-ci#8361
+  - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
+      sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
+    fi
+script: tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/CHANGES.rst new/portend-2.5/CHANGES.rst
--- old/portend-1.8/CHANGES.rst 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/CHANGES.rst 2019-06-11 02:56:58.000000000 +0200
@@ -1,3 +1,48 @@
+2.5
+===
+
+#10: Fix race condition in ``occupied`` and ``free``.
+
+2.4
+===
+
+#6: ``find_available_local_port`` now relies on
+    ``socket.getaddrinfo`` to find a suitable address
+    family.
+
+2.3
+===
+
+Package refresh.
+
+2.2
+===
+
+Merge with skeleton, including embedded license file.
+
+2.1.2
+=====
+
+Fix README rendering.
+
+2.1.1
+=====
+
+#5: Restored use of ``portend.client_host`` during
+    ``assert_free`` check on Windows, fixing check
+    when the bind address is *ADDR_ANY.
+
+2.1
+===
+
+Use tempora.timing.Timer from tempora 1.8, replacing
+boilerplate code in occupied and free functions.
+
+#1: Removed ``portend._getaddrinfo`` and its usage in
+    ``Checker.assert_free``.
+
+Dropped support for Python 2.6.
+
 1.8
 ===
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/LICENSE new/portend-2.5/LICENSE
--- old/portend-1.8/LICENSE     1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/LICENSE     2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,7 @@
+Copyright Jason R. Coombs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/PKG-INFO new/portend-2.5/PKG-INFO
--- old/portend-1.8/PKG-INFO    2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/PKG-INFO    2019-06-11 02:57:16.000000000 +0200
@@ -1,7 +1,7 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: portend
-Version: 1.8
-Summary: TCP port monitoring utilities
+Version: 2.5
+Summary: TCP port monitoring and discovery
 Home-page: https://github.com/jaraco/portend
 Author: Jason R. Coombs
 Author-email: [email protected]
@@ -11,10 +11,18 @@
         
         .. image:: https://img.shields.io/pypi/pyversions/portend.svg
         
-        .. image:: https://img.shields.io/pypi/dm/portend.svg
-        
         .. image:: https://img.shields.io/travis/jaraco/portend/master.svg
-           :target: http://travis-ci.org/jaraco/portend
+           :target: https://travis-ci.org/jaraco/portend
+        
+        .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+           :target: https://github.com/ambv/black
+           :alt: Code style: Black
+        
+        .. image:: https://img.shields.io/appveyor/ci/jaraco/portend/master.svg
+           :target: 
https://ci.appveyor.com/project/jaraco/portend/branch/master
+        
+        .. image:: 
https://readthedocs.org/projects/portend/badge/?version=latest
+           :target: https://portend.readthedocs.io/en/latest/?badge=latest
         
         por·tend
         pôrˈtend/
@@ -22,13 +30,6 @@
         
             be a sign or warning that (something, especially something 
momentous or calamitous) is likely to happen.
         
-        License
-        =======
-        
-        License is indicated in the project metadata (typically one or more
-        of the Trove classifiers). For more details, see `this explanation
-        <https://github.com/jaraco/skeleton/issues/1>`_.
-        
         Usage
         =====
         
@@ -60,19 +61,21 @@
             print(port, "is available for binding")
         
         Portend additionally exposes the lower-level port checking 
functionality
-        in the :class:`Checker` class, which currently exposes only one public
-        method, ``assert_free``.
+        in the ``Checker`` class, which currently exposes only one public
+        method, ``assert_free``::
         
             portend.Checker().assert_free('localhost', 31923)
         
         If assert_free is passed a host/port combination that is occupied by
         a bound listener (i.e. a TCP connection is established to that 
host/port),
-        assert_free will raise a :class:`PortNotFree` exception.
+        assert_free will raise a ``PortNotFree`` exception.
         
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7
+Provides-Extra: docs
+Provides-Extra: testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/README.rst new/portend-2.5/README.rst
--- old/portend-1.8/README.rst  2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/README.rst  2019-06-11 02:56:58.000000000 +0200
@@ -3,10 +3,18 @@
 
 .. image:: https://img.shields.io/pypi/pyversions/portend.svg
 
-.. image:: https://img.shields.io/pypi/dm/portend.svg
-
 .. image:: https://img.shields.io/travis/jaraco/portend/master.svg
-   :target: http://travis-ci.org/jaraco/portend
+   :target: https://travis-ci.org/jaraco/portend
+
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+   :target: https://github.com/ambv/black
+   :alt: Code style: Black
+
+.. image:: https://img.shields.io/appveyor/ci/jaraco/portend/master.svg
+   :target: https://ci.appveyor.com/project/jaraco/portend/branch/master
+
+.. image:: https://readthedocs.org/projects/portend/badge/?version=latest
+   :target: https://portend.readthedocs.io/en/latest/?badge=latest
 
 por·tend
 pôrˈtend/
@@ -14,13 +22,6 @@
 
     be a sign or warning that (something, especially something momentous or 
calamitous) is likely to happen.
 
-License
-=======
-
-License is indicated in the project metadata (typically one or more
-of the Trove classifiers). For more details, see `this explanation
-<https://github.com/jaraco/skeleton/issues/1>`_.
-
 Usage
 =====
 
@@ -52,11 +53,11 @@
     print(port, "is available for binding")
 
 Portend additionally exposes the lower-level port checking functionality
-in the :class:`Checker` class, which currently exposes only one public
-method, ``assert_free``.
+in the ``Checker`` class, which currently exposes only one public
+method, ``assert_free``::
 
     portend.Checker().assert_free('localhost', 31923)
 
 If assert_free is passed a host/port combination that is occupied by
 a bound listener (i.e. a TCP connection is established to that host/port),
-assert_free will raise a :class:`PortNotFree` exception.
+assert_free will raise a ``PortNotFree`` exception.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/appveyor.yml new/portend-2.5/appveyor.yml
--- old/portend-1.8/appveyor.yml        1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/appveyor.yml        2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,24 @@
+environment:
+
+  APPVEYOR: true
+
+  matrix:
+    - PYTHON: "C:\\Python36-x64"
+    - PYTHON: "C:\\Python27-x64"
+
+install:
+  # symlink python from a directory with a space
+  - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%"
+  - "SET PYTHON=\"C:\\Program Files\\Python\""
+  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
+
+build: off
+
+cache:
+  - '%LOCALAPPDATA%\pip\Cache'
+
+test_script:
+  - "python -m pip install tox tox-venv"
+  - "tox"
+
+version: '{build}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/docs/conf.py new/portend-2.5/docs/conf.py
--- old/portend-1.8/docs/conf.py        2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/docs/conf.py        2019-06-11 02:56:58.000000000 +0200
@@ -1,47 +1,26 @@
 #!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
-import os
-import sys
-import subprocess
+extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
 
-extensions = [
-    'sphinx.ext.autodoc',
-    'rst.linker',
-]
-
-# General information about the project.
-
-root = os.path.join(os.path.dirname(__file__), '..')
-setup_script = os.path.join(root, 'setup.py')
-fields = ['--name', '--version', '--url', '--author']
-dist_info_cmd = [sys.executable, setup_script] + fields
-output_bytes = subprocess.check_output(dist_info_cmd, cwd=root)
-project, version, url, author = 
output_bytes.decode('utf-8').strip().split('\n')
-
-copyright = '2014-2017 ' + author
-
-# The full version, including alpha/beta/rc tags.
-release = version
-
-master_doc = 'index'
+master_doc = "index"
 
 link_files = {
-       '../CHANGES.rst': dict(
-               using=dict(
-                       GH='https://github.com',
-                       project=project,
-                       url=url,
-               ),
-               replace=[
-                       dict(
-                               pattern=r"(Issue )?#(?P<issue>\d+)",
-                               url='{url}/issues/{issue}',
-                       ),
-                       dict(
-                               
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
-                               with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
-                       ),
-               ],
-       ),
+    '../CHANGES.rst': dict(
+        using=dict(GH='https://github.com'),
+        replace=[
+            dict(
+                pattern=r'(Issue #|\B#)(?P<issue>\d+)',
+                url='{package_url}/issues/{issue}',
+            ),
+            dict(
+                pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
+                with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
+            ),
+            dict(
+                pattern=r'PEP[- ](?P<pep_number>\d+)',
+                url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
+            ),
+        ],
+    )
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/docs/requirements.txt 
new/portend-2.5/docs/requirements.txt
--- old/portend-1.8/docs/requirements.txt       2017-01-23 15:32:22.000000000 
+0100
+++ new/portend-2.5/docs/requirements.txt       1970-01-01 01:00:00.000000000 
+0100
@@ -1 +0,0 @@
-rst.linker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/portend.egg-info/PKG-INFO 
new/portend-2.5/portend.egg-info/PKG-INFO
--- old/portend-1.8/portend.egg-info/PKG-INFO   2017-01-23 15:32:47.000000000 
+0100
+++ new/portend-2.5/portend.egg-info/PKG-INFO   2019-06-11 02:57:16.000000000 
+0200
@@ -1,7 +1,7 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: portend
-Version: 1.8
-Summary: TCP port monitoring utilities
+Version: 2.5
+Summary: TCP port monitoring and discovery
 Home-page: https://github.com/jaraco/portend
 Author: Jason R. Coombs
 Author-email: [email protected]
@@ -11,10 +11,18 @@
         
         .. image:: https://img.shields.io/pypi/pyversions/portend.svg
         
-        .. image:: https://img.shields.io/pypi/dm/portend.svg
-        
         .. image:: https://img.shields.io/travis/jaraco/portend/master.svg
-           :target: http://travis-ci.org/jaraco/portend
+           :target: https://travis-ci.org/jaraco/portend
+        
+        .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+           :target: https://github.com/ambv/black
+           :alt: Code style: Black
+        
+        .. image:: https://img.shields.io/appveyor/ci/jaraco/portend/master.svg
+           :target: 
https://ci.appveyor.com/project/jaraco/portend/branch/master
+        
+        .. image:: 
https://readthedocs.org/projects/portend/badge/?version=latest
+           :target: https://portend.readthedocs.io/en/latest/?badge=latest
         
         por·tend
         pôrˈtend/
@@ -22,13 +30,6 @@
         
             be a sign or warning that (something, especially something 
momentous or calamitous) is likely to happen.
         
-        License
-        =======
-        
-        License is indicated in the project metadata (typically one or more
-        of the Trove classifiers). For more details, see `this explanation
-        <https://github.com/jaraco/skeleton/issues/1>`_.
-        
         Usage
         =====
         
@@ -60,19 +61,21 @@
             print(port, "is available for binding")
         
         Portend additionally exposes the lower-level port checking 
functionality
-        in the :class:`Checker` class, which currently exposes only one public
-        method, ``assert_free``.
+        in the ``Checker`` class, which currently exposes only one public
+        method, ``assert_free``::
         
             portend.Checker().assert_free('localhost', 31923)
         
         If assert_free is passed a host/port combination that is occupied by
         a bound listener (i.e. a TCP connection is established to that 
host/port),
-        assert_free will raise a :class:`PortNotFree` exception.
+        assert_free will raise a ``PortNotFree`` exception.
         
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7
+Provides-Extra: docs
+Provides-Extra: testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/portend.egg-info/SOURCES.txt 
new/portend-2.5/portend.egg-info/SOURCES.txt
--- old/portend-1.8/portend.egg-info/SOURCES.txt        2017-01-23 
15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/SOURCES.txt        2019-06-11 
02:57:16.000000000 +0200
@@ -1,20 +1,24 @@
+.flake8
+.pre-commit-config.yaml
+.readthedocs.yml
 .travis.yml
 CHANGES.rst
+LICENSE
 README.rst
+appveyor.yml
 portend.py
+pyproject.toml
 pytest.ini
 setup.cfg
 setup.py
+skeleton.md
 test_portend.py
 tox.ini
 docs/conf.py
 docs/history.rst
 docs/index.rst
-docs/requirements.txt
 portend.egg-info/PKG-INFO
 portend.egg-info/SOURCES.txt
 portend.egg-info/dependency_links.txt
-portend.egg-info/namespace_packages.txt
 portend.egg-info/requires.txt
-portend.egg-info/top_level.txt
-tests/requirements.txt
\ No newline at end of file
+portend.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/portend.egg-info/namespace_packages.txt 
new/portend-2.5/portend.egg-info/namespace_packages.txt
--- old/portend-1.8/portend.egg-info/namespace_packages.txt     2017-01-23 
15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/namespace_packages.txt     1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/portend.egg-info/requires.txt 
new/portend-2.5/portend.egg-info/requires.txt
--- old/portend-1.8/portend.egg-info/requires.txt       2017-01-23 
15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/requires.txt       2019-06-11 
02:57:16.000000000 +0200
@@ -1,4 +1,12 @@
-tempora
+tempora>=1.8
 
-[:python_version == "2.6"]
-argparse
+[docs]
+sphinx
+jaraco.packaging>=3.2
+rst.linker>=1.9
+
+[testing]
+pytest!=3.7.3,>=3.5
+pytest-checkdocs
+pytest-flake8
+pytest-black-multipy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/portend.py new/portend-2.5/portend.py
--- old/portend-1.8/portend.py  2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/portend.py  2019-06-11 02:56:58.000000000 +0200
@@ -8,249 +8,215 @@
 
 import time
 import socket
-import datetime
 import argparse
 import sys
 import itertools
 import contextlib
-import collections
-import textwrap
-import warnings
+import platform
+
+try:
+    from collections import abc
+except ImportError:
+    import collections as abc
 
 from tempora import timing
 
 
 def client_host(server_host):
-       """Return the host on which a client can connect to the given 
listener."""
-       if server_host == '0.0.0.0':
-               # 0.0.0.0 is INADDR_ANY, which should answer on localhost.
-               return '127.0.0.1'
-       if server_host in ('::', '::0', '::0.0.0.0'):
-               # :: is IN6ADDR_ANY, which should answer on localhost.
-               # ::0 and ::0.0.0.0 are non-canonical but common
-               # ways to write IN6ADDR_ANY.
-               return '::1'
-       return server_host
-
-
-def _getaddrinfo(host, port, *args, **kwargs):
-       """
-       Provide a fallback when getaddrinfo fails.
-       """
-       try:
-               return socket.getaddrinfo(host, port, *args, **kwargs)
-       except socket.gaierror:
-               msg = textwrap.dedent("""
-                       This functionality is being considered for removal. If 
you
-                       encounter this message, please describe your use-case
-                       at https://github.com/jaraco/portend/issues/1.
-                       """).lstrip()
-               warnings.warn(msg)
-               host = client_host(host)
-               if ':' in host:
-                       family = socket.AF_INET6
-                       addr = host, port, 0, 0
-               else:
-                       family = socket.AF_INET
-                       addr = host, port
-               item = family, socket.SOCK_STREAM, 0, "", addr
-               return [item]
+    """Return the host on which a client can connect to the given listener."""
+    if server_host == '0.0.0.0':
+        # 0.0.0.0 is INADDR_ANY, which should answer on localhost.
+        return '127.0.0.1'
+    if server_host in ('::', '::0', '::0.0.0.0'):
+        # :: is IN6ADDR_ANY, which should answer on localhost.
+        # ::0 and ::0.0.0.0 are non-canonical but common
+        # ways to write IN6ADDR_ANY.
+        return '::1'
+    return server_host
 
 
 class Checker(object):
-       def __init__(self, timeout=1.0):
-               self.timeout = timeout
+    def __init__(self, timeout=1.0):
+        self.timeout = timeout
 
-       def assert_free(self, host, port=None):
-               """
-               Assert that the given addr is free
-               in that all attempts to connect fail within the timeout
-               or raise a PortNotFree exception.
-
-               >>> free_port = find_available_local_port()
-
-               >>> Checker().assert_free('localhost', free_port)
-               >>> Checker().assert_free('127.0.0.1', free_port)
-               >>> Checker().assert_free('::1', free_port)
-
-               Also accepts an addr tuple
-
-               >>> addr = '::1', free_port, 0, 0
-               >>> Checker().assert_free(addr)
-               """
-               if port is None and isinstance(host, collections.Sequence):
-                       host, port = host[:2]
-               info = _getaddrinfo(host, port, socket.AF_UNSPEC, 
socket.SOCK_STREAM)
-               list(itertools.starmap(self._connect, info))
-
-       def _connect(self, af, socktype, proto, canonname, sa):
-               s = socket.socket(af, socktype, proto)
-               # fail fast with a small timeout
-               s.settimeout(self.timeout)
-
-               with contextlib.closing(s):
-                       try:
-                               s.connect(sa)
-                       except socket.error:
-                               return
-
-               # the connect succeeded, so the port isn't free
-               port, host = sa[:2]
-               tmpl = "Port {port} is in use on {host}."
-               raise PortNotFree(tmpl.format(**locals()))
+    def assert_free(self, host, port=None):
+        """
+        Assert that the given addr is free
+        in that all attempts to connect fail within the timeout
+        or raise a PortNotFree exception.
+
+        >>> free_port = find_available_local_port()
+
+        >>> Checker().assert_free('localhost', free_port)
+        >>> Checker().assert_free('127.0.0.1', free_port)
+        >>> Checker().assert_free('::1', free_port)
+
+        Also accepts an addr tuple
+
+        >>> addr = '::1', free_port, 0, 0
+        >>> Checker().assert_free(addr)
+
+        Host might refer to a server bind address like '::', which
+        should use localhost to perform the check.
+
+        >>> Checker().assert_free('::', free_port)
+        """
+        if port is None and isinstance(host, abc.Sequence):
+            host, port = host[:2]
+        if platform.system() == 'Windows':
+            host = client_host(host)
+        info = socket.getaddrinfo(host, port, socket.AF_UNSPEC, 
socket.SOCK_STREAM)
+        list(itertools.starmap(self._connect, info))
+
+    def _connect(self, af, socktype, proto, canonname, sa):
+        s = socket.socket(af, socktype, proto)
+        # fail fast with a small timeout
+        s.settimeout(self.timeout)
+
+        with contextlib.closing(s):
+            try:
+                s.connect(sa)
+            except socket.error:
+                return
+
+        # the connect succeeded, so the port isn't free
+        port, host = sa[:2]
+        tmpl = "Port {port} is in use on {host}."
+        raise PortNotFree(tmpl.format(**locals()))
 
 
 class Timeout(IOError):
-       pass
+    pass
 
 
 class PortNotFree(IOError):
-       pass
+    pass
 
 
 def free(host, port, timeout=float('Inf')):
-       """
-       Wait for the specified port to become free (dropping or rejecting
-       requests). Return when the port is free or raise a Timeout if timeout 
has
-       elapsed.
-
-       Timeout may be specified in seconds or as a timedelta.
-       If timeout is None or ∞, the routine will run indefinitely.
-
-       >>> free('localhost', find_available_local_port())
-       """
-       if not host:
-               raise ValueError("Host values of '' or None are not allowed.")
-
-       if isinstance(timeout, datetime.timedelta):
-               timeout = timeout.total_seconds()
-
-       if timeout is None:
-               # treat None as infinite timeout
-               timeout = float('Inf')
-
-       watch = timing.Stopwatch()
-
-       while total_seconds(watch.split()) < timeout:
-               try:
-                       # Expect a free port, so use a small timeout
-                       Checker(timeout=0.1).assert_free(host, port)
-                       return
-               except PortNotFree:
-                       # Politely wait.
-                       time.sleep(0.1)
+    """
+    Wait for the specified port to become free (dropping or rejecting
+    requests). Return when the port is free or raise a Timeout if timeout has
+    elapsed.
+
+    Timeout may be specified in seconds or as a timedelta.
+    If timeout is None or ∞, the routine will run indefinitely.
+
+    >>> free('localhost', find_available_local_port())
+    """
+    if not host:
+        raise ValueError("Host values of '' or None are not allowed.")
+
+    timer = timing.Timer(timeout)
+
+    while True:
+        try:
+            # Expect a free port, so use a small timeout
+            Checker(timeout=0.1).assert_free(host, port)
+            return
+        except PortNotFree:
+            if timer.expired():
+                raise Timeout("Port {port} not free on 
{host}.".format(**locals()))
+            # Politely wait.
+            time.sleep(0.1)
+
 
-       raise Timeout("Port {port} not free on {host}.".format(**locals()))
 wait_for_free_port = free
 
 
 def occupied(host, port, timeout=float('Inf')):
-       """
-       Wait for the specified port to become occupied (accepting requests).
-       Return when the port is occupied or raise a Timeout if timeout has
-       elapsed.
-
-       Timeout may be specified in seconds or as a timedelta.
-       If timeout is None or ∞, the routine will run indefinitely.
-
-       >>> occupied('localhost', find_available_local_port(), .1) # doctest: 
+IGNORE_EXCEPTION_DETAIL
-       Traceback (most recent call last):
-           ...
-       Timeout: Port ... not bound on localhost.
-       """
-       if not host:
-               raise ValueError("Host values of '' or None are not allowed.")
-
-       if isinstance(timeout, datetime.timedelta):
-               timeout = timeout.total_seconds()
-
-       if timeout is None:
-               # treat None as infinite timeout
-               timeout = float('Inf')
-
-       watch = timing.Stopwatch()
-
-       while total_seconds(watch.split()) < timeout:
-               try:
-                       Checker(timeout=.5).assert_free(host, port)
-                       # Politely wait
-                       time.sleep(0.1)
-               except PortNotFree:
-                       # port is occupied
-                       return
+    """
+    Wait for the specified port to become occupied (accepting requests).
+    Return when the port is occupied or raise a Timeout if timeout has
+    elapsed.
+
+    Timeout may be specified in seconds or as a timedelta.
+    If timeout is None or ∞, the routine will run indefinitely.
+
+    >>> occupied('localhost', find_available_local_port(), .1)
+    Traceback (most recent call last):
+    ...
+    Timeout: Port ... not bound on localhost.
+    """
+    if not host:
+        raise ValueError("Host values of '' or None are not allowed.")
+
+    timer = timing.Timer(timeout)
+
+    while True:
+        try:
+            Checker(timeout=0.5).assert_free(host, port)
+            if timer.expired():
+                raise Timeout("Port {port} not bound on 
{host}.".format(**locals()))
+            # Politely wait
+            time.sleep(0.1)
+        except PortNotFree:
+            # port is occupied
+            return
+
 
-       raise Timeout("Port {port} not bound on {host}.".format(**locals()))
 wait_for_occupied_port = occupied
 
 
 def find_available_local_port():
-       """
-       Find a free port on localhost.
+    """
+    Find a free port on localhost.
 
-       >>> 0 < find_available_local_port() < 65536
-       True
-       """
-       sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
-       addr = '', 0
-       sock.bind(addr)
-       addr, port = sock.getsockname()[:2]
-       sock.close()
-       return port
+    >>> 0 < find_available_local_port() < 65536
+    True
+    """
+    infos = socket.getaddrinfo(None, 0, socket.AF_UNSPEC, socket.SOCK_STREAM)
+    family, proto, _, _, addr = next(iter(infos))
+    sock = socket.socket(family, proto)
+    sock.bind(addr)
+    addr, port = sock.getsockname()[:2]
+    sock.close()
+    return port
 
 
 class HostPort(str):
-       """
-       A simple representation of a host/port pair as a string
+    """
+    A simple representation of a host/port pair as a string
 
-       >>> hp = HostPort('localhost:32768')
+    >>> hp = HostPort('localhost:32768')
 
-       >>> hp.host
-       'localhost'
+    >>> hp.host
+    'localhost'
 
-       >>> hp.port
-       32768
-
-       >>> len(hp)
-       15
-       """
-
-       @property
-       def host(self):
-               host, sep, port = self.partition(':')
-               return host
-
-       @property
-       def port(self):
-               host, sep, port = self.partition(':')
-               return int(port)
+    >>> hp.port
+    32768
+
+    >>> len(hp)
+    15
+    """
+
+    @property
+    def host(self):
+        host, sep, port = self.partition(':')
+        return host
+
+    @property
+    def port(self):
+        host, sep, port = self.partition(':')
+        return int(port)
 
 
 def _main():
-       parser = argparse.ArgumentParser()
-       global_lookup = lambda key: globals()[key]
-       parser.add_argument('target', metavar='host:port', type=HostPort)
-       parser.add_argument('func', metavar='state', type=global_lookup)
-       parser.add_argument('-t', '--timeout', default=None, type=float)
-       args = parser.parse_args()
-       try:
-               args.func(args.target.host, args.target.port, 
timeout=args.timeout)
-       except Timeout as timeout:
-               print(timeout, file=sys.stderr)
-               raise SystemExit(1)
-
-
-# from jaraco.compat
-def total_seconds(td):
-       """
-       Python 2.7 adds a total_seconds method to timedelta objects.
-       See 
http://docs.python.org/library/datetime.html#datetime.timedelta.total_seconds
-       """
-       try:
-               result = td.total_seconds()
-       except AttributeError:
-               result = (td.microseconds + (td.seconds + td.days * 24 * 3600) 
* 10**6) / 10**6
-       return result
+    parser = argparse.ArgumentParser()
+
+    def global_lookup(key):
+        return globals()[key]
+
+    parser.add_argument('target', metavar='host:port', type=HostPort)
+    parser.add_argument('func', metavar='state', type=global_lookup)
+    parser.add_argument('-t', '--timeout', default=None, type=float)
+    args = parser.parse_args()
+    try:
+        args.func(args.target.host, args.target.port, timeout=args.timeout)
+    except Timeout as timeout:
+        print(timeout, file=sys.stderr)
+        raise SystemExit(1)
 
 
 if __name__ == '__main__':
-       _main()
+    _main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/pyproject.toml 
new/portend-2.5/pyproject.toml
--- old/portend-1.8/pyproject.toml      1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/pyproject.toml      2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,6 @@
+[build-system]
+requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
+build-backend = "setuptools.build_meta"
+
+[tool.black]
+skip-string-normalization = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/pytest.ini new/portend-2.5/pytest.ini
--- old/portend-1.8/pytest.ini  2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/pytest.ini  2019-06-11 02:56:58.000000000 +0200
@@ -1,4 +1,11 @@
 [pytest]
-norecursedirs=dist build .tox docs
-addopts=--doctest-modules
-doctest_optionflags=ALLOW_UNICODE ELLIPSIS
+norecursedirs=dist build .tox .eggs
+addopts=--doctest-modules --flake8 --black
+doctest_optionflags=ALLOW_UNICODE ELLIPSIS IGNORE_EXCEPTION_DETAIL
+filterwarnings=
+       ignore:Possible nested set::pycodestyle:113
+       ignore:Using or importing the ABCs::flake8:410
+       # workaround for https://sourceforge.net/p/docutils/bugs/348/
+       ignore:'U' mode is deprecated::docutils.io
+       # workaround for https://gitlab.com/pycqa/flake8/issues/275
+       ignore:You passed a bytestring as `filenames`.::flake8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/setup.cfg new/portend-2.5/setup.cfg
--- old/portend-1.8/setup.cfg   2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/setup.cfg   2019-06-11 02:57:16.000000000 +0200
@@ -1,12 +1,43 @@
-[aliases]
-release = dists upload
-dists = clean --all sdist bdist_wheel
-
-[wheel]
+[bdist_wheel]
 universal = 1
 
+[metadata]
+license_file = LICENSE
+name = portend
+author = Jason R. Coombs
+author_email = [email protected]
+description = TCP port monitoring and discovery
+long_description = file:README.rst
+url = https://github.com/jaraco/portend
+classifiers = 
+       Development Status :: 5 - Production/Stable
+       Intended Audience :: Developers
+       License :: OSI Approved :: MIT License
+       Programming Language :: Python :: 2.7
+       Programming Language :: Python :: 3
+
+[options]
+py_modules = portend
+include_package_data = true
+python_requires = >=2.7
+install_requires = 
+       tempora>=1.8
+setup_requires = setuptools_scm >= 1.15.0
+
+[options.extras_require]
+testing = 
+       pytest >= 3.5, !=3.7.3
+       pytest-checkdocs
+       pytest-flake8
+       pytest-black-multipy
+docs = 
+       sphinx
+       jaraco.packaging >= 3.2
+       rst.linker >= 1.9
+
+[options.entry_points]
+
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/setup.py new/portend-2.5/setup.py
--- old/portend-1.8/setup.py    2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/setup.py    2019-06-11 02:56:58.000000000 +0200
@@ -1,50 +1,6 @@
 #!/usr/bin/env python
 
-# Project skeleton maintained at https://github.com/jaraco/skeleton
-
-import io
-
 import setuptools
 
-with io.open('README.rst', encoding='utf-8') as readme:
-       long_description = readme.read()
-
-name = 'portend'
-description = 'TCP port monitoring utilities'
-
-params = dict(
-       name=name,
-       use_scm_version=True,
-       author="Jason R. Coombs",
-       author_email="[email protected]",
-       description=description or name,
-       long_description=long_description,
-       url="https://github.com/jaraco/"; + name,
-       packages=setuptools.find_packages(),
-       include_package_data=True,
-       py_modules=['portend'],
-       namespace_packages=name.split('.')[:-1],
-       install_requires=[
-               'tempora',
-       ],
-       extras_require={
-               ':python_version == "2.6"': [
-                       'argparse',
-               ],
-       },
-       setup_requires=[
-               'setuptools_scm>=1.15.0',
-       ],
-       classifiers=[
-               "Development Status :: 5 - Production/Stable",
-               "Intended Audience :: Developers",
-               "License :: OSI Approved :: MIT License",
-               "Programming Language :: Python :: 2.6",
-               "Programming Language :: Python :: 2.7",
-               "Programming Language :: Python :: 3",
-       ],
-       entry_points={
-       },
-)
-if __name__ == '__main__':
-       setuptools.setup(**params)
+if __name__ == "__main__":
+    setuptools.setup(use_scm_version=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/skeleton.md new/portend-2.5/skeleton.md
--- old/portend-1.8/skeleton.md 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/skeleton.md 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,129 @@
+# Overview
+
+This project is merged with [skeleton](https://github.com/jaraco/skeleton). 
What is skeleton? It's the scaffolding of a Python project jaraco [introduced 
in his blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/). 
It seeks to provide a means to re-use techniques and inherit advances when 
managing projects for distribution.
+
+## An SCM Managed Approach
+
+While maintaining dozens of projects in PyPI, jaraco derives best practices 
for project distribution and publishes them in the [skeleton 
repo](https://github.com/jaraco/skeleton), a git repo capturing the evolution 
and culmination of these best practices.
+
+It's intended to be used by a new or existing project to adopt these practices 
and honed and proven techniques. Adopters are encouraged to use the project 
directly and maintain a small deviation from the technique, make their own fork 
for more substantial changes unique to their environment or preferences, or 
simply adopt the skeleton once and abandon it thereafter.
+
+The primary advantage to using an SCM for maintaining these techniques is that 
those tools help facilitate the merge between the template and its adopting 
projects.
+
+Another advantage to using an SCM-managed approach is that tools like GitHub 
recognize that a change in the skeleton is the _same change_ across all 
projects that merge with that skeleton. Without the ancestry, with a 
traditional copy/paste approach, a [commit like 
this](https://github.com/jaraco/skeleton/commit/12eed1326e1bc26ce256e7b3f8cd8d3a5beab2d5)
 would produce notifications in the upstream project issue for each and every 
application, but because it's centralized, GitHub provides just the one 
notification when the change is added to the skeleton.
+
+# Usage
+
+## new projects
+
+To use skeleton for a new project, simply pull the skeleton into a new project:
+
+```
+$ git init my-new-project
+$ cd my-new-project
+$ git pull gh://jaraco/skeleton
+```
+
+Now customize the project to suit your individual project needs.
+
+## existing projects
+
+If you have an existing project, you can still incorporate the skeleton by 
merging it into the codebase.
+
+```
+$ git merge skeleton --allow-unrelated-histories
+```
+
+The `--allow-unrelated-histories` is necessary because the history from the 
skeleton was previously unrelated to the existing codebase. Resolve any merge 
conflicts and commit to the master, and now the project is based on the shared 
skeleton.
+
+## Updating
+
+Whenever a change is needed or desired for the general technique for 
packaging, it can be made in the skeleton project and then merged into each of 
the derived projects as needed, recommended before each release. As a result, 
features and best practices for packaging are centrally maintained and readily 
trickle into a whole suite of packages. This technique lowers the amount of 
tedious work necessary to create or maintain a project, and coupled with other 
techniques like continuous integration and deployment, lowers the cost of 
creating and maintaining refined Python projects to just a few, familiar git 
operations.
+
+Thereafter, the target project can make whatever customizations it deems 
relevant to the scaffolding. The project may even at some point decide that the 
divergence is too great to merit renewed merging with the original skeleton. 
This approach applies maximal guidance while creating minimal constraints.
+
+# Features
+
+The features/techniques employed by the skeleton include:
+
+- PEP 517/518 based build relying on setuptools as the build tool
+- setuptools declarative configuration using setup.cfg
+- tox for running tests
+- A README.rst as reStructuredText with some popular badges, but with 
readthedocs and appveyor badges commented out
+- A CHANGES.rst file intended for publishing release notes about the project
+- Use of [black](https://black.readthedocs.io/en/stable/) for code formatting 
(disabled on unsupported Python 3.5 and earlier)
+
+## Packaging Conventions
+
+A pyproject.toml is included to enable PEP 517 and PEP 518 compatibility and 
declares the requirements necessary to build the project on setuptools (a 
minimum version compatible with setup.cfg declarative config).
+
+The setup.cfg file implements the following features:
+
+- Assumes universal wheel for release
+- Advertises the project's LICENSE file (MIT by default)
+- Reads the README.rst file into the long description
+- Some common Trove classifiers
+- Includes all packages discovered in the repo
+- Data files in the package are also included (not just Python files)
+- Declares the required Python versions
+- Declares install requirements (empty by default)
+- Declares setup requirements for legacy environments
+- Supplies two 'extras':
+  - testing: requirements for running tests
+  - docs: requirements for building docs
+  - these extras split the declaration into "upstream" (requirements as 
declared by the skeleton) and "local" (those specific to the local project); 
these markers help avoid merge conflicts
+- Placeholder for defining entry points
+
+Additionally, the setup.py file declares `use_scm_version` which relies on 
[setuptools_scm](https://pypi.org/project/setuptools_scm) to do two things:
+
+- derive the project version from SCM tags
+- ensure that all files committed to the repo are automatically included in 
releases
+
+## Running Tests
+
+The skeleton assumes the developer has [tox](https://pypi.org/project/tox) 
installed. The developer is expected to run `tox` to run tests on the current 
Python version using [pytest](https://pypi.org/project/pytest).
+
+Other environments (invoked with `tox -e {name}`) supplied include:
+
+  - a `build-docs` environment to build the documentation
+  - a `release` environment to publish the package to PyPI
+
+A pytest.ini is included to define common options around running tests. In 
particular:
+
+- rely on default test discovery in the current directory
+- avoid recursing into common directories not containing tests
+- run doctests on modules and invoke flake8 tests
+- in doctests, allow unicode literals and regular literals to match, allowing 
for doctests to run on Python 2 and 3. Also enable ELLIPSES, a default that 
would be undone by supplying the prior option.
+- filters out known warnings caused by libraries/functionality included by the 
skeleton
+
+Relies a .flake8 file to correct some default behaviors:
+
+- disable mutually incompatible rules W503 and W504
+- support for black format
+
+## Continuous Integration
+
+The project is pre-configured to run tests in 
[Travis-CI](https://travis-ci.org) (.travis.yml). Any new project must be 
enabled either through their web site or with the `travis enable` command. In 
addition to running tests, an additional deploy stage is configured to 
automatically release tagged commits. The username and password for PyPI must 
be configured for each project using the `travis` command and only after the 
travis project is created. As releases are cut with 
[twine](https://pypi.org/project/twine), the two values are supplied through 
the `TWINE_USERNAME` and `TWINE_PASSWORD`. To configure the latter as a secret, 
run the following command:
+
+```
+echo "TWINE_PASSWORD={password}" | travis encrypt
+```
+
+Or disable it in the CI definition and configure it through the web UI.
+
+Features include:
+- test against Python 2 and 3
+- run on Ubuntu Xenial
+- correct for broken IPv6
+
+Also provided is a minimal template for running under Appveyor (Windows).
+
+## Building Documentation
+
+Documentation is automatically built by [Read the 
Docs](https://readthedocs.org) when the project is registered with it, by way 
of the .readthedocs.yml file. To test the docs build manually, a tox env may be 
invoked as `tox -e build-docs`. Both techniques rely on the dependencies 
declared in `setup.cfg/options.extras_require.docs`.
+
+In addition to building the sphinx docs scaffolded in `docs/`, the docs build 
a `history.html` file that first injects release dates and hyperlinks into the 
CHANGES.rst before incorporating it as history in the docs.
+
+## Cutting releases
+
+By default, tagged commits are released through the continuous integration 
deploy stage.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/test_portend.py 
new/portend-2.5/test_portend.py
--- old/portend-1.8/test_portend.py     2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/test_portend.py     2019-06-11 02:56:58.000000000 +0200
@@ -2,53 +2,68 @@
 import contextlib
 
 import pytest
+from tempora import timing
 
 import portend
 
 
 def socket_infos():
-       """
-       Generate addr infos for connections to localhost
-       """
-       host = None  # all available interfaces
-       port = portend.find_available_local_port()
-       family = socket.AF_UNSPEC
-       socktype = socket.SOCK_STREAM
-       proto = 0
-       flags = socket.AI_PASSIVE
-       return socket.getaddrinfo(host, port, family, socktype, proto, flags)
+    """
+    Generate addr infos for connections to localhost
+    """
+    host = None  # all available interfaces
+    port = portend.find_available_local_port()
+    family = socket.AF_UNSPEC
+    socktype = socket.SOCK_STREAM
+    proto = 0
+    flags = socket.AI_PASSIVE
+    return socket.getaddrinfo(host, port, family, socktype, proto, flags)
 
 
 def id_for_info(info):
-       af, = info[:1]
-       return str(af)
+    af, = info[:1]
+    return str(af)
+
 
 def build_addr_infos():
-       params = list(socket_infos())
-       ids = list(map(id_for_info, params))
-       return locals()
+    params = list(socket_infos())
+    ids = list(map(id_for_info, params))
+    return locals()
 
 
 @pytest.fixture(**build_addr_infos())
 def listening_addr(request):
-       af, socktype, proto, canonname, sa = request.param
-       sock = socket.socket(af, socktype, proto)
-       sock.bind(sa)
-       sock.listen(5)
-       with contextlib.closing(sock):
-               yield sa
+    af, socktype, proto, canonname, sa = request.param
+    sock = socket.socket(af, socktype, proto)
+    sock.bind(sa)
+    sock.listen(5)
+    with contextlib.closing(sock):
+        yield sa
 
 
 @pytest.fixture(**build_addr_infos())
 def nonlistening_addr(request):
-       af, socktype, proto, canonname, sa = request.param
-       return sa
+    af, socktype, proto, canonname, sa = request.param
+    return sa
 
 
-class TestChecker:
-       def test_check_port_listening(self, listening_addr):
-               with pytest.raises(portend.PortNotFree):
-                       portend.Checker().assert_free(listening_addr)
[email protected]
+def immediate_timeout(monkeypatch):
+    monkeypatch.setattr(timing.Timer, 'expired', lambda: True)
 
-       def test_check_port_nonlistening(self, nonlistening_addr):
-               portend.Checker().assert_free(nonlistening_addr)
+
+class TestChecker:
+    def test_check_port_listening(self, listening_addr):
+        with pytest.raises(portend.PortNotFree):
+            portend.Checker().assert_free(listening_addr)
+
+    def test_check_port_nonlistening(self, nonlistening_addr):
+        portend.Checker().assert_free(nonlistening_addr)
+
+    def test_free_with_immediate_timeout(self, nonlistening_addr, 
immediate_timeout):
+        host, port = nonlistening_addr[:2]
+        portend.free(host, port, timeout=1.0)
+
+    def test_occupied_with_immediate_timeout(self, listening_addr, 
immediate_timeout):
+        host, port = listening_addr[:2]
+        portend.occupied(host, port, timeout=1.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/tests/requirements.txt 
new/portend-2.5/tests/requirements.txt
--- old/portend-1.8/tests/requirements.txt      2017-01-23 15:32:22.000000000 
+0100
+++ new/portend-2.5/tests/requirements.txt      1970-01-01 01:00:00.000000000 
+0100
@@ -1,2 +0,0 @@
-pytest >= 2.8
-pytest-warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portend-1.8/tox.ini new/portend-2.5/tox.ini
--- old/portend-1.8/tox.ini     2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/tox.ini     2019-06-11 02:56:58.000000000 +0200
@@ -1,6 +1,32 @@
+[tox]
+envlist = python
+minversion = 3.2
+# https://github.com/jaraco/skeleton/issues/6
+tox_pip_extensions_ext_venv_update = true
+
 [testenv]
 deps =
-       -rtests/requirements.txt
-
-commands = py.test {posargs}
+       setuptools>=31.0.1
+commands =
+       pytest {posargs}
 usedevelop = True
+extras = testing
+
+[testenv:build-docs]
+extras =
+    docs
+    testing
+changedir = docs
+commands =
+    python -m sphinx . {toxinidir}/build/html
+
+[testenv:release]
+skip_install = True
+deps =
+       pep517>=0.5
+       twine>=1.13
+       path.py
+commands =
+       python -c "import path; path.Path('dist').rmtree_p()"
+       python -m pep517.build .
+       python -m twine upload dist/*


Reply via email to