Sun Apr 7 15:58:33 2019 UTC ()
py-wsproto: updated to 0.14.0

0.14.0:
* Bugfix clarify subprotocol type as str not bytes.
* Support HTTP/2 WebSockets. This requires a HTTP/2 parser (not
  included), with hyper-h2 recommended. It renames
  handshake_extensions and hence is a breaking change.
* Bugfix badly formatted type hints.
* Bugfix minor issues identified by type checking.

0.13.0:
* Introduce a send method on the conenction which accepts the new
  events. This requires the following usage changes, ::
    connection.accept(subprotocol=subprotocol) -> connection.send(AcceptConnection(subprotocol=subprotocol))
    connection.send_data(data) -> connection.send(Message(payload=payload))
    connection.close(code) -> connection.send(CloseConnection(code=code))
    connection.ping() -> connection.send(Ping())
    connection.pong() -> connection.send(Pong())

* The Event structure is altered to allow for events to be sent and
  received, this requires the following name changes in existing code, ::
    ConnectionRequested -> Request
    ConnectionEstablished -> AcceptConnection
    ConnectionClosed -> CloseConnection
    DataReceived -> Message
    TextReceived -> TextMessage
    BytesReceived -> BytesMessage
    PingReceived -> Ping
    PongReceived -> Pong

* Introduce RejectConnection and RejectData events to be used by a
  server connection to reject rather than accept a connection or by a
  client connection to emit the rejection response. The RejectData
  event represents the rejection response body, if present.
* Add an extra_headers field to the AcceptConnection event in order to
  customise the acceptance response in server mode or to emit this
  information in client mode.
* Switch from Fail events being returned to RemoteProtocolErrors being
  raised.
* Switch from ValueErrors to LocalProtocolErrors being raised when
  an action is taken that is incompatible with the connection state or
  websocket standard.
* Enforce version checking in SERVER mode, only 13 is supported.
* Add an event_hint to RemoteProtocolErrors to hint at how to respond
  to issues.
* Switch from a bytes_to_send method to the send method
  returning the bytes to send directly. Responses to Ping and Close
  messages must now be sent (via send), with the Ping and
  CloseConnection events gaining a response method. This
  allows ::
    if isinstance(event, Ping):
        bytes_to_send = connection.send(event.response())
* Separate the handshake from the active connection handling. This
  allows the handshake and connection to be seperately used. By
  default though WSConnection does both.
* receive_bytes is renamed to receive_data and
  WSConnection should be imported from wsproto rather than
  wsproto.connection.

0.12.0:
* Support h11 ~0.8.1.
* Support Python 3.7.
* Make the close-handshake more explicit, by sending a close frame on
  reciept of a close frame.
* Bugfix fix deflate after a non-compressable message.
* Bugfix connection header acceptance, by accepting Connection header
  values that are comma separated lists.


(adam)
diff -r1.2 -r1.3 pkgsrc/www/py-wsproto/Makefile
diff -r1.1 -r1.2 pkgsrc/www/py-wsproto/PLIST
diff -r1.1 -r1.2 pkgsrc/www/py-wsproto/distinfo
diff -r1.1 -r1.2 pkgsrc/www/py-wsproto/patches/patch-setup.py

cvs diff -r1.2 -r1.3 pkgsrc/www/py-wsproto/Makefile (expand / switch to unified diff)

--- pkgsrc/www/py-wsproto/Makefile 2018/02/27 06:57:26 1.2
+++ pkgsrc/www/py-wsproto/Makefile 2019/04/07 15:58:32 1.3
@@ -1,24 +1,26 @@ @@ -1,24 +1,26 @@
1# $NetBSD: Makefile,v 1.2 2018/02/27 06:57:26 adam Exp $ 1# $NetBSD: Makefile,v 1.3 2019/04/07 15:58:32 adam Exp $
2 2
3DISTNAME= wsproto-0.11.0 3DISTNAME= wsproto-0.14.0
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5CATEGORIES= www python 5CATEGORIES= www python
6MASTER_SITES= ${MASTER_SITE_PYPI:=w/wsproto/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=w/wsproto/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://wsproto.readthedocs.io/ 9HOMEPAGE= https://wsproto.readthedocs.io/
10COMMENT= Pure Python, pure state-machine WebSocket implementation 10COMMENT= Pure Python, pure state-machine WebSocket implementation
11LICENSE= mit 11LICENSE= mit
12 12
13DEPENDS+= ${PYPKGPREFIX}-h11>=0.7.0:../../www/py-h11 13DEPENDS+= ${PYPKGPREFIX}-h11>=0.7.0:../../www/py-h11
 14TEST_DEPENDS+= ${PYPKGPREFIX}-test-runner-[0-9]*:../../devel/py-test-runner
14 15
15.include "../../lang/python/pyversion.mk" 16.include "../../lang/python/pyversion.mk"
16 17.if ${_PYTHON_VERSION} == 27
17.if "${PYPKGPREFIX}" == "py27" 
18DEPENDS+= ${PYPKGPREFIX}-enum34>=1.0.4:../../devel/py-enum34 18DEPENDS+= ${PYPKGPREFIX}-enum34>=1.0.4:../../devel/py-enum34
19.endif 19.endif
20 20
21USE_LANGUAGES= # none 21USE_LANGUAGES= # none
22 22
 23PYSETUPTESTTARGET= pytest
 24
23.include "../../lang/python/egg.mk" 25.include "../../lang/python/egg.mk"
24.include "../../mk/bsd.pkg.mk" 26.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1 -r1.2 pkgsrc/www/py-wsproto/PLIST (expand / switch to unified diff)

--- pkgsrc/www/py-wsproto/PLIST 2018/02/26 12:09:18 1.1
+++ pkgsrc/www/py-wsproto/PLIST 2019/04/07 15:58:32 1.2
@@ -1,27 +1,33 @@ @@ -1,27 +1,33 @@
1@comment $NetBSD: PLIST,v 1.1 2018/02/26 12:09:18 leot Exp $ 1@comment $NetBSD: PLIST,v 1.2 2019/04/07 15:58:32 adam Exp $
2${PYSITELIB}/${EGG_INFODIR}/PKG-INFO 2${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
3${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt 3${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
4${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt 4${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
5${PYSITELIB}/${EGG_INFODIR}/requires.txt 5${PYSITELIB}/${EGG_INFODIR}/requires.txt
6${PYSITELIB}/${EGG_INFODIR}/top_level.txt 6${PYSITELIB}/${EGG_INFODIR}/top_level.txt
7${PYSITELIB}/wsproto/__init__.py 7${PYSITELIB}/wsproto/__init__.py
8${PYSITELIB}/wsproto/__init__.pyc 8${PYSITELIB}/wsproto/__init__.pyc
9${PYSITELIB}/wsproto/__init__.pyo 9${PYSITELIB}/wsproto/__init__.pyo
10${PYSITELIB}/wsproto/compat.py 10${PYSITELIB}/wsproto/compat.py
11${PYSITELIB}/wsproto/compat.pyc 11${PYSITELIB}/wsproto/compat.pyc
12${PYSITELIB}/wsproto/compat.pyo 12${PYSITELIB}/wsproto/compat.pyo
13${PYSITELIB}/wsproto/connection.py 13${PYSITELIB}/wsproto/connection.py
14${PYSITELIB}/wsproto/connection.pyc 14${PYSITELIB}/wsproto/connection.pyc
15${PYSITELIB}/wsproto/connection.pyo 15${PYSITELIB}/wsproto/connection.pyo
16${PYSITELIB}/wsproto/events.py 16${PYSITELIB}/wsproto/events.py
17${PYSITELIB}/wsproto/events.pyc 17${PYSITELIB}/wsproto/events.pyc
18${PYSITELIB}/wsproto/events.pyo 18${PYSITELIB}/wsproto/events.pyo
19${PYSITELIB}/wsproto/extensions.py 19${PYSITELIB}/wsproto/extensions.py
20${PYSITELIB}/wsproto/extensions.pyc 20${PYSITELIB}/wsproto/extensions.pyc
21${PYSITELIB}/wsproto/extensions.pyo 21${PYSITELIB}/wsproto/extensions.pyo
22${PYSITELIB}/wsproto/frame_protocol.py 22${PYSITELIB}/wsproto/frame_protocol.py
23${PYSITELIB}/wsproto/frame_protocol.pyc 23${PYSITELIB}/wsproto/frame_protocol.pyc
24${PYSITELIB}/wsproto/frame_protocol.pyo 24${PYSITELIB}/wsproto/frame_protocol.pyo
 25${PYSITELIB}/wsproto/handshake.py
 26${PYSITELIB}/wsproto/handshake.pyc
 27${PYSITELIB}/wsproto/handshake.pyo
25${PYSITELIB}/wsproto/utf8validator.py 28${PYSITELIB}/wsproto/utf8validator.py
26${PYSITELIB}/wsproto/utf8validator.pyc 29${PYSITELIB}/wsproto/utf8validator.pyc
27${PYSITELIB}/wsproto/utf8validator.pyo 30${PYSITELIB}/wsproto/utf8validator.pyo
 31${PYSITELIB}/wsproto/utilities.py
 32${PYSITELIB}/wsproto/utilities.pyc
 33${PYSITELIB}/wsproto/utilities.pyo

cvs diff -r1.1 -r1.2 pkgsrc/www/py-wsproto/distinfo (expand / switch to unified diff)

--- pkgsrc/www/py-wsproto/distinfo 2018/02/26 12:09:18 1.1
+++ pkgsrc/www/py-wsproto/distinfo 2019/04/07 15:58:32 1.2
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.1 2018/02/26 12:09:18 leot Exp $ 1$NetBSD: distinfo,v 1.2 2019/04/07 15:58:32 adam Exp $
2 2
3SHA1 (wsproto-0.11.0.tar.gz) = acfb9cd1c58ed2573843a6390d03fdfe808c6fed 3SHA1 (wsproto-0.14.0.tar.gz) = 7a8de9f54c2bea675f673c4c344a81c59ac3412c
4RMD160 (wsproto-0.11.0.tar.gz) = cdf698bd685916b2c27f1b40394174cd2773dcc0 4RMD160 (wsproto-0.14.0.tar.gz) = 525936c256da69977097490353c2feaf18978285
5SHA512 (wsproto-0.11.0.tar.gz) = 583e030dc88971b3733e5e84e5fbaa70d6043d01485cabbbf45470baa31e4f511aea55e108132fc298aeae0031542af7bdd22b7ae25b11832179025a2fde4bdd 5SHA512 (wsproto-0.14.0.tar.gz) = 91ffc51229434b8a3c1517b22a082dce0078e38e0f5e7ad016aca9b4d4f2a77c2f9901ea9227e80e61009e70d3ffebb44ed9ae4c988d54a9807b45076e81d43f
6Size (wsproto-0.11.0.tar.gz) = 41179 bytes 6Size (wsproto-0.14.0.tar.gz) = 51540 bytes
7SHA1 (patch-setup.py) = 6c229f58d9dd44a46322c849535a2d9ad657ac1d 7SHA1 (patch-setup.py) = bf4b6885ce51d8ea1bd95c0eb98b16bec60f25d2

cvs diff -r1.1 -r1.2 pkgsrc/www/py-wsproto/patches/Attic/patch-setup.py (expand / switch to unified diff)

--- pkgsrc/www/py-wsproto/patches/Attic/patch-setup.py 2018/02/26 12:09:18 1.1
+++ pkgsrc/www/py-wsproto/patches/Attic/patch-setup.py 2019/04/07 15:58:33 1.2
@@ -1,19 +1,25 @@ @@ -1,19 +1,25 @@
1$NetBSD: patch-setup.py,v 1.1 2018/02/26 12:09:18 leot Exp $ 1$NetBSD: patch-setup.py,v 1.2 2019/04/07 15:58:33 adam Exp $
2 2
 3Do not install tests.
3Avoid too strict version requirements. 4Avoid too strict version requirements.
4 5
5--- setup.py.orig 2017-12-31 17:19:40.000000000 +0000 6--- setup.py.orig 2018-09-23 11:26:23.000000000 +0000
6+++ setup.py 7+++ setup.py
7@@ -47,10 +47,10 @@ setup( 8@@ -35,7 +35,7 @@ setup(
 9 author='Benno Rice',
 10 author_email='benno@jeamland.net',
 11 url='https://github.com/python-hyper/wsproto/',
 12- packages=find_packages(),
 13+ packages=find_packages(exclude=['test']),
 14 package_data={'': ['LICENSE', 'README.rst']},
 15 package_dir={'wsproto': 'wsproto'},
 16 include_package_data=True,
 17@@ -55,7 +55,7 @@ setup(
8 'Programming Language :: Python :: Implementation :: PyPy', 18 'Programming Language :: Python :: Implementation :: PyPy',
9 ], 19 ],
10 install_requires=[ 20 install_requires=[
11- 'h11 ~= 0.7.0', # means: 0.7.x where x >= 0 21- 'h11 ~= 0.8.1', # means: 0.8.x where x >= 1
12+ 'h11>=0.7.0', 22+ 'h11>=0.8.1',
13 ], 23 ],
14 extras_require={ 24 extras_require={
15 ':python_version == "2.7" or python_version == "3.3"': 25 ':python_version == "2.7"':
16- ['enum34>=1.0.4, <2'], 
17+ ['enum34>=1.0.4'], 
18 } 
19 )