Skip to content

Commit

Permalink
towards v1
Browse files Browse the repository at this point in the history
ref #114
  • Loading branch information
Kriechi committed Jul 31, 2020
1 parent 2082563 commit da3252d
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 63 deletions.
127 changes: 69 additions & 58 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,45 +1,55 @@
0.15.0 2019-08-10
-----------------
Release History
===============

*This contains all the Bugfixes in the 0.14 branch.*
1.0.0+dev
---------

* Drop support for Python 2. Please pin to ~= 0.14.0 if you support
- Prevent invalid window bit sizes.
- Added support for Python 3.8.


0.15.0 (2019-08-10)
-------------------

**This contains all the Bugfixes in the 0.14 branch.**

- Drop support for Python 2. Please pin to ~= 0.14.0 if you support
Python 2.
* Drop support for Python 3.5, meaning the minimum supported version
- Drop support for Python 3.5, meaning the minimum supported version
is Python 3.6.1.
* Switch events to be dataclass based, otherwise the API is
- Switch events to be dataclass based, otherwise the API is
consistent.
* Add type hints throughout and support PEP 561 via a py.typed
- Add type hints throughout and support PEP 561 via a py.typed
file. This should allow projects that use wsproto to type check their
usage of wsproto.
* Bugfix prevent the test folder being installed as a package called
- Bugfix prevent the test folder being installed as a package called
test.
* Explicitly require Host header in handshake.
* Drop wsaccel support and utilise the aiohttp/@willmcgugan masking
method. wsaccel is unmaintained and this new maksing method is
- Explicitly require Host header in handshake.
- Drop wsaccel support and utilise the aiohttp/@willmcgugan masking
method. wsaccel is unmaintained and this new masking method is
almost as quick.

0.14.1 2019-05-30
-----------------
0.14.1 (2019-05-30)
-------------------

* Loosen the h11 requirement to >= 0.8.1 as wsproto is compatible with
- Loosen the h11 requirement to >= 0.8.1 as wsproto is compatible with
0.9 onwards.
* Stop installing a "test" package on installation.
- Stop installing a "test" package on installation.

0.14.0 2019-04-06
-----------------
0.14.0 (2019-04-06)
-------------------

* Bugfix clarify subprotocol type as str not bytes.
* Support HTTP/2 WebSockets. This requires a HTTP/2 parser (not
- 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.
- Bugfix badly formatted type hints.
- Bugfix minor issues identified by type checking.

0.13.0 2019-01-24
-----------------
0.13.0 (2019-01-24)
-------------------

* Introduce a send method on the connection which accepts the new
- Introduce a send method on the connection which accepts the new
events. This requires the following usage changes, ::

connection.accept(subprotocol=subprotocol) -> connection.send(AcceptConnection(subprotocol=subprotocol))
Expand All @@ -48,7 +58,7 @@
connection.ping() -> connection.send(Ping())
connection.pong() -> connection.send(Pong())

* The Event structure is altered to allow for events to be sent and
- 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
Expand All @@ -60,66 +70,67 @@
PingReceived -> Ping
PongReceived -> Pong

* Introduce RejectConnection and RejectData events to be used by a
- 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
- 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 RemoteProtocolError`s being
raised.
* Switch from ValueError`s to LocalProtocolError`s being raised when
- Switch from Fail events being returned to raising ``RemoteProtocolError``.
- Switch from ValueError`s to LocalProtocolError`s 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
- 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
- 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
- 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
- ``receive_bytes`` is renamed to ``receive_data`` and
``WSConnection`` should be imported from ``wsproto`` rather than
``wsproto.connection``.

0.12.0 2018-09-23
-----------------
0.12.0 (2018-09-23)
-------------------

* Support h11 ~0.8.1.
* Support Python 3.7.
* Make the close-handshake more explicit, by sending a close frame on
- 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
- Bugfix fix deflate after a non-compressable message.
- Bugfix connection header acceptance, by accepting Connection header
values that are comma separated lists.

0.11.0 2017-12-31
-----------------
0.11.0 (2017-12-31)
-------------------

- Separate extension handling into its own method.
- Add events for PING and PONG frames.
- Stop supporting Python 3.4.
- Large increase in tests and test coverage.
- Bugfix extension accept for empty strings.
- Bugfix raise if default arguments are invalid.

* Separate extension handling into its own method.
* Add events for PING and PONG frames.
* Stop supporting Python 3.4.
* Large increase in tests and test coverage.
* Bugfix extension accept for empty strings.
* Bugfix raise if default arguments are invalid.
0.10.0 (2017-05-03)
-------------------

0.10.0 2017-05-03
-----------------
- General improvements.

0.9.1 2016-10-27
----------------
0.9.1 (2016-10-27)
------------------

(Unreleased on PyPI)
- (unreleased on PyPI)

0.9.0 2016-08-24
----------------
0.9.0 (2016-08-24)
------------------

(First release on PyPI)
- First release on PyPI.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
version=version,
description='WebSockets state-machine based protocol implementation',
long_description=long_description,
long_description_content_type="text/x-rst",
long_description_content_type='text/x-rst',
author='Benno Rice',
author_email='benno@jeamland.net',
url='https://github.com/python-hyper/wsproto/',
packages=find_packages(where="src"),
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
package_dir={"": "src"},
python_requires=">=3.6.1",
package_dir={'': 'src'},
python_requires='>=3.6.1',
include_package_data=True,
license='MIT License',
classifiers=[
Expand All @@ -56,6 +56,6 @@
],
install_requires=[
"dataclasses ; python_version < '3.7'",
'h11 >= 0.8.1',
'h11>=0.9.0,<1',
],
)
2 changes: 1 addition & 1 deletion src/wsproto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .handshake import H11Handshake
from .typing import Headers

__version__ = "0.15.0+dev"
__version__ = "1.0.0+dev"


class WSConnection:
Expand Down

0 comments on commit da3252d

Please sign in to comment.