From dc29b155282c7e9c3444f4d48520e5dc4bd39959 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 23 Jul 2024 12:48:23 -0400 Subject: [PATCH] cli: Deprecate print_device_info() --- apollo_fpga/commands/cli.py | 6 +++++- pyproject.toml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apollo_fpga/commands/cli.py b/apollo_fpga/commands/cli.py index ea22dea..74e4f88 100755 --- a/apollo_fpga/commands/cli.py +++ b/apollo_fpga/commands/cli.py @@ -18,8 +18,9 @@ from collections import namedtuple import xdg.BaseDirectory from functools import partial +import deprecation -from apollo_fpga import ApolloDebugger +from apollo_fpga import ApolloDebugger, __version__ from apollo_fpga.jtag import JTAGChain, JTAGPatternError from apollo_fpga.ecp5 import ECP5_JTAGProgrammer, ECP5FlashBridgeProgrammer from apollo_fpga.onboard_jtag import * @@ -76,6 +77,9 @@ } +@deprecation.deprecated(deprecated_in="1.1.0", removed_in="2.0.0", + current_version=__version__, + details="Use ApolloDebugger.print_info() instead.") def print_device_info(device, args): """ Command that prints information about devices connected to the scan chain to the console. """ diff --git a/pyproject.toml b/pyproject.toml index 1bdc1d3..97cc8c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ dependencies = [ "pyvcd>=0.2.4", "prompt-toolkit>3.0.16", "pyxdg>=0.27", + "deprecation>=2.1.0", ] dynamic = ["version"]