New submission from Nikita Sobolev <m...@sobolevn.me>:

Right now Lib/ctypes/test/test_python_api.py has these lines:

```
if sys.version_info > (2, 4):
    c_py_ssize_t = c_size_t
else:
    c_py_ssize_t = c_int
```

Source: 
https://github.com/python/cpython/blame/8fb36494501aad5b0c1d34311c9743c60bb9926c/Lib/ctypes/test/test_python_api.py#L13-L16

I think that there's no reason to keep code compat for python versions `<=2.3`. 
Other modules in CPython do refactor this by removing old and unused code, 
especially in tests.

I propose to do the same here.

----------
components: Tests, ctypes
messages: 412154
nosy: amaury.forgeotdarc, belopolsky, meador.inge, sobolevn, zach.ware
priority: normal
severity: normal
status: open
title: Modernize `ctypes/test_python_api` by removing old version check
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46584>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to