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 support for python 3.12 #292

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.12"
env:
DISPLAY: ':99.0'
OS: ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.12"
env:
DISPLAY: ':99.0'
OS: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",]
requires-python = ">=3.9"
dependencies = [ "qcodes>=0.42.0", "versioningit>=2.0.1", "packaging", "pandas"]
Expand Down
2 changes: 1 addition & 1 deletion src/qcodes_contrib_drivers/drivers/QuTech/IVVI.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def __init__(self, name, address, reset=False, numdacs=16, dac_step=10,
print('Initialized IVVI-rack in %.2fs' % (t1 - t0))

def get_idn(self):
"""
r"""
Overwrites the get_idn function using constants as the hardware
does not have a proper \*IDN function.
"""
Expand Down
3 changes: 2 additions & 1 deletion src/qcodes_contrib_drivers/drivers/Spectrum/M4i.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,8 @@ def _transfer_buffer_numpy(self, memsize: int, numch: int, bytes_per_sample=2) -
# convert buffer to numpy array
# this does not typecheck with numpy 1.22 should be updated
# by someone with access to test on the real data.
output = np.frombuffer(data_buffer, dtype=sample_ctype) # type: ignore[call-overload]
# for some reason this does type check with 3.12 but not earlier
output = np.frombuffer(data_buffer, dtype=sample_ctype) # type: ignore[call-overload,unused-ignore]

return output

Expand Down
5 changes: 2 additions & 3 deletions src/qcodes_contrib_drivers/drivers/Spectrum/py_header/h2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')

p_macro = re.compile(
'^[\t ]*#[\t ]*define[\t ]+'
'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
r'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')

p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
p_include = re.compile(r'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')

p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
p_cpp_comment = re.compile('//.*')
Expand Down
2 changes: 1 addition & 1 deletion src/qcodes_contrib_drivers/drivers/Tektronix/AWG520.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def set_setup_filename(self, fname, force_reload=False):
return
else:
self._fname = fname
filename = "\%s/%s.seq" % (fname, fname)
filename = r"\%s/%s.seq" % (fname, fname)
self.set_sequence(filename=filename)
print('Waiting for AWG to load file "%s"' % fname)
sleeptime = 0.5
Expand Down
Loading