This changelog is used to track all major changes to WTFIX.
Enhancements
- Switch from using coveralls.io to codecov.io
- Add support for SSL connections and toggling of SSL validation (thanks @nielsdraaisma).
Fixes
- Fix link to sponsor logo on PyPI.
Enhancements
- Update license notice.
- Include Python 3.9 in continuous integration runs.
- Update pre-commit hooks and run on all files.
- Update README with sponsor / support information.
- Switch from Travis-CI to GitHub Actions.
Enhancements
- FIX protocol specification: look up class attributes in parent classes as well. This allows new FIX protocol specifications, which can include custom tags and message types, to be derived from a standard base protocol definition.
- Stop processing messages as soon as an unhandled exception occurs. This ensures that all apps have the same state up until the point at which the exception was raised.
- The pipeline will now not process any messages for apps that have already been shut down.
BasePipeline.stop()
now accepts an optional keyword argument that can be used to pass the exception that caused the pipeline to be stopped. This makes it possible to distinguish between normal and abnormal pipeline shutdowns so that OS exit codes can be set properly by the calling process.
Fixes
- Remove tag numbers >= 956 from the standard FIX 4.4 protocol definition. These all fall within the customer-defined number range and do not form part of the official standard.
- Remove non-standard message types from the FIX 4.4. protocol definition.
- Don't re-raise exceptions in asyncio tasks that trigger a pipeline shutdown. This prevents the application's
stop()
method from being interrupted before it has been fully processed.
Fixes
- Avoid
AttributeError
when aConnectionError
occurs in theclient_session
app. - Refactor task cancellation: client should take responsibility for final task cancellation / cleanup instead of the pipeline. This ensures that the client itself is not also cancelled as part of a pipeline shutdown.
- Only call
super().stop()
after an app has completed all of its own shutdown routines. - Don't allow misbehaving apps from interrupting a pipeline shutdown. This ensures that the pipeline can always be shut down, and all outstanding asyncio tasks cancelled, even if one or more apps raise and exceptions while stopping.
Fixes
client_session
: Don't wait forwriter
to close when shutting down in order to avoid hangs due to network errors.- Use the recommended
asyncio.create_task
to create new Tasks, which is preferred toasyncio.ensure_future
. - Fix issue that caused the
client_session
listener task to hang during shutdown.
Fixes
- Fix cancellation of various
asyncio
tasks causing the pipeline to hang during shutdown.
Enhancements
- Refactor graceful shutdown of pipeline to cancel all tasks in parallel and log all exceptions.
- Update exception handling routines to reference the standard asyncio exceptions that were moved to the new
asyncio.exceptions
package in Python 3.8. - Now requires Python >= 3.8.
- BREAKING CONFIG CHANGES (please update your
.env
and settings files inwtfix.config.settings
):- Rename
REDIS_URI
config parameter toREDIS_WTFIX_URI
so that WTFIX can be incorporated into existing applications without affecting their configuration settings.
- Rename
Fixes
SeqNumManagerApp
: wait until a buffered Message has been completely processed before submitting the next one.RedisPubSubApp
: Release Redis connection before attempting to close the Redis pool.
Enhancements
- Relax dependency version requirements in setup.py.
- Update dependencies to latest major versions.
Fixes
- Re-raise all exceptions that cause the pipeline to terminate abnormally so that they can be reported and dealt with at the operating system level. Useful if pipeline is being monitored by something like supervisord.
Fixes
- Set logging level of 'wtfix' logger to
LOGGING_LEVEL
when it is first requested. - Fix bug in
_replay_buffered_messages
that prevented buffered messages from being received.
Enhancements
- Fix Python 3.8 compatibility issues.
- Switch to using a context manager for managing the active FIX connection / protocol.
Enhancements
-
BREAKING CONFIG CHANGES (please update your settings files in
wtfix.config.settings
):- The MESSAGE_STORE parameters now form part of the CONNECTION section. This allows individual message stores to be configured when multiple connections need to be run simultaneously.
- Add configuration option for specifying which JSON encoder / decoder to use when adding messages to a message store.
- The FIX protocol and version can now be configured for individual CONNECTIONS. This lays the foundation for supporting various different protocols and versions in the future. FIX 4.4 is currently the default.
-
Add
PipelineTerminationApp
and usedel
to encourage the Python interpreter to garbage collect a message once it has reached either end of the pipeline. -
Upgrade aioredis dependency to version 1.3
-
Remove dependency on unsync which has become largely redundant with the new async features released as part of Python 3.7.
-
Now requires Python >= 3.7.
Fixes
- Update dependencies to latest versions.
- Change
RedisPubSubApp
to allow subclasses to override the Redis sending channel name viaRedisPubSubApp.SEND_CHANNEL
Fixes
- Fixed encoding of
PossDupFlag
inEncoderApp
. - Fixed setting of
OrigSendingTime
tag for messages that are resent.
Fixes
ClientSessionApp
: handleNoneType
error when shutting down.
Fixes
- Prevent a pipeline shutdown from being triggered multiple times.
- Less verbose logging of connection errors that occur during shutdown / logout.
Enhancements
- Repeating group templates can now be configured on a per-message-type basis.
Enhancements
- Make username and password optional for Logon messages.
- Fixed an issue that caused only one Heartbeat timer to be used for both sending and receiving messages.
- Collections of FIXMessages can now be sorted by their sequence numbers.
Fixes
- Set
SendingTime
before message is added to the message store (Fixes #2). - Enforce serial processing: wait until a message has been propagated through the entire pipeline before receiving the next message.
Enhancements
- Automatically start a new session if no relevant .sid file can be found.
- Heartbeat monitor now proactively sends heartbeats as well, in compliance with the FIX protocol specification.
- Pipeline now shuts down gracefully on SIGTERM and SIGINT signals in addition to CTRL+C.
Fixes
- Fix path to .sid files.
Enhancements
- Added RedisPubSubApp for sending / receiving messages using the redis Pub/Sub messaging paradigm.
- Various performance optimizations.
Fixes
- Add missing dependencies to setup.py.
Enhancements
- FIX sessions are now resumed between different connections by default. Pass parameter
-new_session
when calling the pipeline in order to reset sequence numbers and initialize a new session. - Rename 'sessions' to 'connections' to align with FIX protocol terminology.
- Gap fill processing is now more reliable, and will queue messages that are received out of order until the gaps have been filled.
- Set exit codes on pipeline termination so that caller can take appropriate action.
- Add
MessageStoreApp
, with default implementations for in-memory and redis-based stores for caching and / or persisting messages to database. - Convert all
on_send
andon_receive
handlers to async and await. - Messages are now sent in separate Tasks to avoid holding up the main event loop.
- AuthenticationApp now blocks all incoming and outgoing messages until authentication has been completed.
Enhancements
- Add support for deleting a Field from a FieldMap by its tag name. E.g.
del message.PossDupFlag
. - Add pre-commit hooks for checking code style and quality.
- Fix PEP8 code style violations reported by flake8.
- Update code quality dependencies (flake, black, etc.).
Enhancements
- Refactor
FieldSet
to better emulate the Python built-it container types. - Rename
FieldSet
toFieldMap
,ListFieldSet
toFieldList
, andOrderedDictFieldSet
toFieldDict
. Deprecate and remove old classes. - Implement all of the
MutableSequence
abstract base class methods forField
. - Operations can now be performed directly between
Field.value
and Python's built-in literals (e.g.Field(1, "abc") + "def"
will returnField(1, "abcdef")
). - Replace
as_str
,as_bool
, andas_int
with Python special methods to allow more natural casting usingstr()
,bool()
, andint()
. Add newfloat()
method for castingField
s to float. - Deprecate and remove
FieldValue
class. - Field ordering is no longer significant when comparing
FieldMap
s with otherSequence
s. - Replace
raw
property for convertingField
s andFieldMap
s to a byte sequence withbytes()
. - Add
frombytes()
andfields_frombytes()
methods toField
for creating newField
instances from byte sequences. - Optimize memory usage of
Field
s by adding a__slots__
attribute. - Make
Field
instances hashable by implementing__hash__
and__eq__
. - Add
__format__
implementation toField
, with a customt
option, for printing fields with their tag names. - Convert the FIX representation of 'null' (
"-2147483648"
) toNone
when constructing aField
for more natural usage in Python. - Now Encodes boolean Field values to "Y/N".
- Remove
Message.get_group()
andMessage.set_group()
in favor of handling group fields like any other Field in the message. - Remove deprecated
InvalidGroup
exception.
Enhancements
- JSON encode / decode directly to and form FIXMessage instead of FieldSet.
Enhancements
- Split logging app into separate inbound and outbound processors so that the respective loggers can be injected in different parts of the pipeline.
- Add JSON encoder / decoder for FieldSets - allows messages to be JSON encoded.
Fixes
- Fix WSGI callable to use
session_name
parameter correctly.
Enhancements
- Move
wsgi.py
to globalconfig
package. - Add gunicorn support for running WTFIX and Flask in production environments.
- Add guidelines for doing production deployments.
- Provide
JsonResultResponse
structure for wrapping REST API responses.
Fixes
- Fix WSGI callable to use
session_name
parameter correctly.
Enhancements
- Add support for configuring multiple FIX sessions using the
SESSIONS
config parameter. - Different pipeline connections can now be initiated by using the
--sessions
command line parameter withrun_client.py
. - New
LoggingApp
for logging of inbound and outbound messages. - New
RESTfulServiceApp
for sending messages via a REST API.
Fixes
- Don't raise an exception if a heartbeat message (0) is received unexpectedly.
- Fix test build dependencies.
- Add missing aiofiles dependency.
- Link repository to coveralls.io and Travis-CI
- Update README with various GitHub badges.
- First public alpha release.
- Now implements all standard admin messages.
- Update README
- Pre-alpha internal testing release.
- Pre-alpha internal testing release.
- Pre-alpha internal testing release.