Releases: caproto/caproto
Releases · caproto/caproto
v1.1.1
What's Changed
- Python 3.12 is now supported on Linux and macOS.
- Windows is not yet supported (see #830).
- A resource leak was fixed in the pyepics compatibility layer
caget_many
whencontext
was not specified.
Pull requests
- FIX: Reuse existing context if none is specified by @smarsching in #825 (closes #824)
- FIX: Python 3.12 support by @klauer in #829
- DOC: add content to readme by @klauer in #826
- STY: fix flake8 errors by @klauer in #827
Full Changelog: v1.1.0...v1.1.1
v1.1.0
What's Changed
- Long-standing server-side subscription issues have been resolved:
- Usage of channel filters on PVs will no longer interfere with requests from other clients. For example, if one client was monitoring
PV1
with an array filter - which allows clients to look at only a portion of a larger array - by usingPV1.[1:5]
and client 2 was monitoring the entire arrayPV1
, caproto would collapse the two requests into one and send the wrong amount of data to one of the two clients. - Subscriptions will no longer be dropped due to clients quickly toggling off monitors (
EVENTS_OFF
) and toggling them back on (EVENTS_ON
). This was shown to be an issue relating to Control System Studio. Other Java-based software was also likely affected by the issue. - Messages indicating "High load" have been reduced and should only show under the appropriate circumstances. High load settings are now customizable.
- Subscription backlog for large arrays (e.g., megapixel-sized image waveforms) was previously taking an exorbitant amount of memory. Each
ChannelData
instance (PV) now has its own subscription backlog setting. caproto will now warn in those situations and attempt to reduce the backlog to fit in under that threshold. All of these settings are customizable - see the documentation page on Environment Variables for further details.
- Usage of channel filters on PVs will no longer interfere with requests from other clients. For example, if one client was monitoring
- caproto now allows for easier fine-tuning of thresholds and other parameters by way of environment variable settings. See the documentation for details.
- caproto is now tested and verified working on Python 3.11.
- Miscellaneous continuous integration fixes.
Contributors, maintainers, reviewers, or even those willing to add their thoughts in issues and PRs are still desperately needed. Please see #786 for further details.
Fix and Feature Pull Requests
- FIX: server subscriptions affecting each other by @klauer in #814
- FIX: issue 797 - subscription queue loss with eventsoff/eventson by @klauer in #817
- ENH: subscription backlog configuration and better-tuned settings by @klauer in #819
Maintenance Pull Requests
- CI: test on py311 by @klauer in #811
- CI: move azure pipelines to Ubuntu 22.04 by @klauer in #815
- CI: fix GitHub actions pypi uploading workflow by @klauer in #820
Full Changelog: v1.0.1...v1.1.0
v1.0.1
What's Changed
- FIX: Timeout ignored in pyepics_compat's caget_many by @mcnanneyd in #806
- Lakeshore example with put completion and settle_time by @gwbischof in #809
New Contributors
- @mcnanneyd made their first contribution in #806
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Breaking changes
- Python 3.8+ is now required. Python 3.6 and Python 3.7 support has been dropped.
- PVAccess support has been removed, and caproto returns to being solely an EPICS Channel Access library.
Fixes and changes of note by pull request
- REF: remove pvAccess support by @klauer in #774
- REF/ENH: server type annotations + generic support by @klauer in #796
pvproperty
andPVSpec
may now use the data class directly, instead of requiring an internal mapping of data type to class. For example,pvproperty(..., dtype=PvpropertyInteger)
is allowed alongside the existing and less explicitpvproperty(..., dtype=int)
.- Using such classes directly comes with the added benefit of type inference with your IDE's language server / static analyzer. pyright and similar should be much happier with caproto IOCs that use
pvproperty
such that linting of attributes on pvproperty instances, features as "Go to source", and code completion are now possible.
- FIX: pvproperty broken when decorating methods with docstring. by @rcardenes in #778
- ENH: provide defaults for user limits in motor record simulation by @clintonroy in #779
- FIX: Updated method
get_data_class()
in PVSpec so that type maps are correct for read only by @marrable in #784 - FIX: Use RotatingFileManager filename when restoring autosave by @mfurseman in #788
- FIX: Threading client - reconnect PV when connection is interrupted by @smarsching in #799
- FIX/MNT: cleanups and attempts at addressing windows instability by @klauer in #794
- Fixes for all Windows clients, servers, and the repeater relating to PV searches.
recvfrom
was occasionally raisingConnectionResetError
, which on Windows only means that: "... a previous send operation resulted in an ICMP Port Unreachable message." This is not fatal in caproto's case and can safely be ignored (or worked around, in the case of asyncio). https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-recvfrom - Fixed pickle/copy for ChannelData subclasses
- Fixed synchronous repeater bind address to INADDR_ANY ("0.0.0.0"). Binding to a specific interface meant that on Windows the repeater could not use its client-is-alive detection mechanism by binding to the client port as the bind would always succeed.
- Fixes for all Windows clients, servers, and the repeater relating to PV searches.
Miscellaneous / maintenance updates by pull request
- CI: add py310 and drop py36 by @tacaswell in #787
- TST: if the test runs, ignore event loop stoppage by @klauer in #795
- Fix versioneer compat with py311 by @tacaswell in #776
- CI: add codecov uploading back by @tacaswell in #766
- DOC: Update required python version in docs by @mr-kenhoff in #801
- ENH: spoof-beamline example: fabricate channels for FileNumber and Compression by @jklynch in #790
New Contributors
- @rcardenes made their first contribution in #778
- @marrable made their first contribution in #784
- @mfurseman made their first contribution in #788
- @smarsching made their first contribution in #799
- @mr-kenhoff made their first contribution in #801
Full Changelog: v0.8.1...v1.0.0
v0.8.1: Merge pull request #772 from klauer/rel_v081_part_deux
Fixed
- pyepics compatibility layer should no longer leak a byte string value through for DBR_STRING PV instances. (#710, #763)
Added
- Added support for raw EPICS timestamps in ChannelData instances, allowing for lossless representation and transmission of facility-specific beam fiducials, pulse IDs, and such. This feature is not intended to replace the current usage of POSIX (time.time()) timestamps, but rather extend what is considered to be acceptable input. (#770, #771)
v0.8.0
Fixed
- pyepics compatibility layer
char_value
andenum_strs
handling withPV
instances andcaget_many
should now behave better. (#732) - Windows compatibility has been improved, especially with respect to the more recent ProactorEventLoop (#720, #707)
- The environment variable
CAPROTO_DEFAULT_TIMEOUT
is no longer erroneously interpreted as a string. All clients should now mostly respect this value. (#727) - Previously only either
scan
orstartup
hooks were allowed per-pvproperty
. Both may be used simultaneously now. (#729) - Threading client
SharedBroadcaster
should no longer attempt re-registration after it is disconnected. (#732) - RecordFieldGroup subclasses may now customize common fields without intefering with other classes. (#736)
- Supports the numpy array interface to remove a significant
O(n)
bottleneck when pre-processing numpy arrays forChannelByte
instances. To avoid an additional copy on immutable data, setvalue.flags.writeable
toFalse
when using compatible numpy arrays. (#731) safe_getsockname
was stashing references to sockets and not allowing them to be garbage collected. (#739)data_type
values are now validated againstChannelType
when used in commands. (#742)- Raise
RemoteProtocolError
with more user-friendly messages when invalid packets or those with invalid command IDs are received. (#743) - Synchronous client search erroneously used the same search ID for multiple requests. (#754)
Added
- An example indicating how to analyze IOCs response times for channel creation was added in #725.
- A
value_write_hook
is now supported when updating a value in records. This means that if the user updates.VAL
, other fields will have the chance to update their state. (#734) - Added preliminary support of the
raw_value
(.RVAL
) field for bi, bo, mbbi, and mbbo records. (#734) - Added
sleep
to AsyncLibraryLayer. (#739) - Added
startup_hook
tocaproto.server.run()
(with support in asyncio, curio, trio). By convention, consider using__ainit__
for this hook. (#739) - Added
monitor
helper to the asyncio client. (#739) - Now using GitHub actions for automated testing on Windows and macOS, with fixed documentation building and releasing to PyPI. This was defunct since Travis CI changed its payment model. (#749, #754)
Changed
- The
mock_record=
keyword argument forpvproperty
, deprecated in v0.5.0, has been removed. Please change any remaining references torecord=
when upgrading to v0.8.0. - Efforts have been made to allow
PVSpec
to be used in a standalone fashion - i.e., withoutpvproperty
. See theno_pvproperty
IOC example (ioc_examples/advanced
) for further details. - asyncio-based transports have mostly been removed in favor of using a higher-level API provided by asyncio. This should allow for more precise and informative exception tracebacks. This is now used for all asyncio servers and clients supported by caproto. (#720)
- The method for generating record field
PVGroup
classes has been changed to better split auto-generated code with user-customizable field-handling code. (#734) - Improved hook method signature checker to include source code filename, line number, and suggested signature. (#736)
- Reworked IOC documentation and corresponding examples.
- Old and bad form example
all_in_one
moved to testing area. - Old and bad form example
inline_style
moved to testing area. - Example using ChannelData
type_varieties
moved to "advanced" - On-class-definition validation of
PvpropertyData
keyword arguments was removed to reduce complexity.CaprotoRuntimeError
will be raised on instantiation for pvproperties with bad keyword arguments, indicating the cause and fullPVSpec
information. (#741) - Warning messages when old CA clients are detected have been removed. The reasoning behind the message was likely flawed and will require further investigation. In the meantime, this will reduce log spam. (#757, #761)
v0.7.1: Merge pull request #700 from klauer/rel_v071
Fixed
- For
pvproperty
, avoid multiple passes of macro expansion, such that
{{
is sufficient to escape an opening curly bracket. - The server implementation will now catch when
socket.recv
raisesOSError
. - Broken entrypoints have been fixed for the pathological examples,
defaultdict_server
andspoof_beamline
.
Added
- Show default values for optional macro substitution for IOCs using the
template parser.
Changed
- Travis CI configuration has been removed from the repository.
v0.7.0
Fixed
- Eliminate memory leak on run-longing servers were we remembered every search request we saw but did not service
WaitForPlugins
and additional PVs for compatibility were added in the fancyspoof_beamline
example.- Many more libraries are now entirely optional in the test suite.
get_pv_pair_wrapper
now supports keyword arguments to the generatedpvproperty
instances.
Added
- Added documentation notes on multi-tenant soft IOCs.
- Added helper tools for easily auto-generating
PVGroup
-based IOC documentation with sphinx-autosummary. - A fake motor record IOC example, with the most common fields implemented.
- Added iocStats-like helpers for caproto-based IOCs, which include CPU/memory usage information, tools for finding memory leaks, and so on.
- Add support for
-#
arguments incaproto-get
andcaproto-monitor
command-line tools. IntEnum
values are now supported forpvproperty
, simplifying declarations of enum PVs.- Added preliminary pvAccess support, including examples and documentation.
- Added a shared memory IOC example.
- Added a gamepad IOC example.
- Added an IOC which generates PVs based on a formula string.
- Added an escape hatch for pvproperty putters to skip further processing, the
SkipWrite
exception.
Changed
- The search related API was removed from :class:
ca.Broadcaster
, all of the search request accounting is handled in the client code. The code that is used on the servers can not do this book keeping because we can not know what other servers are out there and if the SearchRequest actually got serviced (as that goes back uni-cast). - Removed curio and trio client implementations. These may reappear in the future, based on the new asyncio client.
- Removed unused dependency
asks
, which was part of the full installation. - Documentation is now versioned on GitHub pages thanks to doctr-versions-menu.
- Automated benchmarking code which was previously part of the test suite, has been removed.
- Unmaintained prototype-level clients based on
trio
andcurio
have been removed. The full-featuredasyncio
client from v0.6.0 is the suggested migration path. - IOC examples have been reorganized.
- Updated continuous integration to use conda-forge epics-base.
v0.6.0
Fixed
- Fixed server PVGroup logger names. It was erroneously using the exact string '{base}.{log_name}', and now will be correctly expanded to be based on either the module name or the parent PVGroup's logger name.
- Fields defined in the
caproto.server.records.RecordFieldGroup
may now be customized using, for example,@prop.fields.process_record.putter
. caproto.ChannelByte
andcaproto.ChannelChar
withmax_length=1
now accept scalar integer values, whereas they were previously failing due to expecting byte strings (or strings). This arose primarily in the case of record fields which attempt to reflect the actual data types found in epics-base.
Added
- Added a new (experimental) asyncio client with features comparable to the threading client.
- Allow
caproto.server.SubGroup
instances to accept keyword arguments. - Added autosave-like tools and an example.
- Now using
doctr-versions-menu
for documentation.
Changed
- Significantly refactored task handling in the asyncio server. This improves the performance of write request handling and overall task cleanup.
- Some asyncio server utilities were relocated such that the server and new client can both utilize them.
- Accessing a
caproto.server.pvproperty
directly from thecaproto.server.PVGroup
class will no longer return acaproto.server.PVSpec
instance, but thecaproto.server.pvproperty
itself.