Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-rfc6555 for openSUSE:Factory checked in at 2022-04-14 17:25:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rfc6555 (Old) and /work/SRC/openSUSE:Factory/.python-rfc6555.new.1941 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rfc6555" Thu Apr 14 17:25:42 2022 rev:2 rq:970089 version:0.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rfc6555/python-rfc6555.changes 2020-01-22 22:44:51.508532957 +0100 +++ /work/SRC/openSUSE:Factory/.python-rfc6555.new.1941/python-rfc6555.changes 2022-04-14 17:26:20.515324852 +0200 @@ -1,0 +2,10 @@ +Thu Apr 14 07:55:25 UTC 2022 - [email protected] + +- version update to 0.1.0 + - Use ``selectors`` instead of ``selectors2`` for Python 3.5+ + - Dropped support for Python 2.6, 3.3, and 3.4 +- deleted patches + - dependencies.patch (upstreamed) + + +------------------------------------------------------------------- Old: ---- dependencies.patch rfc6555-0.0.0.tar.gz New: ---- rfc6555-0.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rfc6555.spec ++++++ --- /var/tmp/diff_new_pack.YYnA1k/_old 2022-04-14 17:26:21.031325456 +0200 +++ /var/tmp/diff_new_pack.YYnA1k/_new 2022-04-14 17:26:21.035325460 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-rfc6555 # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,14 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-rfc6555 -Version: 0.0.0 +Version: 0.1.0 Release: 0 Summary: Python implementation of the Happy Eyeballs Algorithm described in RFC 6555 License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/sethmlarson/rfc6555 -Source: https://files.pythonhosted.org/packages/source/r/rfc6555/rfc6555-%{version}.tar.gz -Patch0: dependencies.patch +Source: https://github.com/sethmlarson/rfc6555/archive/refs/tags/v%{version}.tar.gz#/rfc6555-%{version}.tar.gz BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -49,7 +48,6 @@ %prep %setup -q -n rfc6555-%{version} -%patch0 -p1 %build %python_build ++++++ rfc6555-0.0.0.tar.gz -> rfc6555-0.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/.github/workflows/ci.yml new/rfc6555-0.1.0/.github/workflows/ci.yml --- old/rfc6555-0.0.0/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/rfc6555-0.1.0/.github/workflows/ci.yml 2021-11-07 04:16:42.000000000 +0100 @@ -0,0 +1,70 @@ +name: CI + +on: [push, pull_request] + +defaults: + run: + shell: bash + +jobs: + package: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: "3.7" + - name: Check packages + run: | + python3.7 -m pip install wheel twine rstcheck; + python3.7 setup.py sdist bdist_wheel; + rstcheck README.rst CHANGES.rst + python3.7 -m twine check dist/* + + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: "3.7" + - name: Install dependencies + run: python -m pip install nox + - name: Lint the code + run: nox -s lint + + test: + strategy: + fail-fast: false + matrix: + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + os: [macos-latest, windows-latest, ubuntu-latest] + + runs-on: ${{ matrix.os }} + name: ${{ fromJson('{"macos-latest":"macOS","windows-latest":"Windows","ubuntu-latest":"Ubuntu"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python - ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Set up Python 3 to run nox + if: matrix.python-version != '3.7' + uses: actions/setup-python@v2 + with: + python-version: "3" + + - name: Install dependencies + run: python -m pip install nox + + - name: Run tests + run: nox -s test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/.gitignore new/rfc6555-0.1.0/.gitignore --- old/rfc6555-0.0.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/rfc6555-0.1.0/.gitignore 2021-11-07 04:16:42.000000000 +0100 @@ -0,0 +1,95 @@ +# Created by .ignore support plugin (hsz.mobi) +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject + +# PyCharm +.idea/ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/CHANGES.rst new/rfc6555-0.1.0/CHANGES.rst --- old/rfc6555-0.0.0/CHANGES.rst 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/CHANGES.rst 2021-11-07 04:16:42.000000000 +0100 @@ -1,7 +1,8 @@ Changelog ========= -1.0.0 +0.1.0 ----- -- Initial release of ``rfc6555``. +- Use ``selectors`` instead of ``selectors2`` for Python 3.5+ +- Dropped support for Python 2.6, 3.3, and 3.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/MANIFEST.in new/rfc6555-0.1.0/MANIFEST.in --- old/rfc6555-0.0.0/MANIFEST.in 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/MANIFEST.in 2021-11-07 04:16:42.000000000 +0100 @@ -1,14 +1,3 @@ -include *.md include *.rst -include *.txt include LICENSE include .coveragerc -include tox.ini -include artisanci/packages/virtualbox/LICENSE -include artisanci/packages/README.md -exclude build_docs.py -exclude .mention-bot -recursive-include docs * -recursive-exclude docs/build * -recursive-include docs Makefile -recursive-include tests *.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/PKG-INFO new/rfc6555-0.1.0/PKG-INFO --- old/rfc6555-0.0.0/PKG-INFO 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,132 +0,0 @@ -Metadata-Version: 1.2 -Name: rfc6555 -Version: 0.0.0 -Summary: Python implementation of the Happy Eyeballs Algorithm described in RFC 6555. -Home-page: https://www.github.com/SethMichaelLarson/rfc6555 -Author: Seth Michael Larson -Author-email: [email protected] -Maintainer: Seth Michael Larson -Maintainer-email: [email protected] -License: Apache-2.0 -Description: rfc6555 - ======= - - .. image:: https://img.shields.io/travis/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://travis-ci.org/SethMichaelLarson/rfc6555 - - .. image:: https://img.shields.io/appveyor/ci/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://ci.appveyor.com/project/SethMichaelLarson/rfc6555 - - .. image:: https://img.shields.io/codecov/c/github/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://codecov.io/gh/SethMichaelLarson/rfc6555 - - .. image:: https://img.shields.io/pypi/v/rfc6555.svg?style=flat-square - :target: https://pypi.python.org/pypi/rfc6555 - - .. image:: https://img.shields.io/badge/say-thanks-ff69b4.svg?style=flat-square - :target: https://saythanks.io/to/SethMichaelLarson - - Python implementation of the Happy Eyeballs Algorithm described in `RFC 6555 <https://tools.ietf.org/html/rfc6555>`_. - Provided with a single file and dead-simple API to allow easy vendoring - and integration into other projects. - - Abstract - -------- - - When a server's IPv4 path and protocol are working, but the server's - IPv6 path and protocol are not working, a dual-stack client - application experiences significant connection delay compared to an - IPv4-only client. This is undesirable because it causes the dual- - stack client to have a worse user experience. This document - specifies requirements for algorithms that reduce this user-visible - delay and provides an algorithm. - - ~ `Abstract from RFC 6555 <https://tools.ietf.org/html/rfc6555>`_ - - Installation - ------------ - - ``$ python -m pip install rfc6555`` - - Usage - ----- - - The main API for the ``rfc6555`` module is via ``rfc6555.create_connection()`` which - functions identically to ``socket.create_connection()`` with the same arguments. - This function will automatically fall back on a ``socket.create_connection()`` call if - RFC 6555 is not supported (for instance on platforms not capable of IPv6) or if - RFC 6555 is disabled via setting ``rfc6555.RFC6555_ENABLED`` equal to ``False``. - - **IMPORTANT:** Caching is **NOT** thread-safe by default. If you require thread-safe caching - one should create their own implementation of ``rfc6555._RFC6555CacheManager`` object that - is thread-safe and assign an instance to ``rfc6555.cache``. - - .. code-block:: python - - import rfc6555 - sock = rfc6555.create_connection(('www.google.com', 80), timeout=10, source_address=('::1', 0)) - - # This will disable the Happy Eyeballs algorithm for future - # calls to create_connection() - rfc6555.RFC6555_ENABLED = False - - # Use this to set a different duration for cache entries. - rfc6555.cache.validity_duration = 10 # 10 second validity time. - - # Use this to disable caching. - rfc6555.cache.enabled = False - - Support - ------- - - This module supports Python 2.6 or newer and supports all major platforms. - Additionally if you have ``selectors2>=2.0.0`` installed this module will - also support Jython in addition to CPython. - - License - ------- - - The ``rfc6555`` package is released under the ``Apache-2.0`` license. - - See `full license text in LICENSE file <https://github.com/SethMichaelLarson/rfc6555/blob/master/LICENSE>`_ for more information. - - .. code-block:: - - Copyright 2017 Seth Michael Larson - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Changelog - ========= - - 1.0.0 - ----- - - - Initial release of ``rfc6555``. - -Platform: UNKNOWN -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Natural Language :: English -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Topic :: Internet -Classifier: Topic :: System :: Networking diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/README.rst new/rfc6555-0.1.0/README.rst --- old/rfc6555-0.0.0/README.rst 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/README.rst 2021-11-07 04:16:42.000000000 +0100 @@ -1,22 +1,16 @@ -rfc6555 -======= +Happy Eyeballs in Python (RFC 6555) +=================================== -.. image:: https://img.shields.io/travis/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://travis-ci.org/SethMichaelLarson/rfc6555 +.. image:: https://github.com/sethmlarson/rfc6555/actions/workflows/ci.yml/badge.svg + :target: https://github.com/sethmlarson/rfc6555/actions/workflows/ci.yml -.. image:: https://img.shields.io/appveyor/ci/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://ci.appveyor.com/project/SethMichaelLarson/rfc6555 - -.. image:: https://img.shields.io/codecov/c/github/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://codecov.io/gh/SethMichaelLarson/rfc6555 +.. image:: https://codecov.io/gh/sethmlarson/rfc6555/branch/master/graph/badge.svg?token=Xn7oQWErjc + :target: https://codecov.io/gh/sethmlarson/rfc6555 .. image:: https://img.shields.io/pypi/v/rfc6555.svg?style=flat-square :target: https://pypi.python.org/pypi/rfc6555 -.. image:: https://img.shields.io/badge/say-thanks-ff69b4.svg?style=flat-square - :target: https://saythanks.io/to/SethMichaelLarson - -Python implementation of the Happy Eyeballs Algorithm described in `RFC 6555 <https://tools.ietf.org/html/rfc6555>`_. +Synchronous Python implementation of the Happy Eyeballs Algorithm described in `RFC 6555 <https://tools.ietf.org/html/rfc6555>`_. Provided with a single file and dead-simple API to allow easy vendoring and integration into other projects. @@ -31,12 +25,12 @@ specifies requirements for algorithms that reduce this user-visible delay and provides an algorithm. -~ `Abstract from RFC 6555 <https://tools.ietf.org/html/rfc6555>`_ - Installation ------------ -``$ python -m pip install rfc6555`` + .. code-block:: bash + + $ python -m pip install rfc6555 Usage ----- @@ -69,7 +63,7 @@ Support ------- -This module supports Python 2.6 or newer and supports all major platforms. +This module supports Python 2.7 or newer and supports all major platforms. Additionally if you have ``selectors2>=2.0.0`` installed this module will also support Jython in addition to CPython. @@ -78,20 +72,4 @@ The ``rfc6555`` package is released under the ``Apache-2.0`` license. -See `full license text in LICENSE file <https://github.com/SethMichaelLarson/rfc6555/blob/master/LICENSE>`_ for more information. - - .. code-block:: - - Copyright 2017 Seth Michael Larson - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +See `full license text in LICENSE file <https://github.com/sethmlarson/rfc6555/blob/master/LICENSE>`_ for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/dev-requirements.txt new/rfc6555-0.1.0/dev-requirements.txt --- old/rfc6555-0.0.0/dev-requirements.txt 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/dev-requirements.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -pytest==3.1.1 -check-manifest==0.35 -readme_renderer==17.2 -mock==2.0.0 -codecov==2.0.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/noxfile.py new/rfc6555-0.1.0/noxfile.py --- old/rfc6555-0.0.0/noxfile.py 1970-01-01 01:00:00.000000000 +0100 +++ new/rfc6555-0.1.0/noxfile.py 2021-11-07 04:16:42.000000000 +0100 @@ -0,0 +1,34 @@ +import nox + +SOURCE_FILES = [ + "rfc6555.py", + "tests/", + "noxfile.py", + "setup.py", +] + + [email protected]() +def test(session): + session.install("pytest", "pytest-cov") + + session.run("pytest", "--cov-config=.coveragerc", "tests/") + + [email protected]() +def format(session): + session.install("black", "isort") + + session.run("black", *SOURCE_FILES) + session.run("isort", "--profile=black", *SOURCE_FILES) + + lint(session) + + [email protected] +def lint(session): + session.install("black", "isort", "flake8") + + session.run("black", "--check", *SOURCE_FILES) + session.run("isort", "--check", "--profile=black", *SOURCE_FILES) + session.run("flake8", "--ignore=E501", *SOURCE_FILES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.egg-info/PKG-INFO new/rfc6555-0.1.0/rfc6555.egg-info/PKG-INFO --- old/rfc6555-0.0.0/rfc6555.egg-info/PKG-INFO 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,132 +0,0 @@ -Metadata-Version: 1.2 -Name: rfc6555 -Version: 0.0.0 -Summary: Python implementation of the Happy Eyeballs Algorithm described in RFC 6555. -Home-page: https://www.github.com/SethMichaelLarson/rfc6555 -Author: Seth Michael Larson -Author-email: [email protected] -Maintainer: Seth Michael Larson -Maintainer-email: [email protected] -License: Apache-2.0 -Description: rfc6555 - ======= - - .. image:: https://img.shields.io/travis/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://travis-ci.org/SethMichaelLarson/rfc6555 - - .. image:: https://img.shields.io/appveyor/ci/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://ci.appveyor.com/project/SethMichaelLarson/rfc6555 - - .. image:: https://img.shields.io/codecov/c/github/SethMichaelLarson/rfc6555/master.svg?style=flat-square - :target: https://codecov.io/gh/SethMichaelLarson/rfc6555 - - .. image:: https://img.shields.io/pypi/v/rfc6555.svg?style=flat-square - :target: https://pypi.python.org/pypi/rfc6555 - - .. image:: https://img.shields.io/badge/say-thanks-ff69b4.svg?style=flat-square - :target: https://saythanks.io/to/SethMichaelLarson - - Python implementation of the Happy Eyeballs Algorithm described in `RFC 6555 <https://tools.ietf.org/html/rfc6555>`_. - Provided with a single file and dead-simple API to allow easy vendoring - and integration into other projects. - - Abstract - -------- - - When a server's IPv4 path and protocol are working, but the server's - IPv6 path and protocol are not working, a dual-stack client - application experiences significant connection delay compared to an - IPv4-only client. This is undesirable because it causes the dual- - stack client to have a worse user experience. This document - specifies requirements for algorithms that reduce this user-visible - delay and provides an algorithm. - - ~ `Abstract from RFC 6555 <https://tools.ietf.org/html/rfc6555>`_ - - Installation - ------------ - - ``$ python -m pip install rfc6555`` - - Usage - ----- - - The main API for the ``rfc6555`` module is via ``rfc6555.create_connection()`` which - functions identically to ``socket.create_connection()`` with the same arguments. - This function will automatically fall back on a ``socket.create_connection()`` call if - RFC 6555 is not supported (for instance on platforms not capable of IPv6) or if - RFC 6555 is disabled via setting ``rfc6555.RFC6555_ENABLED`` equal to ``False``. - - **IMPORTANT:** Caching is **NOT** thread-safe by default. If you require thread-safe caching - one should create their own implementation of ``rfc6555._RFC6555CacheManager`` object that - is thread-safe and assign an instance to ``rfc6555.cache``. - - .. code-block:: python - - import rfc6555 - sock = rfc6555.create_connection(('www.google.com', 80), timeout=10, source_address=('::1', 0)) - - # This will disable the Happy Eyeballs algorithm for future - # calls to create_connection() - rfc6555.RFC6555_ENABLED = False - - # Use this to set a different duration for cache entries. - rfc6555.cache.validity_duration = 10 # 10 second validity time. - - # Use this to disable caching. - rfc6555.cache.enabled = False - - Support - ------- - - This module supports Python 2.6 or newer and supports all major platforms. - Additionally if you have ``selectors2>=2.0.0`` installed this module will - also support Jython in addition to CPython. - - License - ------- - - The ``rfc6555`` package is released under the ``Apache-2.0`` license. - - See `full license text in LICENSE file <https://github.com/SethMichaelLarson/rfc6555/blob/master/LICENSE>`_ for more information. - - .. code-block:: - - Copyright 2017 Seth Michael Larson - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Changelog - ========= - - 1.0.0 - ----- - - - Initial release of ``rfc6555``. - -Platform: UNKNOWN -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Natural Language :: English -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Topic :: Internet -Classifier: Topic :: System :: Networking diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.egg-info/SOURCES.txt new/rfc6555-0.1.0/rfc6555.egg-info/SOURCES.txt --- old/rfc6555-0.0.0/rfc6555.egg-info/SOURCES.txt 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -.coveragerc -CHANGES.rst -LICENSE -MANIFEST.in -README.rst -dev-requirements.txt -rfc6555.py -setup.cfg -setup.py -tox.ini -rfc6555.egg-info/PKG-INFO -rfc6555.egg-info/SOURCES.txt -rfc6555.egg-info/dependency_links.txt -rfc6555.egg-info/not-zip-safe -rfc6555.egg-info/requires.txt -rfc6555.egg-info/top_level.txt -tests/__init__.py -tests/test_create_connection.py -tests/test_ipv6.py -tests/test_utils.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.egg-info/dependency_links.txt new/rfc6555-0.1.0/rfc6555.egg-info/dependency_links.txt --- old/rfc6555-0.0.0/rfc6555.egg-info/dependency_links.txt 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.egg-info/not-zip-safe new/rfc6555-0.1.0/rfc6555.egg-info/not-zip-safe --- old/rfc6555-0.0.0/rfc6555.egg-info/not-zip-safe 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.egg-info/not-zip-safe 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.egg-info/requires.txt new/rfc6555-0.1.0/rfc6555.egg-info/requires.txt --- old/rfc6555-0.0.0/rfc6555.egg-info/requires.txt 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -selectors2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.egg-info/top_level.txt new/rfc6555-0.1.0/rfc6555.egg-info/top_level.txt --- old/rfc6555-0.0.0/rfc6555.egg-info/top_level.txt 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -rfc6555 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/rfc6555.py new/rfc6555-0.1.0/rfc6555.py --- old/rfc6555-0.0.0/rfc6555.py 2019-02-13 11:32:32.000000000 +0100 +++ new/rfc6555-0.1.0/rfc6555.py 2021-11-07 04:16:42.000000000 +0100 @@ -1,6 +1,4 @@ -""" Python implementation of the Happy Eyeballs Algorithm described in RFC 6555. """ - -# Copyright 2017 Seth Michael Larson +# Copyright 2021 Seth Michael Larson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,9 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +"""Python implementation of the Happy Eyeballs Algorithm described in RFC 6555""" + import errno import socket -from selectors2 import DefaultSelector, EVENT_WRITE + +try: + from selectors import EVENT_WRITE, DefaultSelector +except (ImportError, AttributeError): + from selectors2 import EVENT_WRITE, DefaultSelector # time.perf_counter() is defined in Python 3.3 try: @@ -32,11 +36,11 @@ # Detects whether an IPv6 socket can be allocated. def _detect_ipv6(): - if getattr(socket, 'has_ipv6', False) and hasattr(socket, 'AF_INET6'): + if getattr(socket, "has_ipv6", False) and hasattr(socket, "AF_INET6"): _sock = None try: _sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) - _sock.bind(('::1', 0)) + _sock.bind(("::1", 0)) return True except _SOCKET_ERRORS: if _sock: @@ -48,10 +52,8 @@ # These are error numbers for asynchronous operations which can # be safely ignored by RFC 6555 as being non-errors. -_ASYNC_ERRNOS = set([errno.EINPROGRESS, - errno.EAGAIN, - errno.EWOULDBLOCK]) -if hasattr(errno, 'WSAWOULDBLOCK'): +_ASYNC_ERRNOS = set([errno.EINPROGRESS, errno.EAGAIN, errno.EWOULDBLOCK]) +if hasattr(errno, "WSAWOULDBLOCK"): _ASYNC_ERRNOS.add(errno.WSAWOULDBLOCK) _DEFAULT_CACHE_DURATION = 60 * 10 # 10 minutes according to the RFC. @@ -59,14 +61,12 @@ # This value that can be used to disable RFC 6555 globally. RFC6555_ENABLED = _HAS_IPV6 -__all__ = ['RFC6555_ENABLED', - 'create_connection', - 'cache'] - -__version__ = '0.0.0' -__author__ = 'Seth Michael Larson' -__email__ = '[email protected]' -__license__ = 'Apache-2.0' +__all__ = ["RFC6555_ENABLED", "create_connection", "cache"] + +__version__ = "0.1.0" +__author__ = "Seth Michael Larson" +__email__ = "[email protected]" +__license__ = "Apache-2.0" class _RFC6555CacheManager(object): @@ -99,7 +99,9 @@ class _RFC6555ConnectionManager(object): - def __init__(self, address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None): + def __init__( + self, address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None + ): self.address = address self.timeout = timeout self.source_address = source_address @@ -125,7 +127,7 @@ # If we don't get any results back then just skip to the end. if not addr_info: - raise socket.error('getaddrinfo returns an empty list') + raise socket.error("getaddrinfo returns an empty list") sock = self._attempt_connect_with_addr_info(addr_info) @@ -280,7 +282,9 @@ self._sockets = [] -def create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None): +def create_connection( + address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None +): if RFC6555_ENABLED and _HAS_IPV6: manager = _RFC6555ConnectionManager(address, timeout, source_address) return manager.create_connection() @@ -293,7 +297,7 @@ host, port = address err = None for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): - af, socktype, proto, canonname, sa = res + af, socktype, proto, _, sa = res sock = None try: sock = socket.socket(af, socktype, proto) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/setup.cfg new/rfc6555-0.1.0/setup.cfg --- old/rfc6555-0.0.0/setup.cfg 2019-02-13 11:32:39.000000000 +0100 +++ new/rfc6555-0.1.0/setup.cfg 2021-11-07 04:16:42.000000000 +0100 @@ -1,7 +1,2 @@ [bdist_wheel] universal = 1 - -[egg_info] -tag_build = -tag_date = 0 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/setup.py new/rfc6555-0.1.0/setup.py --- old/rfc6555-0.0.0/setup.py 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/setup.py 2021-11-07 04:16:42.000000000 +0100 @@ -1,43 +1,48 @@ import os import re + from setuptools import setup # Get the version (borrowed from SQLAlchemy) base_path = os.path.dirname(os.path.abspath(__file__)) -with open(os.path.join(base_path, 'rfc6555.py')) as f: - VERSION = re.compile(r'.*__version__ = \'(.*?)\'', re.S).match(f.read()).group(1) +with open(os.path.join(base_path, "rfc6555.py")) as f: + VERSION = re.compile(r".*__version__ = \"(.*?)\"", re.S).match(f.read()).group(1) -with open(os.path.join(base_path, 'README.rst')) as f: +with open(os.path.join(base_path, "README.rst")) as f: long_description = f.read() -with open(os.path.join(base_path, 'CHANGES.rst')) as f: +with open(os.path.join(base_path, "CHANGES.rst")) as f: changes = f.read() -if __name__ == '__main__': - setup(name='rfc6555', - description='Python implementation of the Happy Eyeballs Algorithm described in RFC 6555.', - long_description=long_description + '\n\n' + changes, - license='Apache-2.0', - url='https://www.github.com/SethMichaelLarson/rfc6555', - version=VERSION, - author='Seth Michael Larson', - author_email='[email protected]', - maintainer='Seth Michael Larson', - maintainer_email='[email protected]', - install_requires=['selectors2'], - py_modules=['rfc6555'], - zip_safe=False, - classifiers=['Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Topic :: Internet', - 'Topic :: System :: Networking']) +setup( + name="rfc6555", + description="Python implementation of the Happy Eyeballs Algorithm described in RFC 6555.", + long_description=long_description + "\n\n" + changes, + license="Apache-2.0", + url="https://www.github.com/sethmlarson/rfc6555", + version=VERSION, + author="Seth Michael Larson", + author_email="[email protected]", + maintainer="Seth Michael Larson", + maintainer_email="[email protected]", + install_requires=['selectors2;python_version<"3.4"'], + py_modules=["rfc6555"], + zip_safe=False, + classifiers=[ + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Topic :: Internet", + "Topic :: System :: Networking", + ], +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/tests/test_create_connection.py new/rfc6555-0.1.0/tests/test_create_connection.py --- old/rfc6555-0.0.0/tests/test_create_connection.py 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/tests/test_create_connection.py 2021-11-07 04:16:42.000000000 +0100 @@ -1,24 +1,31 @@ -import mock -import pytest +try: + from unittest import mock +except (ImportError, AttributeError): + import mock + import socket + +import pytest + import rfc6555 + from .test_utils import requires_network class _BasicCreateConnectionTests(object): @requires_network def test_create_connection_google(self): - sock = rfc6555.create_connection(('www.google.com', 80)) + rfc6555.create_connection(("www.google.com", 80)) - @pytest.mark.parametrize('timeout', [None, 5.0]) + @pytest.mark.parametrize("timeout", [None, 5.0]) def test_create_connection_has_proper_timeout(self, timeout): - sock = rfc6555.create_connection(('www.google.com', 80), timeout=timeout) + sock = rfc6555.create_connection(("www.google.com", 80), timeout=timeout) assert sock.gettimeout() == timeout def test_create_connection_with_source_address_calls_bind(self): sock = mock.Mock() - with mock.patch('socket.socket') as fake_socket: + with mock.patch("socket.socket") as fake_socket: fake_socket.return_value = sock sock.getsockopt.return_value = 0 @@ -26,23 +33,23 @@ sock.gettimeout.return_value = None try: - rfc6555.create_connection(('::1', 0), source_address=('::1', 123)) + rfc6555.create_connection(("::1", 0), source_address=("::1", 123)) except Exception: pass - sock.bind.assert_called_with(('::1', 123)) + sock.bind.assert_called_with(("::1", 123)) def test_getaddr_info_empty_list(self): - with mock.patch('socket.getaddrinfo') as fake_getaddrinfo: + with mock.patch("socket.getaddrinfo") as fake_getaddrinfo: fake_getaddrinfo.return_value = [] with pytest.raises(socket.error): - rfc6555.create_connection(('::1', 0)) + rfc6555.create_connection(("::1", 0)) @requires_network def test_create_connection_cached_value(self): - sock = rfc6555.create_connection(('www.google.com', 80)) - sock2 = rfc6555.create_connection(('www.google.com', 80)) + rfc6555.create_connection(("www.google.com", 80)) + rfc6555.create_connection(("www.google.com", 80)) class TestCreateConnectionTestRFC6555Default(_BasicCreateConnectionTests): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/tests/test_ipv6.py new/rfc6555-0.1.0/tests/test_ipv6.py --- old/rfc6555-0.0.0/tests/test_ipv6.py 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/tests/test_ipv6.py 2021-11-07 04:16:42.000000000 +0100 @@ -1,7 +1,12 @@ import socket -import mock + import rfc6555 +try: + from unittest import mock +except (ImportError, AttributeError): + import mock + def test_ipv6_available(): assert rfc6555._detect_ipv6() @@ -15,7 +20,7 @@ def test_ipv6_not_available_socket_exception_on_init(): - with mock.patch('socket.socket') as fake_socket: + with mock.patch("socket.socket") as fake_socket: fake_socket.side_effect = OSError assert not rfc6555._detect_ipv6() @@ -23,7 +28,7 @@ def test_ipv6_not_available_socket_exception_on_bind(): sock = mock.Mock() - with mock.patch('socket.socket') as fake_socket: + with mock.patch("socket.socket") as fake_socket: fake_socket.return_value = sock sock.bind.side_effect = OSError @@ -33,7 +38,7 @@ def test_ipv6_not_available_socket_AF_INET6_not_defined(): old_AF_INET6 = socket.AF_INET6 try: - delattr(socket, 'AF_INET6') + delattr(socket, "AF_INET6") assert not rfc6555._detect_ipv6() finally: socket.AF_INET6 = old_AF_INET6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/tests/test_utils.py new/rfc6555-0.1.0/tests/test_utils.py --- old/rfc6555-0.0.0/tests/test_utils.py 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/tests/test_utils.py 2021-11-07 04:16:42.000000000 +0100 @@ -1,11 +1,12 @@ -import pytest import socket +import pytest + def _check_network(): sock = None try: - sock = socket.create_connection(('www.google.com', 80)) + sock = socket.create_connection(("www.google.com", 80)) sock.close() return True except Exception: @@ -14,4 +15,6 @@ return False -requires_network = pytest.mark.skipif(not _check_network(), reason='This test requires a network connection.') +requires_network = pytest.mark.skipif( + not _check_network(), reason="This test requires a network connection." +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc6555-0.0.0/tox.ini new/rfc6555-0.1.0/tox.ini --- old/rfc6555-0.0.0/tox.ini 2019-02-13 11:31:40.000000000 +0100 +++ new/rfc6555-0.1.0/tox.ini 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -[tox] -envlist = lint, packaging, py26, py27, py33, py34, py35, py36, py37 -skip_missing_interpreters = true - -[testenv] -deps= -r{toxinidir}/dev-requirements.txt -commands= - coverage run -m pytest tests/ - coverage report -m - coverage html -passenv = TRAVIS APPVEYOR - -[testenv:py26] -# Additional dependency on unittest2 for Python 2.6 -deps= - {[testenv]deps} - unittest2 - -[testenv:lint] -commands = - python -m pip install flake8 - flake8 --max-line-length 100 rfc6555.py - -[testenv:packaging] -commands = - check-manifest --ignore *.yml,.mention-bot,.appveyor*,.travis*,.github* - python setup.py check --metadata --restructuredtext --strict
