Skip to content

Commit 01873c0

Browse files
committed
- explicitly set SSL certrificates on MQTT TLS
- avoids unnecessary menu re-recreation - prevents undo of main events for events triggered from alarm rule actions or custom event button actions (Issue #2157) - fixes regression that prevented to set the p-i-d parameters on external MODBUS PIDs (Issue #2159) - enables pyinstaller Python optimization - lib/Python update
1 parent 0cfe4fc commit 01873c0

31 files changed

Lines changed: 153 additions & 142 deletions

src/artisan-linux.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ a = Analysis(['artisan.py'],
6666
hiddenimports=hiddenimports_list,
6767
win_no_prefer_redirects=False,
6868
win_private_assemblies=False,
69+
optimize=2,
6970
cipher=block_cipher)
7071

7172

src/artisan-mac.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ a = Analysis(['artisan.py'],
139139
win_no_prefer_redirects=False,
140140
win_private_assemblies=False,
141141
cipher=block_cipher,
142+
optimize=2,
142143
noarchive=False)
143144

144145
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

src/artisan-win.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ a = Analysis(['artisan.py'],
153153
hiddenimports=hiddenimports_list,
154154
win_no_prefer_redirects=False,
155155
win_private_assemblies=False,
156+
optimize=2,
156157
cipher=block_cipher)
157158

158159
pyz = PYZ(a.pure, a.zipped_data,cipher=block_cipher)

src/artisanlib/aillio_r1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,18 @@ def _open_port(self) -> None:
165165
if isinstance(self.usbhandle, Generator): # pyrefly:ignore[invalid-argument,unsafe-overlap]
166166
raise OSError('Generator not supported')
167167
self.__dbg('device found!')
168-
if not system().startswith('Windows') and self.usbhandle.is_kernel_driver_active(self.AILLIO_INTERFACE):
168+
if not system().startswith('Windows') and self.usbhandle.is_kernel_driver_active(self.AILLIO_INTERFACE): # type:ignore[union-attr, unused-ignore]
169169
try:
170-
self.usbhandle.detach_kernel_driver(self.AILLIO_INTERFACE)
170+
self.usbhandle.detach_kernel_driver(self.AILLIO_INTERFACE) # type:ignore[union-attr, unused-ignore]
171171
except Exception: # pylint: disable=broad-except
172172
pass
173173
# detach fails on libusb 1.0.26 and newer on macOS >v12 if not running under sudo and seems not to be needed on those configurations
174174
# self.usbhandle = None
175175
# raise OSError('unable to detach kernel driver') from e
176176
try:
177-
config = self.usbhandle.get_active_configuration()
177+
config = self.usbhandle.get_active_configuration() # type:ignore[union-attr, unused-ignore]
178178
if config is not None and config.bConfigurationValue != self.AILLIO_CONFIGURATION: # pyright:ignore[reportAttributeAccessIssue]
179-
self.usbhandle.set_configuration(configuration=self.AILLIO_CONFIGURATION)
179+
self.usbhandle.set_configuration(configuration=self.AILLIO_CONFIGURATION) # type:ignore[union-attr, unused-ignore]
180180
except Exception as e: # pylint: disable=broad-except
181181
self.usbhandle = None
182182
raise OSError('unable to configure') from e

src/artisanlib/aillio_r2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,10 @@ def _open_port(self) -> None:
340340
self.ep_in = None
341341

342342
for ep in intf:
343-
self.__dbg(f'Found endpoint: {ep.bEndpointAddress:#x}') # pyright:ignore[reportAttributeAccessIssue]
344-
if usb.util.endpoint_direction(ep.bEndpointAddress) == usb.util.ENDPOINT_OUT: # pyright:ignore[reportUnknownArgumentType,reportAttributeAccessIssue]
343+
self.__dbg(f'Found endpoint: {ep.bEndpointAddress:#x}') # type:ignore[attr-defined, unused-ignore] # pyright:ignore[reportAttributeAccessIssue]
344+
if usb.util.endpoint_direction(ep.bEndpointAddress) == usb.util.ENDPOINT_OUT: # type:ignore[attr-defined, unused-ignore] # pyright:ignore[reportUnknownArgumentType,reportAttributeAccessIssue]
345345
self.ep_out = ep
346-
elif usb.util.endpoint_direction(ep.bEndpointAddress) == usb.util.ENDPOINT_IN: # pyright:ignore[reportUnknownArgumentType,reportAttributeAccessIssue]
346+
elif usb.util.endpoint_direction(ep.bEndpointAddress) == usb.util.ENDPOINT_IN: # type:ignore[attr-defined, unused-ignore] # pyright:ignore[reportUnknownArgumentType,reportAttributeAccessIssue]
347347
self.ep_in = ep
348348

349349
if self.ep_out is None:
@@ -352,8 +352,8 @@ def _open_port(self) -> None:
352352
raise OSError('Input endpoint not found')
353353

354354
self.__dbg('Endpoints configured successfully')
355-
self.__dbg(f'Output endpoint: {self.ep_out.bEndpointAddress:#x}') # pyright:ignore[reportAttributeAccessIssue]
356-
self.__dbg(f'Input endpoint: {self.ep_in.bEndpointAddress:#x}') # pyright:ignore[reportAttributeAccessIssue]
355+
self.__dbg(f'Output endpoint: {self.ep_out.bEndpointAddress:#x}') # type:ignore[attr-defined, unused-ignore] # pyright:ignore[reportAttributeAccessIssue]
356+
self.__dbg(f'Input endpoint: {self.ep_in.bEndpointAddress:#x}') # type:ignore[attr-defined, unused-ignore] # pyright:ignore[reportAttributeAccessIssue]
357357

358358
self.parent_pipe, self.child_pipe = Pipe() # pyright:ignore[reportAttributeAccessIssue]
359359
self.worker_thread = threading.Thread(target=self.__updatestate,

0 commit comments

Comments
 (0)