COMPAT: more error msg compat for py310
diff --git a/pandas/tests/indexes/ranges/test_constructors.py b/pandas/tests/indexes/ranges/test_constructors.py
index 9539b0ff7cdba..e306b6e67cf7f 100644
--- a/pandas/tests/indexes/ranges/test_constructors.py
+++ b/pandas/tests/indexes/ranges/test_constructors.py
@@ -119,7 +119,9 @@ def test_constructor_range(self):
         expected = RangeIndex(1, 5, 2)
         tm.assert_index_equal(result, expected, exact=True)
 
-        msg = r"^from_range\(\) got an unexpected keyword argument"
+        msg = (
+            r"(RangeIndex.)?from_range\(\) got an unexpected keyword argument( 'copy')?"
+        )
         with pytest.raises(TypeError, match=msg):
             RangeIndex.from_range(range(10), copy=True)
 
diff --git a/pandas/tests/indexes/test_numeric.py b/pandas/tests/indexes/test_numeric.py
index 5f02f9625a9e6..c5dc84dac0fd2 100644
--- a/pandas/tests/indexes/test_numeric.py
+++ b/pandas/tests/indexes/test_numeric.py
@@ -242,7 +242,9 @@ def test_constructor_invalid(self):
         with pytest.raises((TypeError, ValueError), match=msg):
             index_cls(["a", "b", 0.0])
 
-        msg = r"float\(\) argument must be a string or a number, not 'Timestamp'"
+        msg = (
+            r"float\(\) argument must be a string or a( real)? number, not 'Timestamp'"
+        )
         with pytest.raises(TypeError, match=msg):
             index_cls([Timestamp("20130101")])
 
diff --git a/pandas/tests/io/json/test_ujson.py b/pandas/tests/io/json/test_ujson.py
index a44d47470eb5e..805f6b8dbe461 100644
--- a/pandas/tests/io/json/test_ujson.py
+++ b/pandas/tests/io/json/test_ujson.py
@@ -828,65 +828,65 @@ def test_0d_array(self):
             (
                 [{}, []],
                 ValueError,
-                "nesting not supported for object or variable length dtypes",
+                r"nesting not supported for object or variable length dtypes",
                 {},
             ),
             (
                 [42, None],
                 TypeError,
-                "int() argument must be a string, a bytes-like object or a number, "
-                "not 'NoneType'",
+                r"int\(\) argument must be a string, a bytes-like object or a( real)? "
+                r"number, not 'NoneType'",
                 {},
             ),
             (
                 [["a"], 42],
                 ValueError,
-                "Cannot decode multidimensional arrays with variable length elements "
-                "to numpy",
+                r"Cannot decode multidimensional arrays with variable length elements "
+                r"to numpy",
                 {},
             ),
             (
                 [42, {}, "a"],
                 TypeError,
-                "int() argument must be a string, a bytes-like object or a number, "
-                "not 'dict'",
+                r"int\(\) argument must be a string, a bytes-like object or a( real)? "
+                r"number, not 'dict'",
                 {},
             ),
             (
                 [42, ["a"], 42],
                 ValueError,
-                "invalid literal for int() with base 10: 'a'",
+                r"invalid literal for int\(\) with base 10: 'a'",
                 {},
             ),
             (
                 ["a", "b", [], "c"],
                 ValueError,
-                "nesting not supported for object or variable length dtypes",
+                r"nesting not supported for object or variable length dtypes",
                 {},
             ),
             (
                 [{"a": "b"}],
                 ValueError,
-                "Cannot decode multidimensional arrays with variable length elements "
-                "to numpy",
+                r"Cannot decode multidimensional arrays with variable length elements "
+                r"to numpy",
                 {"labelled": True},
             ),
             (
                 {"a": {"b": {"c": 42}}},
                 ValueError,
-                "labels only supported up to 2 dimensions",
+                r"labels only supported up to 2 dimensions",
                 {"labelled": True},
             ),
             (
                 [{"a": 42, "b": 23}, {"c": 17}],
                 ValueError,
-                "cannot reshape array of size 3 into shape (2,1)",
+                r"cannot reshape array of size 3 into shape \(2,1\)",
                 {"labelled": True},
             ),
         ],
     )
     def test_array_numpy_except(self, bad_input, exc_type, err_msg, kwargs):
-        with pytest.raises(exc_type, match=re.escape(err_msg)):
+        with pytest.raises(exc_type, match=err_msg):
             ujson.decode(ujson.dumps(bad_input), numpy=True, **kwargs)
 
     def test_array_numpy_labelled(self):
diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py
index 98ec4de614a07..2340d154e9e10 100644
--- a/pandas/tests/scalar/timestamp/test_constructors.py
+++ b/pandas/tests/scalar/timestamp/test_constructors.py
@@ -10,6 +10,7 @@
 import pytest
 import pytz
 
+from pandas.compat import PY310
 from pandas.errors import OutOfBoundsDatetime
 
 from pandas import (
@@ -223,7 +224,11 @@ def test_constructor_tz_or_tzinfo(self):
 
     def test_constructor_positional(self):
         # see gh-10758
-        msg = "an integer is required"
+        msg = (
+            "'NoneType' object cannot be interpreted as an integer"
+            if PY310
+            else "an integer is required"
+        )
         with pytest.raises(TypeError, match=msg):
             Timestamp(2000, 1)
 
