Hello community,
here is the log from the commit of package python-irc for openSUSE:Factory checked in at 2019-04-08 20:53:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-irc (Old)
and /work/SRC/openSUSE:Factory/.python-irc.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-irc"
Mon Apr 8 20:53:02 2019 rev:4 rq:691787 version:17.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-irc/python-irc.changes 2019-03-01 16:47:56.393787377 +0100
+++ /work/SRC/openSUSE:Factory/.python-irc.new.3908/python-irc.changes 2019-04-08 20:53:04.210547837 +0200
@@ -1,0 +2,8 @@
+Fri Apr 5 11:22:52 UTC 2019 - Tomáš Chvátal
+
+- Update to 17.1:
+ * Rely on importlib_metadata for loading version from metadata. Removes implicit dependency on setuptools and pkg_resources.
+ * #158: The AsyncIO server now accepts a connection factory to enable features like SSL and IPv6 support.
+ * #155: SimpleIRCClient now has a dcc method for initiating and associating a DCCConnection object with the client. DCCConnection.listen now accepts a address parameter. Deprecated SimpleIRCClient.dcc_listen and SimpleIRCClient.dcc_connect in favor of the better separation of concerns. Clients should replace:
+
+-------------------------------------------------------------------
Old:
----
irc-17.0.tar.gz
New:
----
irc-17.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-irc.spec ++++++
--- /var/tmp/diff_new_pack.4NwGex/_old 2019-04-08 20:53:05.778548988 +0200
+++ /var/tmp/diff_new_pack.4NwGex/_new 2019-04-08 20:53:05.822549020 +0200
@@ -20,13 +20,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-irc
-Version: 17.0
+Version: 17.1
Release: 0
Summary: A set of Python modules for IRC support
License: LGPL-2.1-or-later
Group: Development/Libraries/Python
URL: https://github.com/jaraco/irc
Source: https://files.pythonhosted.org/packages/source/i/irc/%{modname}-%{version}.tar.gz
+BuildRequires: %{python_module importlib-metadata}
BuildRequires: %{python_module jaraco.collections}
BuildRequires: %{python_module jaraco.functools >= 1.10}
BuildRequires: %{python_module jaraco.itertools >= 1.8}
@@ -39,13 +40,7 @@
BuildRequires: %{python_module tempora >= 1.6}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Provides: python-irclib = %{version}
-Obsoletes: %{name}-doc
-Obsoletes: python-irclib < %{version}
-BuildArch: noarch
-%if 0%{?suse_version} > 1500
-BuildRequires: %{python_module jaraco.stream}
-%endif
+Requires: python-importlib-metadata
Requires: python-jaraco.collections
Requires: python-jaraco.functools >= 1.20
Requires: python-jaraco.itertools >= 1.8
@@ -55,6 +50,13 @@
Requires: python-more-itertools
Requires: python-pytz
Requires: python-tempora >= 1.6
+Provides: python-irclib = %{version}
+Obsoletes: %{name}-doc
+Obsoletes: python-irclib < %{version}
+BuildArch: noarch
+%if 0%{?suse_version} > 1500
+BuildRequires: %{python_module jaraco.stream}
+%endif
%python_subpackages
%description
@@ -77,7 +79,7 @@
%if 0%{?suse_version} > 1500
%check
-%python_exec -m pytest
+%pytest
%endif
%files %{python_files}
++++++ irc-17.0.tar.gz -> irc-17.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/.flake8 new/irc-17.1/.flake8
--- old/irc-17.0/.flake8 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/.flake8 2019-03-29 16:19:49.000000000 +0100
@@ -2,6 +2,8 @@
ignore =
# Allow tabs for indentation
W191
+ # Workaround for https://github.com/PyCQA/pycodestyle/issues/836
+ E117
# W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
W503
# W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/.travis.yml new/irc-17.1/.travis.yml
--- old/irc-17.0/.travis.yml 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/.travis.yml 2019-03-29 16:19:49.000000000 +0100
@@ -1,5 +1,4 @@
dist: xenial
-sudo: false
language: python
python:
@@ -12,18 +11,13 @@
- stage: deploy
if: tag IS present
python: *latest_py3
- install: skip
- script: skip
- deploy:
- provider: pypi
- on:
- tags: true
- all_branches: true
- user: jaraco
- password:
- secure: R5wfKa9o9Ah+j0++cY8D/aQI4zhLKWVT0Kctb1b4HQsPzZIJh3xJGsf4MJsmwUHDT18avf2e/f9Z2VAuq7RfsfT8C0LQ90tDUUNtW6vlCmGYldEpeN/O1PSCm1DI3mmFtpkIO2hN9MObYGhI9n7Q1ld7ReXdPUNMC2J3cRr7rmSMTGhxAABgcc0RO1eT6tHq4ZztCYO8UfLWUz09waiBXNWgnHzr/DGUTqnKD/EYL2tUiITJCRPJ8yKgaYyzGuPX65kXJSARMCuixdMJjo5oR5dk9oAwAw+hKmFV8maM3ae65d89NmwHF9svCB7noGgKAZbZmLe3RlC0xEx4tuhr5CP5FzXXrPutCPaUxjqj4Ld12Gl2XiBh0aJsqaPt5TPM0Khy5rQH7ZVZh/vTJ6TYTtfazRD2O/NrS59k6ooQH5Tg5eZ+KsrzPhiA1ANudvm3uENfWWjHv8gURnNso4mkOQYPku1I9M5GXjBE5Vwtahlw3ySUZvkMznBYVqLVB2wDt1LTHUvQ/JKmkdEl1o74x/ICwAhJ/aCJva4Txkf3P3P1u9uIktrJuQALA9u7jVS15W2jumXe6eXubJhrRyfcLjdYbmZSWpF5CpbVoOnxyWkFNSS8fSIngsDIAhgky+NpZthYXx0hMVi20ZZH1qxHgFLDnd7VusHZxNe0Rr3xrDA=
- distributions: dists
- skip_cleanup: true
+ before_script: skip
+ env:
+ - TWINE_USERNAME=jaraco
+ # TWINE_PASSWORD
+ - secure: DpyKCzmXytln+c01w2pIcI9jJJq9a2+rtw8RXRfzJDzaJttVQsPGJdBHIq/7PwrEWFTJJEeLAxtNSWqZmGStlYHx9UzzMyXereLY1/G2qPc9/NIRBG8VWWbUGp59yRhQ3h9cFi/2Da7enFZoVgSUe5SmV/elBzVMQn29FBfs3ekZ2lJJkoNqvrlJZir3zg9SMkzVL6aWnPQw8ZMRQs4vvzSm9SWFbOAu8BL7ml3/7KcO694enJQb2opvTL3qHPWD9LhIyT7Ly0jfnL56ut4DjXapwBgXn0Rd1karJbi9XTzdKwbtS1cCsp/vt41sRVZM7/3ALVeyAgOA+Em/k1RccQi/7Tki6OyTdw4S+aDIR4C50htoRlvERx9JZ6Oa8lpEEFRbkX3leUR+YK1cgSMmvh8KjmOo2TiekHWQ7kNBReBMTURcQ7VeNP2eXU1kYnhazmUbLZuxkt0qoNzbZPcb1XxmlTCowtYSGVII+GXiuI0YzcYuTGiqvMqR5JgadiB7BaqQvf22ftKZHrKTTZ6GLdVnhTMjPv6dRICTz+H1DvZ7YniGrX6tBJDy3ogeBn01oVKgPa50VrRvqXEPVqt9JIORNxuUp3mpAiSBLtbbZqtevDFcE+c/rD/8+Ts80/c4DbjhfRWBuYAHxySYwqSjSUmQIbnNYez7D+RZLLpVELA=
+ - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
+ script: tox -e release
cache: pip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/CHANGES.rst new/irc-17.1/CHANGES.rst
--- old/irc-17.0/CHANGES.rst 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/CHANGES.rst 2019-03-29 16:19:49.000000000 +0100
@@ -1,3 +1,30 @@
+17.1
+====
+
+* Rely on
+ `importlib_metadata https://pypi.org/project/importlib_metadata/`_
+ for loading version from metadata. Removes implicit dependency on
+ setuptools and pkg_resources.
+
+* #158: The AsyncIO server now accepts a connection factory to
+ enable features like SSL and IPv6 support.
+
+* #155: ``SimpleIRCClient`` now has a ``dcc`` method for initiating
+ and associating a DCCConnection object with the client.
+ ``DCCConnection.listen`` now accepts a ``address`` parameter.
+ Deprecated ``SimpleIRCClient.dcc_listen`` and
+ ``SimpleIRCClient.dcc_connect`` in favor of the better separation
+ of concerns. Clients should replace::
+
+ client.dcc_connect(addr, port, type)
+ client.dcc_listen(type)
+
+ with::
+
+ client.dcc(type).connect(addr, port)
+ client.dcc(type).listen()
+
+
17.0
====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/PKG-INFO new/irc-17.1/PKG-INFO
--- old/irc-17.0/PKG-INFO 2018-10-21 22:58:30.000000000 +0200
+++ new/irc-17.1/PKG-INFO 2019-03-29 16:20:07.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: irc
-Version: 17.0
+Version: 17.1
Summary: IRC (Internet Relay Chat) protocol library for Python
Home-page: https://github.com/jaraco/irc
Author: Joel Rosdahl
@@ -77,7 +77,7 @@
* Data is not written asynchronously to the server (and DCC peers),
i.e. the ``write()`` may block if the TCP buffers are stuffed.
* Like most projects, documentation is lacking ...
- * DCC is not currently implemented in the asyncio-based versin
+ * DCC is not currently implemented in the asyncio-based version
Unfortunately, this library isn't as well-documented as I would like
it to be. I think the best way to get started is to read and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/README.rst new/irc-17.1/README.rst
--- old/irc-17.0/README.rst 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/README.rst 2019-03-29 16:19:49.000000000 +0100
@@ -67,7 +67,7 @@
* Data is not written asynchronously to the server (and DCC peers),
i.e. the ``write()`` may block if the TCP buffers are stuffed.
* Like most projects, documentation is lacking ...
-* DCC is not currently implemented in the asyncio-based versin
+* DCC is not currently implemented in the asyncio-based version
Unfortunately, this library isn't as well-documented as I would like
it to be. I think the best way to get started is to read and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/docs/conf.py new/irc-17.1/docs/conf.py
--- old/irc-17.0/docs/conf.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/docs/conf.py 2019-03-29 16:19:49.000000000 +0100
@@ -2,36 +2,34 @@
# -*- coding: utf-8 -*-
extensions = [
- 'sphinx.ext.autodoc',
- 'jaraco.packaging.sphinx',
- 'rst.linker',
- 'sphinx.ext.viewcode',
+ "sphinx.ext.autodoc",
+ "jaraco.packaging.sphinx",
+ "rst.linker",
+ "sphinx.ext.viewcode",
]
-master_doc = 'index'
+master_doc = "index"
link_files = {
- '../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)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n',
- with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
- ),
- dict(
- pattern=r'PEP[- ](?P\d+)',
- url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
- ),
- dict(
- pattern=r'(Sourceforge )(?P\d+)',
- url='https://sourceforge.net/p/python-irclib/bugs/{sf_issue}/',
- ),
- ],
- ),
+ "../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)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n",
+ with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
+ ),
+ dict(
+ pattern=r"PEP[- ](?P\d+)",
+ url="https://www.python.org/dev/peps/pep-{pep_number:0>4}/",
+ ),
+ dict(
+ pattern=r"(Sourceforge )(?P\d+)",
+ url="https://sourceforge.net/p/python-irclib/bugs/{sf_issue}/",
+ ),
+ ],
+ )
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc/bot.py new/irc-17.1/irc/bot.py
--- old/irc-17.0/irc/bot.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/irc/bot.py 2019-03-29 16:19:49.000000000 +0100
@@ -14,6 +14,8 @@
import itertools
import random
+import more_itertools
+
import irc.client
import irc.modes
from .dict import IRCDict
@@ -45,6 +47,12 @@
"with password" if self.password else "without password",
)
+ @classmethod
+ def ensure(cls, input):
+ spec = cls(*input) if isinstance(input, (list, tuple)) else input
+ assert isinstance(spec, cls)
+ return spec
+
class ReconnectStrategy(metaclass=abc.ABCMeta):
"""
@@ -144,16 +152,8 @@
super(SingleServerIRCBot, self).__init__()
self.__connect_params = connect_params
self.channels = IRCDict()
- self.server_list = [
- ServerSpec(*server)
- if isinstance(server, (tuple, list))
- else server
- for server in server_list
- ]
- assert all(
- isinstance(server, ServerSpec)
- for server in self.server_list
- )
+ specs = map(ServerSpec.ensure, server_list)
+ self.servers = more_itertools.peekable(itertools.cycle(specs))
self.recon = recon
# for compatibility
if reconnection_interval is not missing:
@@ -174,13 +174,12 @@
"""
Establish a connection to the server at the front of the server_list.
"""
- server = self.server_list[0]
+ server = self.servers.peek()
try:
self.connect(
server.host, server.port, self._nickname,
server.password, ircname=self._realname,
**self.__connect_params)
- self.connection_attempts = 1
except irc.client.ServerConnectionError:
pass
@@ -305,7 +304,7 @@
if self.connection.is_connected():
self.connection.disconnect(msg)
- self.server_list.append(self.server_list.pop(0))
+ next(self.servers)
self._connect()
def on_ctcp(self, connection, event):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc/client.py new/irc-17.1/irc/client.py
--- old/irc-17.0/irc/client.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/irc/client.py 2019-03-29 16:19:49.000000000 +0100
@@ -60,17 +60,14 @@
import functools
import itertools
import contextlib
+import warnings
import jaraco.functools
from jaraco.itertools import always_iterable, infinite_call
from jaraco.functools import Throttler
from jaraco.stream import buffer
from more_itertools.recipes import consume
-
-try:
- import pkg_resources
-except ImportError:
- pass
+import importlib_metadata
from . import connection
from . import events
@@ -83,7 +80,7 @@
# set the version tuple
try:
- VERSION_STRING = pkg_resources.require('irc')[0].version
+ VERSION_STRING = importlib_metadata.version('irc')
VERSION = tuple(int(res) for res in re.findall(r'\d+', VERSION_STRING))
except Exception:
VERSION_STRING = 'unknown'
@@ -981,7 +978,7 @@
self.reactor._on_connect(self.socket)
return self
- def listen(self):
+ def listen(self, addr=None):
"""Wait for a connection/reconnection from a DCC peer.
Returns the DCCConnection object.
@@ -995,8 +992,9 @@
self.handlers = {}
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.passive = True
+ default_addr = socket.gethostbyname(socket.gethostname()), 0
try:
- self.socket.bind((socket.gethostbyname(socket.gethostname()), 0))
+ self.socket.bind(addr or default_addr)
self.localaddress, self.localport = self.socket.getsockname()
self.socket.listen(10)
except socket.error as x:
@@ -1161,6 +1159,16 @@
"""Connect using the underlying connection"""
self.connection.connect(*args, **kwargs)
+ def dcc(self, *args, **kwargs):
+ """Create and associate a new DCCConnection object.
+
+ Use the returned object to listen for or connect to
+ a DCC peer.
+ """
+ dcc = self.reactor.dcc(*args, **kwargs)
+ self.dcc_connections.append(dcc)
+ return dcc
+
def dcc_connect(self, address, port, dcctype="chat"):
"""Connect to a DCC peer.
@@ -1172,20 +1180,16 @@
Returns a DCCConnection instance.
"""
- dcc = self.reactor.dcc(dcctype)
- self.dcc_connections.append(dcc)
- dcc.connect(address, port)
- return dcc
+ warnings.warn("Use self.dcc(type).connect()", DeprecationWarning)
+ return self.dcc(dcctype).connect(address, port)
def dcc_listen(self, dcctype="chat"):
"""Listen for connections from a DCC peer.
Returns a DCCConnection instance.
"""
- dcc = self.reactor.dcc(dcctype)
- self.dcc_connections.append(dcc)
- dcc.listen()
- return dcc
+ warnings.warn("Use self.dcc(type).listen()", DeprecationWarning)
+ return self.dcc(dcctype).listen()
def start(self):
"""Start the IRC client."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc/client_aio.py new/irc-17.1/irc/client_aio.py
--- old/irc-17.0/irc/client_aio.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/irc/client_aio.py 2019-03-29 16:19:49.000000000 +0100
@@ -43,6 +43,7 @@
import threading
import logging
+from . import connection
from .client import ServerConnection, ServerNotConnectedError, Reactor,\
SimpleIRCClient, Event, _ping_ponger
@@ -99,8 +100,8 @@
protocol_class = IrcProtocol
async def connect(
- self, server, port, nickname,
- password=None, username=None, ircname=None
+ self, server, port, nickname, password=None, username=None,
+ ircname=None, connect_factory=connection.AioFactory()
):
"""Connect/reconnect to a server.
@@ -113,6 +114,9 @@
* username - The username
* ircname - The IRC name ("realname")
+ * connect_factory - An async callable that takes the event loop and the
+ server address, and returns a connection (with a socket interface)
+
This function can be called to reconnect a closed connection.
Returns the AioProtocol instance (used for handling incoming
@@ -133,12 +137,11 @@
self.username = username or nickname
self.ircname = ircname or nickname
self.password = password
+ self.connect_factory = connect_factory
- connection = self.reactor.loop.create_connection(
- lambda: self.protocol_class(self, self.reactor.loop),
- self.server,
- self.port,
- )
+ protocol_instance = self.protocol_class(self, self.reactor.loop)
+ connection = self.connect_factory(
+ protocol_instance, self.server_address)
transport, protocol = await connection
self.transport = transport
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc/connection.py new/irc-17.1/irc/connection.py
--- old/irc-17.0/irc/connection.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/irc/connection.py 2019-03-29 16:19:49.000000000 +0100
@@ -49,3 +49,39 @@
sock.connect(server_address)
return sock
__call__ = connect
+
+
+class AioFactory:
+ """
+ A class for creating async custom socket connections.
+
+ To create a simple connection:
+
+ server_address = ('localhost', 80)
+ Factory()(protocol_instance, server_address)
+
+ To create an SSL connection:
+
+ Factory(ssl=True)(protocol_instance, server_address)
+
+ To create an IPv6 connection:
+
+ Factory(ipv6=True)(protocol_instance, server_address)
+
+ Note that Factory doesn't save the state of the socket itself. The
+ caller must do that, as necessary. As a result, the Factory may be
+ re-used to create new connections with the same settings.
+
+ """
+
+ family = socket.AF_INET
+
+ def __init__(self, **kwargs):
+ self.connection_args = kwargs
+
+ def connect(self, protocol_instance, server_address):
+ return protocol_instance.loop.create_connection(
+ lambda: protocol_instance, *server_address,
+ **self.connection_args)
+
+ __call__ = connect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc/tests/test_bot.py new/irc-17.1/irc/tests/test_bot.py
--- old/irc-17.0/irc/tests/test_bot.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/irc/tests/test_bot.py 2019-03-29 16:19:49.000000000 +0100
@@ -108,8 +108,7 @@
realname='irclibbot',
nickname='irclibbot',
)
- assert len(bot.server_list) == 1
- svr = bot.server_list[0]
+ svr = bot.servers.peek()
assert svr.host == 'localhost'
assert svr.port == '9999'
assert svr.password is None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc.egg-info/PKG-INFO new/irc-17.1/irc.egg-info/PKG-INFO
--- old/irc-17.0/irc.egg-info/PKG-INFO 2018-10-21 22:58:30.000000000 +0200
+++ new/irc-17.1/irc.egg-info/PKG-INFO 2019-03-29 16:20:07.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: irc
-Version: 17.0
+Version: 17.1
Summary: IRC (Internet Relay Chat) protocol library for Python
Home-page: https://github.com/jaraco/irc
Author: Joel Rosdahl
@@ -77,7 +77,7 @@
* Data is not written asynchronously to the server (and DCC peers),
i.e. the ``write()`` may block if the TCP buffers are stuffed.
* Like most projects, documentation is lacking ...
- * DCC is not currently implemented in the asyncio-based versin
+ * DCC is not currently implemented in the asyncio-based version
Unfortunately, this library isn't as well-documented as I would like
it to be. I think the best way to get started is to read and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc.egg-info/SOURCES.txt new/irc-17.1/irc.egg-info/SOURCES.txt
--- old/irc-17.0/irc.egg-info/SOURCES.txt 2018-10-21 22:58:30.000000000 +0200
+++ new/irc-17.1/irc.egg-info/SOURCES.txt 2019-03-29 16:20:07.000000000 +0100
@@ -12,6 +12,7 @@
pytest.ini
setup.cfg
setup.py
+skeleton.md
tox.ini
docs/conf.py
docs/history.rst
@@ -37,7 +38,6 @@
irc.egg-info/PKG-INFO
irc.egg-info/SOURCES.txt
irc.egg-info/dependency_links.txt
-irc.egg-info/namespace_packages.txt
irc.egg-info/requires.txt
irc.egg-info/top_level.txt
irc/tests/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/irc.egg-info/namespace_packages.txt new/irc-17.1/irc.egg-info/namespace_packages.txt
--- old/irc-17.0/irc.egg-info/namespace_packages.txt 2018-10-21 22:58:30.000000000 +0200
+++ new/irc-17.1/irc.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/irc-17.0/irc.egg-info/requires.txt new/irc-17.1/irc.egg-info/requires.txt
--- old/irc-17.0/irc.egg-info/requires.txt 2018-10-21 22:58:30.000000000 +0200
+++ new/irc-17.1/irc.egg-info/requires.txt 2019-03-29 16:20:07.000000000 +0100
@@ -7,6 +7,7 @@
pytz
more_itertools
tempora>=1.6
+importlib_metadata
[docs]
sphinx
@@ -15,8 +16,7 @@
[testing]
pytest!=3.7.3,>=3.5
-pytest-sugar>=0.9.1
-collective.checkdocs
+pytest-checkdocs
pytest-flake8
backports.unittest_mock
pygments
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/pyproject.toml new/irc-17.1/pyproject.toml
--- old/irc-17.0/pyproject.toml 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/pyproject.toml 2019-03-29 16:19:49.000000000 +0100
@@ -1,2 +1,3 @@
[build-system]
-requires = ["setuptools>=30.3", "wheel", "setuptools_scm>=1.15"]
+requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/pytest.ini new/irc-17.1/pytest.ini
--- old/irc-17.0/pytest.ini 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/pytest.ini 2019-03-29 16:19:49.000000000 +0100
@@ -5,3 +5,7 @@
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/irc-17.0/scripts/irccat2-aio.py new/irc-17.1/scripts/irccat2-aio.py
--- old/irc-17.0/scripts/irccat2-aio.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/scripts/irccat2-aio.py 2019-03-29 16:19:49.000000000 +0100
@@ -70,6 +70,7 @@
args.server, args.port, args.nickname, password=args.password
)
except irc.client.ServerConnectionError as x:
+ print(x)
sys.exit(1)
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/setup.cfg new/irc-17.1/setup.cfg
--- old/irc-17.0/setup.cfg 2018-10-21 22:58:30.000000000 +0200
+++ new/irc-17.1/setup.cfg 2019-03-29 16:20:07.000000000 +0100
@@ -1,12 +1,53 @@
-[aliases]
-dists = clean --all sdist bdist_wheel
-
[bdist_wheel]
universal = 1
[metadata]
license_file = LICENSE
+name = irc
+author = Joel Rosdahl
+author_email = joel@rosdahl.net
+maintainer = Jason R. Coombs
+maintainer_email = jaraco@jaraco.com
+description = IRC (Internet Relay Chat) protocol library for Python
long_description = file:README.rst
+url = https://github.com/jaraco/irc
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Intended Audience :: Developers
+ License :: OSI Approved :: MIT License
+ Programming Language :: Python :: 3
+
+[options]
+packages = find:
+include_package_data = true
+python_requires = >=3.4
+install_requires =
+ jaraco.collections
+ jaraco.text
+ jaraco.itertools>=1.8
+ jaraco.logging
+ jaraco.functools>=1.20
+ jaraco.stream
+ pytz
+ more_itertools
+ tempora>=1.6
+ importlib_metadata
+setup_requires = setuptools_scm >= 1.15.0
+
+[options.extras_require]
+testing =
+ pytest >= 3.5, !=3.7.3
+ pytest-checkdocs
+ pytest-flake8
+
+ backports.unittest_mock
+ pygments
+docs =
+ sphinx
+ jaraco.packaging >= 3.2
+ rst.linker >= 1.9
+
+[options.entry_points]
[egg_info]
tag_build =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irc-17.0/setup.py new/irc-17.1/setup.py
--- old/irc-17.0/setup.py 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/setup.py 2019-03-29 16:19:49.000000000 +0100
@@ -1,76 +1,6 @@
#!/usr/bin/env python
-# Project skeleton maintained at https://github.com/jaraco/skeleton
-
import setuptools
-name = 'irc'
-description = 'IRC (Internet Relay Chat) protocol library for Python'
-nspkg_technique = 'native'
-"""
-Does this package use "native" namespace packages or
-pkg_resources "managed" namespace packages?
-"""
-
-params = dict(
- name=name,
- use_scm_version=True,
- author="Joel Rosdahl",
- author_email="joel@rosdahl.net",
- maintainer="Jason R. Coombs",
- maintainer_email="jaraco@jaraco.com",
- description=description or name,
- url="https://github.com/jaraco/" + name,
- packages=setuptools.find_packages(),
- include_package_data=True,
- namespace_packages=(
- name.split('.')[:-1] if nspkg_technique == 'managed'
- else []
- ),
- python_requires='>=3.4',
- install_requires=[
- 'jaraco.collections',
- 'jaraco.text',
- 'jaraco.itertools>=1.8',
- 'jaraco.logging',
- 'jaraco.functools>=1.20',
- 'jaraco.stream',
- 'pytz',
- 'more_itertools',
- 'tempora>=1.6',
- ],
- extras_require={
- 'testing': [
- # upstream
- 'pytest>=3.5,!=3.7.3',
- 'pytest-sugar>=0.9.1',
- 'collective.checkdocs',
- 'pytest-flake8',
-
- # local
- 'backports.unittest_mock',
- 'pygments',
- ],
- 'docs': [
- # upstream
- 'sphinx',
- 'jaraco.packaging>=3.2',
- 'rst.linker>=1.9',
-
- # local
- ],
- },
- setup_requires=[
- 'setuptools_scm>=1.15.0',
- ],
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: MIT License",
- "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/irc-17.0/skeleton.md new/irc-17.1/skeleton.md
--- old/irc-17.0/skeleton.md 1970-01-01 01:00:00.000000000 +0100
+++ new/irc-17.1/skeleton.md 2019-03-29 16:19:49.000000000 +0100
@@ -0,0 +1,128 @@
+# 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/12eed1326e1bc26ce256e7b3f8cd8d3a5b...) 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.
+
+## 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:
+
+- allow tabs for indentation (legacy for jaraco projects)
+- disable mutually incompatible rules W503 and W504.
+
+## 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/irc-17.0/tox.ini new/irc-17.1/tox.ini
--- old/irc-17.0/tox.ini 2018-10-21 22:58:00.000000000 +0200
+++ new/irc-17.1/tox.ini 2019-03-29 16:19:49.000000000 +0100
@@ -7,7 +7,6 @@
setuptools>=31.0.1
commands =
pytest {posargs}
- python setup.py checkdocs
usedevelop = True
extras = testing
@@ -18,3 +17,15 @@
changedir = docs
commands =
python -m sphinx . {toxinidir}/build/html
+
+[testenv:release]
+skip_install = True
+deps =
+ pep517>=0.5
+ # workaround for https://github.com/pypa/twine/issues/423
+ git+https://github.com/pypa/twine
+ path.py
+commands =
+ python -c "import path; path.Path('dist').rmtree_p()"
+ python -m pep517.build .
+ python -m twine upload dist/*