From af31c6ea21d3a2ff7db6fb218ade1a6ad6ff40a0 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 22 Dec 2019 05:46:41 +0000 Subject: [PATCH] coredevice: Don't use `is` to compare with integer literal This works on CPython, but is not guaranteed to do so, and produces a warning since 3.8 (see https://bugs.python.org/issue34850). --- artiq/coredevice/comm_kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/comm_kernel.py b/artiq/coredevice/comm_kernel.py index f9bd5c8b9..268d672cb 100644 --- a/artiq/coredevice/comm_kernel.py +++ b/artiq/coredevice/comm_kernel.py @@ -408,7 +408,7 @@ class CommKernel: args, kwargs = self._receive_rpc_args(embedding_map) return_tags = self._read_bytes() - if service_id is 0: + if service_id == 0: service = lambda obj, attr, value: setattr(obj, attr, value) else: service = embedding_map.retrieve_object(service_id)