glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
740 stars 153 forks source link

Dependency on h5py causing incompatibility with Python 3.11 #2340

Closed pllim closed 2 years ago

pllim commented 2 years ago

https://github.com/glue-viz/glue/blob/b8f51d8e849e7c9ebceab5bffe623b4e46e20094/setup.cfg#L44

will cause downstream packages to not able to install in Python 3.11 even though they do not use h5py until this issue is fixed:

Related problem:

astrofrog commented 2 years ago

@dhomeier maybe we can just mark the dependency as being conditional on python<3.11?

dhomeier commented 2 years ago

Is this still not fixed? Installing h5py=3.7.0 worked just fine e.g. in https://github.com/glue-viz/glue/actions/runs/3267646674/jobs/5373107881 .

pllim commented 2 years ago

3.7 was released back in May. It didn't work when I tried a few weeks ago but I am trying again now with the released version.

pllim commented 2 years ago

Though the point is... why do I even have to bother? Jdaviz does not use HDF5.

dhomeier commented 2 years ago

OK I'll see if it's just to keep those tests from complaining (but it really should be in all and tests extras then), or if there are some deeper-lying problems as with the glue-astronomy translators. Most tests do check for install status of h5py, but I see some failures related to data_factories – no obvious connection to HDF5 files, though.

astrofrog commented 2 years ago

Though the point is... why do I even have to bother? Jdaviz does not use HDF5.

But glue does - and jdaviz made the choice to depend on glue. We can't remove dependencies that give glue users a good user experience just because they aren't used by jdaviz. Maybe one day if pip supports the ability to do [minimal] (see https://github.com/astropy/astropy/issues/12448#issuecomment-1102850242) then that will help?

pllim commented 2 years ago

"minimal" would be nice, but right now, it doesn't make sense for Jdaviz to build h5py from source in its CI and I am not sure when h5py would release wheel for Python 3.11. Is HDF5 a compulsory file format for Glue? That is unfortunate.

astrofrog commented 2 years ago

We do want to install h5py by default for glue users but of course since there are no wheels right now we should not require it on Python 3.11 yet if it doesn't install easily from source, which is what I mentioned in https://github.com/glue-viz/glue/issues/2340#issuecomment-1289518970 - I just meant that we can't remove h5py as a dependency altogether.

pllim commented 2 years ago

OK, see https://github.com/glue-viz/glue/pull/2341

dhomeier commented 2 years ago

There are the [recommended] etc. install options, but not having everything with pip install glueviz obviously still has the potential for confusion, as in #2336.

dhomeier commented 2 years ago

h5py wheels are coming along in h5py/h5py#2165

pllim commented 2 years ago

Addressed by #2321