glass-dev / glass

Generator for Large Scale Structure
https://glass.readthedocs.io
MIT License
33 stars 8 forks source link

Run tests on Python 3.12 #133

Closed ntessore closed 8 months ago

ntessore commented 1 year ago

Python 3.12 has been released, it should be added to the test matrix.

ucapbba commented 8 months ago

Hi @ntessore , I have run tests on Python 3.12 from terminal. For Ubuntu 22 Python3.12 is a non-standard install (3.11 is default). Runnning pytest against this version, everything passes, but there is one new warning

test_fields.py::test_getcl /home/bradley/.local/lib/python3.12/site-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC). EPOCH = datetime.datetime.utcfromtimestamp(0)

I guess some external dependency also needs updating - I will look into that another time. I also tried to simulate a build by forking the repository and adding 3.12 to test.yml - the build fails with

INFO: pip is looking at multiple versions of glass to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement healpix>=2022.11.1 (from glass) (from versions: none)

So far I'm not sure where this error comes from

ntessore commented 8 months ago

I think this might be due to there not being Python 3.12 wheels for healpix. I have just released a new version with those, perhaps you can give it another try?

ucapbba commented 8 months ago

Hi @ntessore , since your update, the test passes