This module contains Python bindings for Channel Access using lightweight Python threads
A git repository containing work in progress for cothread can be cloned by running the command:
git clone http://controls.diamond.ac.uk/downloads/python/cothread/cothread.git
Note that cothread will work to some extent on 32-bit windows, but the extension libraries need to be built with mingw32 using the command
python setup.py build_ext -i --compiler=mingw32
Python 3 is now supported by cothread: either check out the python3 branch from the repository or apply the appropriate 2to3 patch from the release.
|2-13||cothread-2-13.tgz, Python 3 patch: cothread-2-13-2to3.patch||index|
|2-12||cothread-2-12.tgz, Python 3 patch: cothread-2-12-2to3.patch||index|
|2-11a||cothread-2-11a.tgz, Python 3 patch: cothread-2-11a-2to3.patch||index|
|2-11-beta||cothread-2-11-beta.tgz, Python 3 patch: cothread-2-11-beta-2to3.patch||index|
|2-8||cothread-2-8.tgz, Python 3 patch: cothread-2-8-2to3.patch||index|
|2-7||cothread-2-7.tgz, Python 3 patch: cothread-2-7-2to3.patch||index|
|2-6||cothread-2-6.tgz, Python 3 patch: cothread-2-6-2to3.patch||index|
- Quite a bit of tidying up of the PV class API and its behaviour. Some of the changes may introduce some backward incompatibility, so take care. The PV API is now stabilising.
- Fix a bug in coroutine switching on ARM with Vector Floating Point (VFP) support.
- Now available on PyPi!
- Add new CallbackResult method to help with using cothread with multiple threads.
- Substantial enhancements to socket server support to ensure that the built-in Python socket server libraries work seamlessly with cothread.
- Fixes bug in DBR_CHAR_STR and DBR_CHAR_UNICODE conversion introduced by a refactoring error in 2-11-beta. Note, there is a 2-11 release tag in git, but it doesn't include this fix.
- Small changes to PV_array class.
- Rework mechanism for locating libca library, including override mechanism suggested by Lingyun Yang and removing reliance on environment variables when identifying the architecture.
- Miscellaneous small changes: ca_arrays are now unhashable, pvtree knows about aSub, etc.
- Add Valgrind annotations to coroutine switching code. You can now get sensible results when running cothread with Valgrind.
- Add new Pulse event object for pthread style event notification.
- Manage lifetimes of subscriptions more carefully. Ensure that camonitor subscriptions are closed even if the connection never fully completed, but ensure we don't close the subscription *too* soon to work around an EPICS synchronisation bug.
- Add connection timeout to camonitor to notify if connection never completes.
- Revisit handling of int request on 64-bit platforms. For practical reasons this is now treated as a 32-bit request even when a 64-bit value appears to be being requested ... because we have no choice.
- Add new PV and PV_array classes. These are still somewhat experimental, so expect API changes in the future.
- Make returned data shape depend on length of underlying source. This can result in an incompatible change: the result from caget(pv,count=1) is now scalar or vector depending on the shape of the original pv.
- Add new datatype option DBR_ENUM_STR to fetch enums as strings but other types as their default types.
- Fix mostly trivial bug in disconnect handling.
- Fix regression on handling of strings in calls to caput(): now let the IOC do the string conversion if no datatype specified, this allows enumerations to be written as strings.
- Implement Python 3 support. This is currently maintained as a separate branch in the git repository which is repeatedly rebased onto the main Python 2 development branch.
- Use asynchronous Channel Access notification. This reduces the risk of losing channel access events and increases the carrying capacity of channel access. Note that camonitor callbacks are still delivered synchronously to users.
- Fix Qt4 readline hook bug.
- Fix OSX compatibility, broken in earler release.
- Fix bug in EPICS epoch correction.
- Add datetime property to values where appropriate.
- Add support for explicit Unicode support in catools, and correspondingly, add support for bytes in Python 3.
- Improve default event mask for camonitor.
- Floating point state is now maintained per cothread.
- Support for Qt version 3 dropped. Do let me know if this is a problem, but dropping this allows things to be considerably simplified.
- iqt() no longer has a use_timer option, the default behaviour is now the only supported behaviour. This incompatible change should cause no observable impact, but do let me know if it does.
- Cothread can now be used in the presence of an existing Qt event loop by calling iqt(run_exec=False). This allows, for example, plugins for Qt designer to use cothread.
- Fix implementation of Timer.reset
- Documentation rewritten using Sphinx
- Semantics of expired timeouts changed to avoid starvation
- Timer .reset() method implemented
- Cothread compatible socket wrapper implemented.
- Eliminate greenlet dependency
- Many other internal changes.
- Latest release