Tm-devices

Latest version: v3.1.2

Safety actively analyzes 707268 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 9

3.1.2

Merged Pull Requests

- feat: Enable turning down the verbosity of failure messages during reboot of a VISA device ([381](https://github.com/tektronix/tm_devices/pull/381))
- gh-actions(deps): bump tektronix/python-package-ci-cd ([378](https://github.com/tektronix/tm_devices/pull/378))

Added

- Added a new parameter to the `create_visa_connection()` function which can be used to turn down the verbosity of the printouts to stdout during a reboot from `ERROR` to `DEBUG` to avoid cluttering the console with unnecessary failures while the device is still rebooting.

---

3.1.1

Merged Pull Requests

- feat: Added support for a new custom version string format, `"1.2.3-custom.1234+abcdefghi"` ([376](https://github.com/tektronix/tm_devices/pull/376))

Added

- Updated the `get_version()` function to support more custom version string formats, e.g. `"1.2.3-custom.1234+abcdefghi"`.

---

3.1.0

Merged Pull Requests

- refactor: Separate out the custom handling of different devices' software/firmware version parsing ([373](https://github.com/tektronix/tm_devices/pull/373))
- fix: Remove unused commands files ([371](https://github.com/tektronix/tm_devices/pull/371))
- feat: Improved VISA device error messages ([370](https://github.com/tektronix/tm_devices/pull/370))

Removed

- Removed the `traceback-with-variables` package as a dependency. If users would like to maintain the functionality, they will need to install this package separately and activate it within their code.

Added

- Added a new configuration option `log_uncaught_exceptions` to enable/disable logging uncaught exceptions in the log file that is created. The default behavior is to enable logging uncaught exceptions to the log file.

Changed

- Updated the error messages when VISA connections fail so that the messages are more informative (they now include the device type, resource expression, and VISA backend) and are logged to the main log file.
- Updated the error messages which occur when VISA communication fails (write/query) to be more concise on the console while still maintaining the verbosity needed for debugging in the log file.
- Updated the VISA communication error messages to include the device name and alias for faster identification when debugging.

---

3.0.0

Merged Pull Requests

- feat: added fast acq support for the mso2 model. ([368](https://github.com/tektronix/tm_devices/pull/368))
- python-deps(deps-dev): update ruff requirement from 0.8.4 to 0.8.6 in the python-dependencies group ([366](https://github.com/tektronix/tm_devices/pull/366))
- gh-actions(deps): bump tektronix/python-package-ci-cd ([346](https://github.com/tektronix/tm_devices/pull/346))
- fix: updated get_buffers() with logic to handle empty buffer ([364](https://github.com/tektronix/tm_devices/pull/364))
- python-deps(deps-dev): bump the python-dependencies group with 2 updates ([347](https://github.com/tektronix/tm_devices/pull/347))
- fix: allow empty returns from tsp_device.get_buffers() ([362](https://github.com/tektronix/tm_devices/pull/362))
- python-deps(deps-dev): update ruff requirement from 0.8.2 to 0.8.3 in the python-dependencies group ([361](https://github.com/tektronix/tm_devices/pull/361))
- docs: Remove section of contribution guide that duplicates a later section ([358](https://github.com/tektronix/tm_devices/pull/358))
- python-deps(deps-dev): update ruff requirement from 0.7.4 to 0.8.0 in the python-dependencies group ([355](https://github.com/tektronix/tm_devices/pull/355))
- fix: Fix the documentation to not show the mermaid tooltip clipping at the top of each page with an inheritance diagram ([354](https://github.com/tektronix/tm_devices/pull/354))
- chore: Remove unused env var from .readthedocs.yml ([353](https://github.com/tektronix/tm_devices/pull/353))
- Enable pawamoy insiders docs features ([352](https://github.com/tektronix/tm_devices/pull/352))
- feat: Added Full python API support for MDO3 model. ([349](https://github.com/tektronix/tm_devices/pull/349))
- python-deps(deps-dev): update ruff requirement from 0.7.3 to 0.7.4 in the python-dependencies group ([351](https://github.com/tektronix/tm_devices/pull/351))
- Use logging module instead of prints ([345](https://github.com/tektronix/tm_devices/pull/345))
- chore: Update pyright dependency and use more reliable method of installing local nodejs for it ([344](https://github.com/tektronix/tm_devices/pull/344))
- python-deps(deps-dev): update ruff requirement from 0.7.1 to 0.7.2 in the python-dependencies group ([343](https://github.com/tektronix/tm_devices/pull/343))
- Add screen capture functionality for TekScope device driver family ([342](https://github.com/tektronix/tm_devices/pull/342))
- Refactor the internal package structure and change how driver classes inherit functionality ([333](https://github.com/tektronix/tm_devices/pull/333))
- python-deps(deps): bump the python-dependencies group with 3 updates ([341](https://github.com/tektronix/tm_devices/pull/341))

Added

- Added a new mixin, `ScreenCaptureMixin`, that defines methods/properties used for capturing screenshots from devices.
- Added screen capture capabilities to the `TekScope` family of device drivers.
- Testing/linting on Python 3.13.
- Added the `get_errors()` method to the `Device` class to enable easy access to the current error code and messages on any device.
- Added more details to the Architectural Overview page of the documentation as well as highlighting to the device driver diagram on the page.
- Added regex matching to the `verify_values()` helper function to allow for more flexible value verification.
- A main logfile is now created by default (can be disabled if desired) that contains all the logging output of the entire tm_devices package during execution.
- Use the `configure_logging()` function to set the logging levels for stdout and file logging.
- The default settings will log all messages to the log file and maintain the current printout functionality on stdout.
- A logfile is now created that contains each command sent to a VISA device.
- This file is located next to the main log file and will start with the same name, but have the unique address of the device appended.
- This file will only be created if file logging is enabled for the package (which is the default behavior).
- Full Python API support for the MDO3 model.
- Added fast acquisition command support for the MSO2 model.

Changed

NOTE: Despite all the officially breaking changes, the actual drivers were only affected in
very minor ways. The primary impact to the drivers was simply the removal of previously
deprecated functionality. Almost all changes only impacted the internal workings of `tm_devices`.
However, please read through all changes to be aware of what may potentially impact your code.

- _**<span style="color:orange">minor breaking change</span>**_: Moved `SignalGenerator` class to the `driver_mixins` submodule and renamed it to `_TektronixPIAFGAWGMixin` (also made it a private mixin).
- _**<span style="color:orange">minor breaking change</span>**_: Renamed the `PIDevice`, `TSPDevice`, and `RESTAPIDevice` classes to `PIControl`, `TSPControl`, and `RESTAPIControl` respectively.
- _**<span style="color:orange">minor breaking change</span>**_: Moved the `PIControl`, `TSPControl`, and `RESTAPIControl` classes into a mixin folder so that they can be used as mixins rather than being part of the required inheritance structure.
- In order to use these control mixins, they must be inherited at the family base class level in the driver hierarchy, along with the device type class (or any class that inherits from the base `Device` class and defines a `device_type` property and the other required abstract property implementations).
- Due to this change, it is recommended that the specific device driver (or at least the family base class) for the device being controlled is used for type hinting.
- _**<span style="color:orange">minor breaking change</span>**_: Moved all device type subpackages (AWGs, AFGs, Scopes, SMUs, etc.) up to the top level of the `drivers` subpackage.
- _**<span style="color:orange">minor breaking change</span>**_: Converted all family base classes to inherit from the device control mixins.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Renamed the `get_eventlog_status()` method to `_get_errors()` and made it a required, abstract method for all devices to implement.
- To get similar functionality to the previous `get_eventlog_status()` method, switch to using the new `get_errors()` method.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Changed the behavior of the `expect_esr()` method to expect an integer error code input and an optional tuple of error messages to compare against the actual error code and messages returned by the `_get_errors()` private method.
- _**<span style="color:orange">minor breaking change</span>**_: Converted the `device_type` property into an abstract, cached property to force all children of the `Device` class to specify what type of device they are.
- Updated the auto-generated command mixin classes to no longer use an `__init__()` method to enable the driver API documentation to render in a more usable way.
- Switched from using standard `print()` calls to using the `logging` module for all logging in the `tm_devices` package.
- A configuration function provides the ability to set different logging levels for stdout and file logging.
- The config file and environment variable can also be used to control the logging functionality.
- The debug logging from the `pyvisa` package is also included in the log file by default.
- Updated `get_buffers()` in `TSPControl` to not error out if the buffer is found to be empty.

Removed

- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed previously deprecated `TekScopeSW` alias to the `TekScopePC` class.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed previously deprecated `write_buffers()` from the `TSPControl` class.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed Internal AFG methods from the `TekScopePC` driver, since they wouldn't have worked due to its lack of an IAFG.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed previously deprecated `DEVICE_DRIVER_MODEL_MAPPING` constant.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed the `DEVICE_TYPE_CLASSES` constant and the `device_type_classes.py` module.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed many hacky implementations of `total_channels` and `all_channel_names_list` properties from drivers that don't need them anymore.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed the `verify_values()`, `raise_failure()`, and `raise_error()` methods from all device drivers.
- These methods have been converted to helper functions and can be imported from the `tm_devices.helpers` subpackage now.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed the `print_with_timestamp()` function since this functionality is now handled by the `logging` module.
- _**<span style="color:red">BREAKING CHANGE</span>**_: Removed the `get_timestamp_string()` function since this functionality is now handled by the `logging` module.

---

2.5.0

Merged Pull Requests

- TekScope2K - turn on HEADER and VERBOSE options to query available data sources correctly ([327](https://github.com/tektronix/tm_devices/pull/327))
- fix: line fix ([339](https://github.com/tektronix/tm_devices/pull/339))
- ci: Skip updating the mdformat repo during the dependency updater workflow ([335](https://github.com/tektronix/tm_devices/pull/335))
- gh-actions(deps): bump tektronix/python-package-ci-cd ([320](https://github.com/tektronix/tm_devices/pull/320))
- TSP environment cleanup ([328](https://github.com/tektronix/tm_devices/pull/328))
- feat: Added USB support for AFG31K and MDO3 models ([331](https://github.com/tektronix/tm_devices/pull/331))
- ci: Remove pre-commit hook that no longer works on Python 3.8 and replace with one that does ([323](https://github.com/tektronix/tm_devices/pull/323))
- python-deps(deps-dev): bump the python-dependencies group with 2 updates ([311](https://github.com/tektronix/tm_devices/pull/311))
- python-deps(deps): bump the python-dependencies group with 3 updates ([318](https://github.com/tektronix/tm_devices/pull/318))
- test: Ignore googletagmanager links during doctests ([312](https://github.com/tektronix/tm_devices/pull/312))
- ci: Enable testing for Python 3.13 ([309](https://github.com/tektronix/tm_devices/pull/309))

Fixed

- fix: TekScope2K active channel query needs HEADER options enabled to function properly

Added

- `collectgarbage()` is now called during cleanup of `TSPControl` children.
- Added USBTMC Support for the AFG31K and MDO3 drivers.

---

2.4.0

Merged Pull Requests

- Update TSPDevice.load_script() to accept raw strings ([308](https://github.com/tektronix/tm_devices/pull/308))
- fix: Update stub generation helper function to handle classes followed by dataclasses ([307](https://github.com/tektronix/tm_devices/pull/307))
- Add function to register USBTMC connection information for devices that don't have native USBTMC connection support in tm_devices ([306](https://github.com/tektronix/tm_devices/pull/306))
- python-deps(deps-dev): Bump the python-dependencies group with 2 updates ([304](https://github.com/tektronix/tm_devices/pull/304))
- fix: Ensure that the default VISA timeout value is not overwritten if a new config is loaded that doesn't specify a default VISA timeout. ([303](https://github.com/tektronix/tm_devices/pull/303))
- gh-actions(deps): Bump tektronix/python-package-ci-cd ([287](https://github.com/tektronix/tm_devices/pull/287))
- chore: Bump the version of tektronix/python-package-ci-cd to v1.3.0 in workflows ([301](https://github.com/tektronix/tm_devices/pull/301))
- build: Update license identifier ([299](https://github.com/tektronix/tm_devices/pull/299))
- python-deps(deps): Bump the python-dependencies group with 3 updates ([300](https://github.com/tektronix/tm_devices/pull/300))
- Enable customizing the default visa timeout ([293](https://github.com/tektronix/tm_devices/pull/293))
- python-deps(deps-dev): Bump the python-dependencies group with 4 updates ([296](https://github.com/tektronix/tm_devices/pull/296))
- Update python-pacage-ci-cd to v1.1.0 and use tokens to upload to PyPI ([291](https://github.com/tektronix/tm_devices/pull/291))
- python-deps(deps): Bump the python-dependencies group across 1 directory with 2 updates ([288](https://github.com/tektronix/tm_devices/pull/288))
- chore: Remove an unneeded development dependency ([286](https://github.com/tektronix/tm_devices/pull/286))
- Convert to using reusable workflows from the `tektronix/python-package-ci-cd` repo ([284](https://github.com/tektronix/tm_devices/pull/284))

Added

- Added a config option (`default_visa_timeout`) to specify the default VISA timeout for all initial VISA device connections.
- Added a new function, `register_additional_usbtmc_mapping()`, to enable users to add USBTMC connection information for devices that don't have native support for USBTMC connections in `tm_devices` yet.
- Added `TSPDevice.export_buffers()` to write tsp buffer data fields to file, default is comma separated values with buffer names header.

Changed

- Switched all workflows to use the new [`tektronix/python-package-ci-cd`](https://github.com/tektronix/python-package-ci-cd) reusable workflows.
- Reduced the out-of-the box `default_visa_timeout` value from 30 seconds to 5 seconds.
- _**SEMI-BREAKING CHANGE**_: Changed the `USB_MODEL_ID_LOOKUP` constant to use `SupportedModels` as keys instead of values to make the documentation clearer.
- _**SEMI-BREAKING CHANGE**_: Changed the `DEVICE_DRIVER_MODEL_MAPPING` constant to use `SupportedModels` as keys instead of values to make the documentation clearer.
- _**SEMI-BREAKING CHANGE**_: Changed the input parameter order in `TSPDevice.load_script()` and updated it to accept raw string input in addition to the `file_path` parameter for the script content.
- Verbosity with `PIDevice.write()` now handles multiline input printouts.

Deprecated

- Renamed `TSPDevice.write_buffers()` to `TSPDevice.export_buffers()` for clarity.

Fixed

- Fixed a bug in the stubgen helper code responsible for adding dynamically added methods to stub files that caused invalid stub files to be created if a dataclass immediately followed a class that was being dynamically updated.

---

Page 1 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.