Skip to content

Reinstate support for Python 3.10 and 3.11 #160

Open
@crusaderky

Description

@crusaderky

With #115, you can no longer call np.asarray(x), where x is a array_api_strict.Array, on Python 3.10 and 3.11.
This effectively means that array-api-strict is no longer fit for purpose on 3.10 and 3.11.

This minimum version bump is reflected in the release notes, but

As a result, all projects that don't pin array-api-strict will break or have already broken.
All projects that have it as a hard dependency in their test suite (why wouldn't they? it's tiny!) break and fixing them is potentially going to require substantial effort.

I don't think this was discussed widely enough, and I, for one, am strongly convinced this was a very bad decision.

SPEC0 dropped support for 3.10 in Q4 2024 and requires 3.11 to be supported until Q4 2025.
Most projects do not aggressively enforce SPEC0. We can see some of the biggest users of array-api-strict below:

library Minimum Python version
array-api-compat 3.10
array-api-extra 3.10
scipy 1.17 3.11
scikit-learn 3.10

Proposed course of action

Option 1

  • Yank release 2.4;
  • Amend ENH: rm __array__, add __buffer__ #115 so that it defines __array__ on Python 3.10 and 3.11, and defines __buffer__ instead on newer versions;
  • Reinstate CI on 3.10 and 3.11;
  • Issue release 2.5.

Option 2

  • Yank release 2.4;
  • Amend pyproject.toml to prevent pypi users on Python 3.10-3.11 from upgrading;
  • Issue release 2.4.1;
  • Amend conda-forge recipe to prevent conda users from upgrading.

I strongly prefer option 1, on the basis that the users listed above would get long term harm from n.2. They won't break immediately, but will have to deal with either diverging versions of array-api-strict or changing array-api-strict to be a fully optional test dependency.

Note that Option 2 is in violation of SPEC0 until Q4 2025.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions