summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-02-01 13:56:25 (GMT)
committerGitHub <noreply@github.com>2022-02-01 13:56:25 (GMT)
commit913e340a323c7e61ae6e4acbb1312b4342657bec (patch)
tree451d9aa1105620e9d26bc17e5b32191cead5cf74
parent0515eafe55ce7699e3bbc3c1555f08073d43b790 (diff)
downloadcpython-913e340a323c7e61ae6e4acbb1312b4342657bec.zip
cpython-913e340a323c7e61ae6e4acbb1312b4342657bec.tar.gz
cpython-913e340a323c7e61ae6e4acbb1312b4342657bec.tar.bz2
bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024)
-rw-r--r--Lib/ctypes/test/test_python_api.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/ctypes/test/test_python_api.py b/Lib/ctypes/test/test_python_api.py
index 9c13746..49571f9 100644
--- a/Lib/ctypes/test/test_python_api.py
+++ b/Lib/ctypes/test/test_python_api.py
@@ -1,5 +1,5 @@
from ctypes import *
-import unittest, sys
+import unittest
from test import support
################################################################
@@ -10,10 +10,6 @@ from _ctypes import PyObj_FromPtr
################################################################
from sys import getrefcount as grc
-if sys.version_info > (2, 4):
- c_py_ssize_t = c_size_t
-else:
- c_py_ssize_t = c_int
class PythonAPITestCase(unittest.TestCase):
@@ -21,7 +17,7 @@ class PythonAPITestCase(unittest.TestCase):
PyBytes_FromStringAndSize = pythonapi.PyBytes_FromStringAndSize
PyBytes_FromStringAndSize.restype = py_object
- PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t
+ PyBytes_FromStringAndSize.argtypes = c_char_p, c_size_t
self.assertEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc")