Changelog¶
6.0.1 - 23/12/2021¶
- Added explicit support for
async_timeout
4.0.
6.0.0 - 23/12/2021¶
- Added support for NCP encrypted (TLS) connections via the
ssl
argument forconnect()
andstart_server()
. - Added support for NCP authentication via the
username
andpassword
arguments forconnect()
, and theauthenticate
argument forstart_server()
. - Breaking:
start_server()
now returns aasyncio.base_events.Server
, and thencplib.Server
class has been removed.
5.0.0 - 18/02/2021¶
- Added support for NCP connection timeout negotation, improving reliability and cleanup of NCP connections when supported by the remote.
- Added support for NCP data types
i64
,u64
,f32
,f64
,data u64
,data i64
,data f32
anddata f64
. Response.recv()
no longer requires the ID of the of NCP packet in replies.- Breaking:
auto_link
andauto_auth
arguments forconnect()
andstart_server()
removed. - Breaking:
timeout
argument forconnect()
andstart_server()
must be an integer, and can no longer be None. - Breaking: Removed
timeout
attribute fromConnection
.
4.1.1 - 14/09/2020¶
- Optimized
auto_link
background task.
4.1.0 - 07/07/2020¶
- Added
Field.packet_id
attribute. Field.send()
now includes the ID of the of NCP packet that contained the field.Response.recv()
now requires the ID of the of NCP packet in replies.
4.0.0 - 20/05/2020¶
- Breaking: Renamed
ConnectionError
toNetworkError
to avoid conflicts with stdlib. - Added timeout parameter to
connect()
,start_server()
andConnection
. This is the network timeout (in seconds). If None, no timeout is used, which can lead to deadlocks. The default timeout is 15 seconds. ANetworkTimeoutError
error will be raised if a timeout is exceeded.
3.0.0 - 24/10/2019¶
This release requires a minimum Python version of 3.7.
- Breaking: Python 3.7 is now the minimum supported Python version.
- Breaking: Removed
app
framework. - Breaking: Removed
run_client
andrun_app
. - Added
Connection.wait_closed()
to ensure that the connection is fully closed (needed since Python 3.7). - Added full PEP 484 type hints, allowing tools like mypy to be used to statically-verify ncplib programs.
2.3.3 - 27/03/2017¶
- Only applying wait_for compatibility shim to Python 3.4.2 and below.
2.3.2 - 15/03/2017¶
- Forcing cancellation of timed out connection in
run_client
in Python 3.4.2. - Added examples.
2.3.1 - 02/03/2017¶
- Using
remote_hostname
in connect errors messages generated byrun_client
. - Fixed issues with mixing coroutines and async defs.
- Fixed issues with logging connection errors in
run_client
.
2.3.0 - 02/03/2017¶
- Added
Field.connection
. - Added
app
. - Added :class`NCPError`,
ConnectionError
and :class`ConnectionClosed` exceptions. - Added
run_client
. connect()
,Connection.recv()
,Connection.recv_field()
,Response.recv()
andResponse.recv_field()
no longer raiseEOFError
orOSError
, but a subclass ofNCPError
.- Micro-optimizations, roughly doubling the performance of encode/decode.
- Connection open and close log messages promoted from
DEBUG
toINFO
level.
2.2.1 - 27/02/2017¶
- Fixed bug with Node authentication due to premature sending of LINK packets.
- Fixed edge-case bug in connection closing.
2.2.0 - 27/02/2017¶
- Added Python 3.4 support.
- Added
Connection.is_closing()
. - Added
Connection.remote_hostname
. - Added
auto_link
parameter toconnect()
,start_server()
andrun_app
. - Added
remote_hostname
parameter toconnect()
. - Connection open and close log messages demoted from
INFO
toDEBUG
level.
2.1.0 - 04/11/2016¶
- Client hostname used in
connect()
defaults to system hostname, instead of"python3-ncplib"
. - Added
hostname
parameter toconnect()
, to override default client hostname. - Removed multiplexing support for multiple
Response
over a single connection. This must now be implemented in application code. Connection
logger no longer formats the host and port in log messages. This must now be done using the standard Pythonlogging.Formatter
.
2.0.14 - 04/11/2016¶
- Added support for parsing known embedded footer bug from Axis nodes.
- Fixed pending deprecation warning for legacy
__aiter__
protocol.
2.0.13 - 21/10/2016¶
- Using
transport.is_closing()
to detect lost connection, making ncplib compatible withuvloop
.
2.0.12 - 21/10/2016¶
Connection.recv_field()
andResponse.recv_field()
now raise an exception on network error to match the behavior ofConnection.recv()
andResponse.recv()
. Previously they returnedNone
on network error, an undocumented and undesired behavior.
2.0.11 - 14/10/2016¶
- Deprecated
wait_closed()
onConnection
. It’s now a no-op, andConnection.close()
is sufficient to close the connection.
2.0.10 - 14/10/2016¶
- Fixed IPv6 handling in NCP server.
2.0.9 - 13/10/2016¶
- Handling more classes of shutdown errors.
2.0.8 - 13/10/2016¶
- Suppressing connection errors in NCP server.
2.0.7 - 13/10/2016¶
- Handling more classes of shutdown errors.
2.0.6 - 13/10/2016¶
- Handling more classes of client connection error gracefully.
- Handling shutdown of broken connections gracefully.
2.0.5 - 11/10/2016¶
- Gracefully closing client connections on authentication error.
2.0.4 - 05/09/2016¶
- Not validating packet format in incoming packets.
2.0.3 - 02/09/2016¶
- Not logging client errors and warnings, since raised exceptions/warnings will do this automatically.
2.0.2 - 01/09/2016¶
- Stripping trailing spaces from field names on decode, in addition to null bytes.
2.0.1 - 19/07/2016¶
- Added
run_app
function to NCP server.
2.0.0 - 17/03/2016¶
This release requires a minimum Python version of 3.5. This allows ncplib
to take advantage of new native support for coroutines in Python 3.5. It also provides a new start_server()
function for creating a NCP server.
A number of interfaces have been updated or removed in order to take better advantage of Python 3.5 async features, and to unify the interface between NCP client and NCP server connections. Please read the detailed release notes below for more information.
- NCP server support.
Connection
can be used as an async context manager.Connection.send()
has a cleaner API, allowing params to be specified as keyword arguments.Connection.send()
andConnection.send_packet()
return aResponse
that can be used to access replies to the original messages.Connection.recv()
,Connection.recv_field()
,Response.recv()
andResponse.recv_field()
return aField
instance, representing a NCP field.Connection
andResponse
can be used as an async iterator ofField
.Field.send()
allows direct replies to be sent to the incoming NCP field.- Breaking: Python 3.5 is now the minimum supported Python version.
- Breaking:
Connection.send()
API has changed to be single-field. UseConnection.send_packet()
to send a multi-field NCP packet. - Breaking:
Connection.execute()
has been removed. UseConnection.send().recv()
instead.
1.0.1 - 21/12/2015¶
- Automated build and release of package to private Anaconda Cloud channel.
1.0.0 - 07/12/2015¶
- First production release.