diff options
-rw-r--r-- | src/waitress/wasyncore.py | 6 | ||||
-rw-r--r-- | tests/test_wasyncore.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/waitress/wasyncore.py b/src/waitress/wasyncore.py index ae9a6a9..debe0e4 100644 --- a/src/waitress/wasyncore.py +++ b/src/waitress/wasyncore.py @@ -320,7 +320,7 @@ class dispatcher: self.socket = None def __repr__(self): - status = [self.__class__.__module__ + "." + compat.qualname(self.__class__)] + status = [self.__class__.__module__ + "." + self.__class__.__qualname__] if self.accepting and self.addr: status.append("listening") elif self.connected: @@ -646,7 +646,7 @@ if os.name == "posix": def __del__(self): if self.fd >= 0: - warnings.warn("unclosed file %r" % self, compat.ResourceWarning) + warnings.warn("unclosed file %r" % self, ResourceWarning) self.close() def recv(self, *args): @@ -685,7 +685,7 @@ if os.name == "posix": pass self.set_file(fd) # set it to non-blocking mode - compat.set_nonblocking(fd) + os.set_blocking(fd, False) def set_file(self, fd): self.socket = file_wrapper(fd) diff --git a/tests/test_wasyncore.py b/tests/test_wasyncore.py index df896db..a7713a8 100644 --- a/tests/test_wasyncore.py +++ b/tests/test_wasyncore.py @@ -732,7 +732,7 @@ class FileWrapperTest(unittest.TestCase): os.close(fd) try: - with check_warnings(("", compat.ResourceWarning)): + with check_warnings(("", ResourceWarning)): f = None gc_collect() except AssertionError: # pragma: no cover |