mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

compile Cython extensions with Cython >= 3.0

Open orbeckst opened this issue 5 years ago • 9 comments
trafficstars

Fixes #2988

Changes made in this Pull Request:

  • Do not any longer use deprecated NumPy API.
  • requires Cython >= 3.0 (tested locally with 3.0a6)
  • fixed direct ndarray.base access (using https://github.com/cython/cython/issues/3690#issuecomment-645665793 )

PR Checklist

  • [ ] Tests?
  • [ ] Docs?
  • [ ] CHANGELOG updated?
  • [x] Issue raised/referenced?

orbeckst avatar Oct 16 '20 08:10 orbeckst

Hello @orbeckst! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 274:80: E501 line too long (124 > 79 characters)

Comment last updated at 2022-04-06 08:11:56 UTC

pep8speaks avatar Oct 16 '20 08:10 pep8speaks

Note that this will fail until we install Cython 3.0.

orbeckst avatar Oct 16 '20 08:10 orbeckst

Is there something in the travis yml to get cython 3?

richardjgowers avatar Oct 16 '20 08:10 richardjgowers

We could pip install 'Cython==3.0.0a6' (worked for me) or something like that (and remove cython from the conda/mamba installation).

orbeckst avatar Oct 16 '20 08:10 orbeckst

@orbeckst since cython 3.0 is still in alpha, I'm going to place this as a v2.1.0 milestone, we can shift as necessary.

IAlibay avatar Apr 06 '21 17:04 IAlibay

@orbeckst since cython 3.0 is still in alpha, I'm going to place this as a v2.1.0 milestone, we can shift as necessary.

Moving this to 2.2.0 instead as cython 3 is still in alpha. We'll also need to consider if it should be a breaking change that gets introduced in MDA 3.0.

IAlibay avatar Oct 31 '21 11:10 IAlibay

Moving to 2.3.0 since cython 3.0 is still in alpha

IAlibay avatar May 16 '22 12:05 IAlibay

cython 3.0 is staying in alpha for quite a while...

orbeckst avatar May 21 '22 09:05 orbeckst

Cython 3.0 is still in alpha, re-targetting 2.4.0.

IAlibay avatar Aug 27 '22 19:08 IAlibay

Cython 3.0 is still in alpha, bumping to 2.5.0.

IAlibay avatar Nov 04 '22 20:11 IAlibay

PR #4129 solved the array problem. The only other thing that this PR does is to get rid of the use of the deprecated NumPy API. However, this requires Cython 3.x so cannot be done in a backward-compatible manner.

I don't think it's worthwhile keeping the PR open for that little patch in setup.py so I am closing it.

orbeckst avatar May 01 '23 15:05 orbeckst