Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.12 support #16

Merged
merged 10 commits into from
Oct 3, 2023
2 changes: 1 addition & 1 deletion .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ repos:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.26.3
rev: 0.27.0
hooks:
- id: check-readthedocs
- id: check-dependabot
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.9.0
rev: 3.10.0
hooks:
- id: commitizen
stages: [commit-msg]
Expand All @@ -59,6 +59,7 @@ repos:
- id: mdformat
args: [--number, --end-of-line, keep]
additional_dependencies:
- setuptools # This is required since Python 3.12 no longer installs setuptools by default in virtual environments
- mdformat-myst
- mdformat-toc
- mdformat-frontmatter
Expand Down Expand Up @@ -121,7 +122,7 @@ repos:
always_run: true
args: [., --min=10]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.290
rev: v0.0.292
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ project adheres to [Semantic Versioning](https://semver.org).

______________________________________________________________________

## v0.1.14 (2023-10-03)

### Added

- Added support for Python 3.12.

______________________________________________________________________

## v0.1.13 (2023-09-21)

### Fixed
Expand Down
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ maintainers = [
name = "tm_devices"
readme = "README.rst"
repository = "https://github.com/tektronix/tm_devices"
version = "0.1.13"
version = "0.1.14"

[tool.poetry.dependencies]
check4updates = ">=0.0.2"
gpib-ctypes = ">=0.3.0"
libusb-package = ">=1.0.26.0"
libusb-package = ">=1.0.26.0,!=1.0.26.2" # 1.0.26.2 doesn't work with Python 3.12
packaging = ">=21.3"
psutil = ">=5.9.2"
pyserial = ">=3.5"
Expand Down Expand Up @@ -124,7 +124,7 @@ pytest-html = ">=4.0"
pytest-order = ">=1.0.1"
pytest-profiling = ">=1.7.0"
python-semantic-release = ">=7.31.2"
ruff = ">=0.0.260"
ruff = ">=0.0.292"
safety = ">=2.1.1"
sphinx-autoapi = ">=2.0.0"
sphinx-copybutton = ">=0.5.1"
Expand Down Expand Up @@ -164,14 +164,14 @@ ignore-patterns = [
"^\\.idea",
"^\\.results.*",
"^\\.tox",
"^\\.venv.*",
"^\\.vscode",
"^temp_.*\\..*"
]
jobs = 0
load-plugins = """
pylint.extensions.check_elif,
pylint.extensions.code_style,
pylint.extensions.comparetozero,
pylint.extensions.comparison_placement,
pylint.extensions.consider_refactoring_into_while_condition,
pylint.extensions.dict_init_mutate,
Expand Down Expand Up @@ -210,6 +210,7 @@ disable = [
"too-many-statements", # caught by ruff
"unused-argument", # caught by ruff
"unused-import", # caught by ruff
"use-implicit-booleaness-not-comparison-to-string", # caught by ruff
"while-used", # using while loops in example scripts
"wrong-import-order" # caught by ruff
]
Expand Down Expand Up @@ -377,10 +378,10 @@ legacy_tox_ini = """
[tox]
requires = tox>4
isolated_build = True
envlist = py38,py39,py310,py311,tests,docs,doctests
envlist = py38,py39,py310,py311,py312,tests,docs,doctests
skip_missing_interpreters = True
labels =
basic = py38,py39,py310,py311,tests
basic = py38,py39,py310,py311,py312,tests
documentation = docs,doctests

[gh-actions]
Expand All @@ -389,6 +390,7 @@ python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
package = wheel
Expand All @@ -399,6 +401,7 @@ setenv =
DOC_PYTHON_VERSION = python3.11 # Keep this in sync with .readthedocs.yml and any CI scripts
# Skip pre-commit checks that are explicitly performed by tox
SKIP = black,docformatter,ruff,pylint,pyright,pyright-verifytypes,pyroma
PYRIGHT_PYTHON_DEBUG = true
commands_pre =
poetry install --no-root
commands =
Expand Down
19 changes: 0 additions & 19 deletions src/tm_devices/commands/_163n04_mdo/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
device, f"{self._cmd_syntax}:RF_PHASe"
)

# pylint: disable=invalid-name
@property
def ch(self) -> Dict[int, SearchSearchItemTriggerAUpperthresholdChannel]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:UPPerthreshold:CH<x>`` command.
Expand Down Expand Up @@ -3538,7 +3537,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
device, f"{self._cmd_syntax}:RF_PHASe"
)

# pylint: disable=invalid-name
@property
def ch(self) -> Dict[int, SearchSearchItemTriggerALowerthresholdChannel]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:LOWerthreshold:CH<x>`` command.
Expand Down Expand Up @@ -3953,7 +3951,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
device, f"{self._cmd_syntax}:RF_PHASe"
)

# pylint: disable=invalid-name
@property
def ch(self) -> Dict[int, SearchSearchItemTriggerALogicThresholdChannel]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:LOGIc:THReshold:CH<x>`` command.
Expand Down Expand Up @@ -4364,7 +4361,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
)
)

# pylint: disable=invalid-name
@property
def ch(self) -> Dict[int, SearchSearchItemTriggerALogicPatternInputChannel]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:LOGIc:PATtern:INPut:CH<x>`` command.
Expand Down Expand Up @@ -4924,7 +4920,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
device, f"{self._cmd_syntax}:RF_PHASe"
)

# pylint: disable=invalid-name
@property
def ch(self) -> Dict[int, SearchSearchItemTriggerALogicInputChannel]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:LOGIc:INPut:CH<x>`` command.
Expand Down Expand Up @@ -4974,7 +4969,6 @@ def clock(self) -> SearchSearchItemTriggerALogicInputClock:
"""
return self._clock

# pylint: disable=invalid-name
@property
def d(self) -> Dict[int, SearchSearchItemTriggerALogicInputDigitalBit]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:LOGIc:INPut:D<x>`` command.
Expand Down Expand Up @@ -5557,7 +5551,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
device, f"{self._cmd_syntax}:RF_PHASe"
)

# pylint: disable=invalid-name
@property
def ch(self) -> Dict[int, SearchSearchItemTriggerALevelChannel]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:LEVel:CH<x>`` command.
Expand Down Expand Up @@ -6425,7 +6418,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
self._sc = SearchSearchItemTriggerABusBItemUsbSplitSc(device, f"{self._cmd_syntax}:SC")
self._se = SearchSearchItemTriggerABusBItemUsbSplitSe(device, f"{self._cmd_syntax}:SE")

# pylint: disable=invalid-name
@property
def et(self) -> SearchSearchItemTriggerABusBItemUsbSplitEt:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:USB:SPLit:ET`` command tree.
Expand Down Expand Up @@ -6474,7 +6466,6 @@ def port(self) -> SearchSearchItemTriggerABusBItemUsbSplitPort:
"""
return self._port

# pylint: disable=invalid-name
@property
def sc(self) -> SearchSearchItemTriggerABusBItemUsbSplitSc:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:USB:SPLit:SC`` command tree.
Expand All @@ -6491,7 +6482,6 @@ def sc(self) -> SearchSearchItemTriggerABusBItemUsbSplitSc:
"""
return self._sc

# pylint: disable=invalid-name
@property
def se(self) -> SearchSearchItemTriggerABusBItemUsbSplitSe:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:USB:SPLit:SE`` command tree.
Expand Down Expand Up @@ -8666,7 +8656,6 @@ def condition(self) -> SearchSearchItemTriggerABusBItemRs232cCondition:
""" # noqa: E501
return self._condition

# pylint: disable=invalid-name
@property
def rx(self) -> SearchSearchItemTriggerABusBItemRs232cRx:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:RS232C:RX`` command tree.
Expand All @@ -8683,7 +8672,6 @@ def rx(self) -> SearchSearchItemTriggerABusBItemRs232cRx:
"""
return self._rx

# pylint: disable=invalid-name
@property
def tx(self) -> SearchSearchItemTriggerABusBItemRs232cTx:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:RS232C:TX`` command tree.
Expand Down Expand Up @@ -9531,7 +9519,6 @@ def instr(self) -> SearchSearchItemTriggerABusBItemMil1553bStatusBitInstr:
""" # noqa: E501
return self._instr

# pylint: disable=invalid-name
@property
def me(self) -> SearchSearchItemTriggerABusBItemMil1553bStatusBitMe:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:MIL1553B:STATus:BIT:ME`` command.
Expand Down Expand Up @@ -9636,7 +9623,6 @@ def subsf(self) -> SearchSearchItemTriggerABusBItemMil1553bStatusBitSubsf:
""" # noqa: E501
return self._subsf

# pylint: disable=invalid-name
@property
def tf(self) -> SearchSearchItemTriggerABusBItemMil1553bStatusBitTf:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:MIL1553B:STATus:BIT:TF`` command.
Expand Down Expand Up @@ -16271,7 +16257,6 @@ def data(self) -> SearchSearchItemTriggerABusBItemCanData:
"""
return self._data

# pylint: disable=invalid-name
@property
def fd(self) -> SearchSearchItemTriggerABusBItemCanFd:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>:CAN:FD`` command tree.
Expand Down Expand Up @@ -17690,7 +17675,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
)
self._source = SearchSearchItemTriggerABusSource(device, f"{self._cmd_syntax}:SOUrce")

# pylint: disable=invalid-name
@property
def b(self) -> Dict[int, SearchSearchItemTriggerABusBItem]:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A:BUS:B<x>`` command tree.
Expand Down Expand Up @@ -18109,7 +18093,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
super().__init__(device, cmd_syntax)
self._a = SearchSearchItemTriggerA(device, f"{self._cmd_syntax}:A")

# pylint: disable=invalid-name
@property
def a(self) -> SearchSearchItemTriggerA:
"""Return the ``SEARCH:SEARCH<x>:TRIGger:A`` command tree.
Expand Down Expand Up @@ -19072,7 +19055,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
lambda x: SearchSearchItemTrigABusBItem(device, f"{self._cmd_syntax}:B{x}")
)

# pylint: disable=invalid-name
@property
def b(self) -> Dict[int, SearchSearchItemTrigABusBItem]:
"""Return the ``SEARCH:SEARCH<x>:TRIG:A:BUS:B<x>`` command tree.
Expand Down Expand Up @@ -19138,7 +19120,6 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None:
super().__init__(device, cmd_syntax)
self._a = SearchSearchItemTrigA(device, f"{self._cmd_syntax}:A")

# pylint: disable=invalid-name
@property
def a(self) -> SearchSearchItemTrigA:
"""Return the ``SEARCH:SEARCH<x>:TRIG:A`` command tree.
Expand Down
Loading
Loading