Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index ade52fd..09eb653 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -650,7 +650,7 @@
             pa->value.i = PyLong_AsLong(obj);
             if (pa->value.i == -1 && PyErr_Occurred()) {
                 PyErr_SetString(PyExc_OverflowError,
-                                "long int too long to convert");
+                                "int too long to convert");
                 return -1;
             }
         }
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 7c7170d..fa231d9 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -1401,9 +1401,9 @@
 static PyObject *us_per_ms = NULL;      /* 1000 */
 static PyObject *us_per_second = NULL;  /* 1000000 */
 static PyObject *us_per_minute = NULL;  /* 1e6 * 60 as Python int */
-static PyObject *us_per_hour = NULL;    /* 1e6 * 3600 as Python long */
-static PyObject *us_per_day = NULL;     /* 1e6 * 3600 * 24 as Python long */
-static PyObject *us_per_week = NULL;    /* 1e6*3600*24*7 as Python long */
+static PyObject *us_per_hour = NULL;    /* 1e6 * 3600 as Python int */
+static PyObject *us_per_day = NULL;     /* 1e6 * 3600 * 24 as Python int */
+static PyObject *us_per_week = NULL;    /* 1e6*3600*24*7 as Python int */
 static PyObject *seconds_per_day = NULL; /* 3600*24 as Python int */
 
 /* ---------------------------------------------------------------------------
@@ -1416,7 +1416,7 @@
 
 /* Convert a timedelta to a number of us,
  *      (24*3600*self.days + self.seconds)*1000000 + self.microseconds
- * as a Python int or long.
+ * as a Python int.
  * Doing mixed-radix arithmetic by hand instead is excruciating in C,
  * due to ubiquitous overflow possibilities.
  */
@@ -1468,7 +1468,7 @@
     return result;
 }
 
-/* Convert a number of us (as a Python int or long) to a timedelta.
+/* Convert a number of us (as a Python int) to a timedelta.
  */
 static PyObject *
 microseconds_to_delta_ex(PyObject *pyus, PyTypeObject *type)
@@ -3886,7 +3886,7 @@
 PyDoc_STR("time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object\n\
 \n\
 All arguments are optional. tzinfo may be None, or an instance of\n\
-a tzinfo subclass. The remaining arguments may be ints or longs.\n");
+a tzinfo subclass. The remaining arguments may be ints.\n");
 
 static PyNumberMethods time_as_number = {
     0,                                          /* nb_add */
@@ -5069,7 +5069,7 @@
 PyDoc_STR("datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n\
 \n\
 The year, month and day arguments are required. tzinfo may be None, or an\n\
-instance of a tzinfo subclass. The remaining arguments may be ints or longs.\n");
+instance of a tzinfo subclass. The remaining arguments may be ints.\n");
 
 static PyNumberMethods datetime_as_number = {
     datetime_add,                               /* nb_add */
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index ce573cf..bc3b406 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -387,8 +387,8 @@
 
 
 /*************************************************************************
- A custom hashtable mapping void* to longs. This is used by the pickler for
- memoization. Using a custom hashtable rather than PyDict allows us to skip
+ A custom hashtable mapping void* to Python ints. This is used by the pickler
+ for memoization. Using a custom hashtable rather than PyDict allows us to skip
  a bunch of unnecessary object creation. This makes a huge performance
  difference. */
 
@@ -1581,8 +1581,8 @@
          * need another byte even if there aren't any leftovers:
          * the most-significant bit of the most-significant byte
          * acts like a sign bit, and it's usually got a sense
-         * opposite of the one we need.  The exception is longs
-         * of the form -(2**(8*j-1)) for j > 0.  Such a long is
+         * opposite of the one we need.  The exception is ints
+         * of the form -(2**(8*j-1)) for j > 0.  Such an int is
          * its own 256's-complement, so has the right sign bit
          * even without the extra byte.  That's a pain to check
          * for in advance, though, so we always grab an extra
@@ -1591,7 +1591,7 @@
         nbytes = (nbits >> 3) + 1;
         if (nbytes > 0x7fffffffL) {
             PyErr_SetString(PyExc_OverflowError,
-                            "long too large to pickle");
+                            "int too large to pickle");
             goto error;
         }
         repr = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)nbytes);
@@ -1603,7 +1603,7 @@
                                 1 /* little endian */ , 1 /* signed */ );
         if (i < 0)
             goto error;
-        /* If the long is negative, this may be a byte more than
+        /* If the int is negative, this may be a byte more than
          * needed.  This is so iff the MSB is all redundant sign
          * bits.
          */
@@ -3917,7 +3917,7 @@
 
     if (errno || (*endptr != '\n' && *endptr != '\0')) {
         /* Hm, maybe we've got something long.  Let's try reading
-         * it as a Python long object. */
+         * it as a Python int object. */
         errno = 0;
         /* XXX: Same thing about the base here. */
         value = PyLong_FromString(s, NULL, 0);
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 6540ab9..21a2b09 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -444,7 +444,7 @@
     {"setstate",          (PyCFunction)random_setstate,  METH_O,
         PyDoc_STR("setstate(state) -> None.  Restores generator state.")},
     {"getrandbits",     (PyCFunction)random_getrandbits,  METH_VARARGS,
-        PyDoc_STR("getrandbits(k) -> x.  Generates a long int with "
+        PyDoc_STR("getrandbits(k) -> x.  Generates an int with "
                   "k random bits.")},
     {NULL,              NULL}           /* sentinel */
 };
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 2848614..a248753 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1631,7 +1631,7 @@
             if (e->pack(res, v, e) < 0) {
                 if (PyLong_Check(v) && PyErr_ExceptionMatches(PyExc_OverflowError))
                     PyErr_SetString(StructError,
-                                    "long too large to convert to int");
+                                    "int too large to convert");
                 return -1;
             }
         }
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 86ef713..7df3e19 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1635,7 +1635,7 @@
                      {-3L, 2, -1},
                      {4L, 3, 1},
                      {-4L, 3, -1},
-                     {0x7fffL, 15, 1},          /* one Python long digit */
+                     {0x7fffL, 15, 1},          /* one Python int digit */
              {-0x7fffL, 15, -1},
              {0xffffL, 16, 1},
              {-0xffffL, 16, -1},
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 3fa52d0..4b3e642 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -1535,8 +1535,7 @@
     }
     else {
         PyErr_SetString(PyExc_TypeError,
-                        "Expected an int or long as second argument "
-                        "to ldexp.");
+                        "Expected an int as second argument to ldexp.");
         return NULL;
     }
 
@@ -1598,19 +1597,19 @@
 "Return the fractional and integer parts of x.  Both results carry the sign\n"
 "of x and are floats.");
 
-/* A decent logarithm is easy to compute even for huge longs, but libm can't
+/* A decent logarithm is easy to compute even for huge ints, but libm can't
    do that by itself -- loghelper can.  func is log or log10, and name is
-   "log" or "log10".  Note that overflow of the result isn't possible: a long
+   "log" or "log10".  Note that overflow of the result isn't possible: an int
    can contain no more than INT_MAX * SHIFT bits, so has value certainly less
    than 2**(2**64 * 2**16) == 2**2**80, and log2 of that is 2**80, which is
    small enough to fit in an IEEE single.  log and log10 are even smaller.
-   However, intermediate overflow is possible for a long if the number of bits
-   in that long is larger than PY_SSIZE_T_MAX. */
+   However, intermediate overflow is possible for an int if the number of bits
+   in that int is larger than PY_SSIZE_T_MAX. */
 
 static PyObject*
 loghelper(PyObject* arg, double (*func)(double), char *funcname)
 {
-    /* If it is long, do it ourselves. */
+    /* If it is int, do it ourselves. */
     if (PyLong_Check(arg)) {
         double x, result;
         Py_ssize_t e;
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 1202d38..3bddaa5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4693,14 +4693,14 @@
             y = x & 0xFFFFFFFFUL;
             if (y ^ x)
                 return PyErr_Format(PyExc_OverflowError,
-                            "long int larger than 32 bits");
+                            "int larger than 32 bits");
             x = y;
         }
 #endif
     }
     else
         return PyErr_Format(PyExc_TypeError,
-                            "expected int/long, %s found",
+                            "expected int, %s found",
                             Py_TYPE(arg)->tp_name);
     return PyLong_FromUnsignedLong(ntohl(x));
 }
@@ -4750,14 +4750,14 @@
             y = x & 0xFFFFFFFFUL;
             if (y ^ x)
                 return PyErr_Format(PyExc_OverflowError,
-                            "long int larger than 32 bits");
+                            "int larger than 32 bits");
             x = y;
         }
 #endif
     }
     else
         return PyErr_Format(PyExc_TypeError,
-                            "expected int/long, %s found",
+                            "expected int, %s found",
                             Py_TYPE(arg)->tp_name);
     return PyLong_FromUnsignedLong(htonl((unsigned long)x));
 }