[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)

Turn deprecation warnings added in 3.8 into TypeError.
diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py
index 188a29d..024f912 100644
--- a/Lib/test/test_contextlib.py
+++ b/Lib/test/test_contextlib.py
@@ -603,9 +603,9 @@
                 stack.callback(arg=1)
             with self.assertRaises(TypeError):
                 self.exit_stack.callback(arg=2)
-            with self.assertWarns(DeprecationWarning):
+            with self.assertRaises(TypeError):
                 stack.callback(callback=_exit, arg=3)
-        self.assertEqual(result, [((), {'arg': 3})])
+        self.assertEqual(result, [])
 
     def test_push(self):
         exc_raised = ZeroDivisionError