Version History¶
v2.0.2¶
Fix the conda recipe.
v2.0.1¶
Update the version of ts-conda-build to 0.4 in the conda recipe.
v2.0.0¶
BaseClientOrServer
: Removereader
andwriter
properties.OneClientServer
: Removeserver
property.Drop support for synchronous connect_callback.
v1.2.0¶
Client
: new feature: specifyhost=""
to create a client that is already closed.BaseClientOrServer
: add ado_start
constructor argument, which defaults toTrue
.
v1.1.3¶
Jenkinsfile
: use the shared library.
v1.1.2¶
BaseClientOrServer
: improve the exception raised by read_json for invalid data, so that the messagse includes the invalid data.
v1.1.1¶
Fix backwards compatibility issues with version 1.0:
Client
: allow non-keyword constructor arguments.OneClientServer
: allow non-keyword constructor arguments and remove the (new in v1.1.0) default value for thehost
argument. Note thatOneClientReadLoopServer
is unchanged: the constructor arguments are keyword-only andhost
has a default value.
v1.1.0¶
Deprecation warning: do not access the
reader
,writer
, or (in the case ofOneClientServer
)server
attributes. Use the provided read and write methods, instead, and letOneClientServer
manage its asyncio server.Add
OneClientReadLoopServer
: an abstract subclass ofOneClientServer
that includes a read loop.BaseClientOrServer
: addread_str
,write_str
,read_json
andwrite_json
methods.BaseClientOrServer
and subclasses:This also applies to the
Client
andOneClientServer
subclasses.Add optional
encoding
andterminator
constructor arguments.Make constructor arguments keyword-only.
Add
BaseOneClientServerTestCase
: a base clase for unit tests ofOneClientServer
and subclasses.Add new constants:
DEFAULT_LOCALHOST
, the same as deprecatedLOCAL_HOST
DEFAULT_TERMINATOR
, the same as deprecatedTERMINATOR
.DEFAULT_ENCODING
.
-
Make constructor arguments keyword-only.
Fix setting
done_task
done.
OneClientServer
and subclasses:Make constructor arguments keyword-only.
Provide a default for the
host
constructor argument:DEFAULT_LOCALHOST
.Fix setting
done_task
done.
Improve class documentation.
Use ts_pre_commit_conf.
Remove scons support.
v1.0.1¶
pre-commit: update black to 23.1.0, isort to 5.12.0, mypy to 1.0.0, and pre-commit-hooks to v4.4.0.
Jenkinsfile
: do not run as root.
v1.0.0¶
Deprecation warning: the
connect_callback
OneClientServer
constructor argument should now be asynchronous.Add
Client
class: a TCP/IP client modeled onOneClientServer
.Add constants
LOCALHOST_IPV4
andLOCALHOST_IPV6
and deprecated constantLOCAL_HOST
.Modify
OneClientServer
:The
connect_callback
function may now be asynchronous, and synchronous functions are deprecated.Add read and write methods that check if a client is connected.
Add optional
monitor_connection_interval
constructor argument. The default value matches the current behavior, but you can now specify 0 to disable monitoring.Replace optional
family
constructor argument with**kwargs
, adding flexibility.Make the
name
constructor argument optional.Wait for the asyncio server to close in
OneClientServer.close
.
read_into
bug fix: read exactly the correct number of bytes, instead of up to the desired number.Change
ConnectionResetError
toConnectionError
everywhere. This catches a few extra conditions and is shorter.Expand some unit tests to test IPV6, if supported, else skip that sub test.
v0.4.4¶
Modernize conda/meta.yaml.
v0.4.3¶
Run isort.
Add isort and mypy to pre-commit and update other pre-commit tasks.
v0.4.2¶
Fix unit tests to wait for
OneClientServer
s connect_task after making a client connection.OneClientServer
: test multiple simultaneous connection attempts.Modernize unit tests to use bare assert.
v0.4.1¶
Add a timeout to
close_stream_writer
in hopes of avoiding an intermittent hang (a bug in Python).Build with pyproject.toml.
v0.4.0¶
Remove dependency on ts_utils.
Modernize the continuous integration
Jenkinsfile
.doc/conf.py: tweak to make linters happier.
git ignore .hypothesis.
setup.cfg
: specify asyncio_mode = auto.
v0.3.8¶
Fix the conda build.
Requirements:
ts_utils
v0.3.7¶
-
Monitor for a dropped client connection. Close the client and call connect_callback if detected.
Fix a bug whereby accepting a new connection may not call the
connect_callback
(DM-34694).
Fix documentation that falsely claimed you must read from an
asyncio.StreamReader
in order to detect if the other end drops the connection.
v0.3.6¶
write_from
: eliminate a race condition that allows tasks to interleave data.
v0.3.5¶
Fix a new mypy error by not checking DM’s
lsst/__init__.py
files.
v0.3.4¶
Enhance the User Guide:
Add a section on monitoring the stream reader when no data is expected.
Fix
catch
->except
in examples.
v0.3.3¶
Fix cleanup in a unit test file.
Add
Jenkinsfile
.
v0.3.2¶
Prevent pytest from checking the generated
version.py
file. This is necessary in order to preventmypy
from checking that file.
v0.3.1¶
Configure pytest to run mypy.
v0.3.0¶
The conda package now gets built for noarch so it is usable on all platforms.
v0.2.0¶
OneClientServer:
Change
port
to remain 0 if the user specifies port=0 and the server listens on more than one socket. This avoids ambiguity.Add
family
constructor argument to support IPv6.Rename the
connect_callback
attribute to__connect_callback
to make it easier to inherit fromOneClientServer
.
v0.1.0¶
First release.