Opened 5 months ago

Closed 4 months ago

#68929 closed update (fixed)

py-cython: update to 3.x

Reported by: jmroot (Joshua Root) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Schamschula (Marius Schamschula), someuser12
Port: py-cython py-cython-devel

Description

Cython 3 has been out for several months now, and a number of projects have started requiring it. I would suggest we update py-cython to 3.0.6 immediately, and deal with any incompatibilities as they arise. For anything that can't be expediently patched into compatibility, we can create a separate port for the old version that installs into a non-conflicting location, and point ports at it via PATH/PYTHONPATH.

Change History (21)

comment:1 Changed 5 months ago by Schamschula (Marius Schamschula)

It has been available as py-cython-devel. Unfortunately, there are numerous packages that are incompatible with py-cython >= 3.0.0.

comment:2 Changed 5 months ago by jmroot (Joshua Root)

If you can provide a list of ports that you know to be incompatible, I'll start moving them over to the compatibility version.

comment:3 Changed 5 months ago by Schamschula (Marius Schamschula)

For example py-numpy and py-pandas.

comment:4 Changed 5 months ago by jmroot (Joshua Root)

It looks like the current numpy release is compatible.

comment:5 Changed 5 months ago by jmroot (Joshua Root)

In bf7e32c1d56c2ca8d5665104e48032d1643f0e48/macports-ports (master):

New port: py-cython-compat

See: #68929

comment:6 Changed 5 months ago by jmroot (Joshua Root)

comment:7 Changed 5 months ago by Schamschula (Marius Schamschula)

Well, This sound like a project

port echo depends:py311-cython | wc -w 
      69
port echo depends:py311-cython        
py-cython                       
py-cython-compat                
py-cython-devel                 
py311-blis                      
py311-cymem                     
py311-fastavro                  
py311-fugashi                   
py311-murmurhash                
py311-numpy                     
py311-preshed                   
py311-pyarrow                   
py311-srsly                     
py311-thinc                     
py311-tifffile                  
py311-zope-hookable             
gobject-introspection           
gobject-introspection-devel     
py311-astropy                   
py311-bigfloat                  
py311-blosc2                    
py311-cairo                     
py311-cartopy                   
py311-cchardet                  
py311-cftime                    
py311-coolprop                  
py311-cytoolz                   
py311-debugpy                   
py311-editdistance              
py311-event                     
py311-fiona                     
py311-fonttools                 
py311-gssapi                    
py311-h5py                      
py311-hdbscan                   
py311-hdf5plugin                
py311-imagecodecs               
py311-libdnet                   
py311-memprof                   
py311-mpi4py                    
py311-msgpack                   
py311-ndindex                   
py311-netcdf4                   
py311-networkit                 
py311-openpyxl                  
py311-pandas                    
py311-peewee                    
py311-petsc4py                  
py311-plumed                    
py311-pydantic                  
py311-pyFAI                     
py311-pypcap                    
py311-pyproj                    
py311-pytensor                  
py311-pywavelets                
py311-rasterio                  
py311-rawpy                     
py311-rencode                   
py311-scikit-image              
py311-scikit-learn              
py311-shapely                   
py311-slepc4py                  
py311-sqlalchemy                
py311-statsmodels               
py311-tables                    
py311-vispy                     
py311-yaml                      
vapoursynth                     
py311-spyder                    
recode           

Of course this also lists the packages that depend on py-cython-devel. E.g, among others, I already have py311-tifffile able to use either version.

comment:8 Changed 5 months ago by jmroot (Joshua Root)

For reference, ports that either depend on py-cython-devel or are known to be waiting on cython 3 before they can be updated:

py-astropy
py-msgpack
py-vispy
py-yarl

comment:9 Changed 5 months ago by jmroot (Joshua Root)

Last edited 5 months ago by jmroot (Joshua Root) (previous) (diff)

comment:12 Changed 5 months ago by jmroot (Joshua Root)

In bd5d7d8c809ad317c5dbfa5e89543f1a6c8dd48f/macports-ports (master):

py-h5py: use py-cython-compat (https://github.com/macports/macports-ports/pull/21860)

This helps clear the way for py-cython to be updated to 3.x.

See: #68929

comment:13 Changed 5 months ago by jmroot (Joshua Root)

In 46603f582cbf51ee4b3c54bdb333d3cb30e96cfa/macports-ports (master):

py-pandas: use py-cython-compat

This helps clear the way for py-cython to be updated to 3.x.

See: #68929

comment:14 Changed 5 months ago by jmroot (Joshua Root)

These ports will be compatible with Cython 3 when updated to a newer version. (A number of them actually started requiring Cython>=3.)

py-blosc2
py-coolprop
py-fastavro
py-fiona
py-matplotlib-basemap
py-msgpack
py-petsc4py
py-pymatgen
py-pyproj
py-pysam
py-pywavelets
py-scikit-image
py-shapely
py-statsmodels
py-tables

I believe the rest of the dependents are either Cython 3 compatible, or have been fixed to use py-cython-compat, or are broken for other reasons.

comment:15 Changed 5 months ago by cquike

Thanks a lot for fixing this! Do I understand correctly that for numpy there is a need still to bump it to the latest version so that it is compatible with cython 3? Or is the current version in macports 1.26.2 actually compatible with cython 3 and therefore it will work just fine when py-cython is moved to 3.x? Thanks!

comment:16 Changed 5 months ago by jmroot (Joshua Root)

So numpy 1.26.2 is compatible with Cython 3 and will be fine, but some of the py-numpy subports for older python versions are not and will need to continue to use py-cython-compat probably as long as they exist.

comment:17 Changed 5 months ago by jmroot (Joshua Root)

In 1aba88d3c5bd1be41974fa01e05c23bffa0afb4d/macports-ports (master):

py-yaml: use py-cython-compat

This helps clear the way for py-cython to be updated to 3.x.

See: #68929

comment:18 Changed 5 months ago by jmroot (Joshua Root)

In 39b3a11d0f33fafb3efe786cde3ec6cdb1e788c3/macports-ports (master):

py-numpy: build older versions with py-cython-compat

This helps clear the way for py-cython to be updated to 3.x.

See: #68929

comment:19 Changed 4 months ago by someuser12

Cc: someuser12 added

comment:20 Changed 4 months ago by jmroot (Joshua Root)

I think everything that can be updated in advance has been. The rest either require Cython 3 or depend on something that does.

comment:21 Changed 4 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In abd441f94f5176c33e86dfc3166d0ee4d1c80fb1/macports-ports (master):

py-cython: update to 3.0.7, replacing py-cython-devel

Closes: #68929

Note: See TracTickets for help on using tickets.