Skip to content

pypy, array interface and ctypes.pythonapi (425) #405

@GalacticEmperor1

Description

@GalacticEmperor1

Issue №425 opened by illume at 2018-03-19 14:18:32

pythonapi isn't on pypy, and they don't want to implement it.

  • find what uses it (see below).
  • add skips for tests that use pythonapi. We don't have to skip all of it.
  • ask pypy devs about alternatives.
  • use use memoryview for arritter.ArrayInterface with ctypes.

# What is pythonapi used for?

Array testing. pygame uses the python array interface, and has a ctypes based testing module for checking this stuff.

pygame/test/test_utils/arrinter.py

These are the functions from pythonapi it uses, with links to the CPython API docs.

Tests which use pythonapi (and skip such tests on pypy):

  • base_test.py
  • color_test.py
  • freetype_test.py
  • mixer_test.py
  • pixelarray_test.py
  • pixelcopy_test.py
  • surface_test.py

Comments

# # illume commented at 2018-03-19 17:16:54

This could be used to get strides and such:

memoryview(array)

# # illume commented at 2022-01-22 20:01:51

The pypy issue tracker is here now: https://foss.heptapod.net/pypy/pypy/-/issues

Haven’t looked into if we need this stuff still. At least the python stuff could be removed. Maybe we should rip out the old buffer stuff first and then reassess.


# # illume commented at 2022-01-22 20:02:52

Here is the old buffer removal issue pygame/pygame#2949

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions