Skip to content

Commit

Permalink
Deferred v1 singleton driver initialization.
Browse files Browse the repository at this point in the history
Bumped pyjls and pyjoulescope_driver dependencies.
  • Loading branch information
mliberty1 committed Dec 15, 2023
1 parent ba95762 commit 02d9d2c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
This file contains the list of changes made to pyjoulescope.


## 1.1.11

2023 Dec 15

* Deferred v1 singleton driver initialization.
* Bumped pyjls and pyjoulescope_driver dependencies.


## 1.1.10

2023 Oct 17
Expand Down
4 changes: 2 additions & 2 deletions joulescope/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
'__author__', '__author_email__', '__license__', '__copyright__']


if sys.hexversion < 0x030700:
raise RuntimeError('joulescope requires Python 3.7+')
if sys.hexversion < 0x030900:
raise RuntimeError('joulescope requires Python 3.9+')


# Although only 64-bit OS/Python is supported, may be able to run on 32bit Python / 32bit Windows.
Expand Down
6 changes: 2 additions & 4 deletions joulescope/v1/driver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Jetperch LLC
# Copyright 2022-2023 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,6 +30,7 @@

class DriverWrapper:
"""Singleton to wrap pyjoulescope_driver.Driver"""
__singleton__ = None

def __new__(cls, *args, **kwds):
s = cls.__dict__.get("__singleton__")
Expand Down Expand Up @@ -90,9 +91,6 @@ def scan(self, name: str = None, config=None):
return devices


_driver_wrapper = DriverWrapper()


def scan(name: str = None, config=None) -> List[Device]:
"""Scan for connected devices.
Expand Down
2 changes: 1 addition & 1 deletion joulescope/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.1.10"
__version__ = "1.1.11"

__title__ = "joulescope"
__description__ = 'Joulescope™ host driver and utilities'
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def run(self):
install_requires=[
'numpy',
'psutil',
'pyjls>=0.7.3',
'pyjoulescope_driver>=1.3.18',
'pyjls>=0.9.1',
'pyjoulescope_driver>=1.4.6',
'python-dateutil>=2.7.3',
'pymonocypher>=3.1.3.2',
"pywin32; platform_system=='Windows'",
Expand Down

0 comments on commit 02d9d2c

Please sign in to comment.