From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 13 Dec 2022 16:53:53 +0100
Subject: Remove dependency on pypytools

Pypytools is not packaged in Debian/Ubuntu.

Forwarded: not-needed
---
 cheroot/test/test_server.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- python-cheroot.orig/cheroot/test/test_server.py
+++ python-cheroot/cheroot/test/test_server.py
@@ -1,5 +1,6 @@
 """Tests for the HTTP server."""
 
+import gc
 import os
 import queue
 import socket
@@ -13,8 +14,6 @@
 import requests
 import requests_unixsocket
 
-from pypytools.gc.custom import DefaultGc
-
 from .._compat import bton, ntob
 from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS, SYS_PLATFORM
 from ..server import IS_UID_GID_RESOLVABLE, Gateway, HTTPServer
@@ -408,11 +407,17 @@
         test_high_number_of_file_descriptors,
     )
 
+class GcWrapper:
+    def __enter__(self):
+        gc.disable()
+
+    def __exit__(self, exc_type, exc_val, exc_tb):
+        gc.enable()
 
 @pytest.fixture
 def _garbage_bin():
     """Disable garbage collection when this fixture is in use."""
-    with DefaultGc().nogc():
+    with GcWrapper():
         yield
 
 
