hylang / hy

A dialect of Lisp that's embedded in Python
http://hylang.org
Other
5.14k stars 372 forks source link

Support Python 3.13 #2602

Closed Kodiologist closed 2 months ago

Kodiologist commented 2 months ago
Kodiologist commented 2 months ago

All tests pass on my machine with Python 3.13.0rc2, so I suspect the reason they don't pass on GitHub Actions is that GitHub is using 3.13.0rc1. @scauligi Would you mind trying the test suite with 3.13.0rc2 on your machine?

scauligi commented 2 months ago

I'm seeing similar errors even with 3.13.0rc2; the errors all seem to be discrepancies in the number/format of ^^^^ indicators in the error messages from Python.

Kodiologist commented 2 months ago

Great, so now I gotta figure out why my machine insists on futzing with the error underlines.

Kodiologist commented 2 months ago

Thanks for checking, though.

scauligi commented 2 months ago

Not sure if it matters, but I'm running on MacOS (ARM64)

Kodiologist commented 2 months ago

Okay, that should work. I think my different results earlier were probably just from using the wrong virtual environment, but man, I always hate having to work with Hy's exception-filtering code, or the tests for it.

tianon commented 2 months ago

I can test this without too much hassle -- is there anything in particular you wanted me to try? :eyes:

$ docker run -it --rm --pull=always python:3.13-rc-slim bash
3.13-rc-slim: Pulling from library/python
Digest: sha256:d9520f9ea0fdb8c3b5bccbf9eb0cb3c0aace74194b032104de3f99be47f34cb5
Status: Image is up to date for python:3.13-rc-slim
root@f8f84ce5e7ec:/# pip install https://github.com/hylang/hy/archive/7f04b5e45fd20e62124ab8cb55c4ce94daac1bb0.tar.gz
Collecting https://github.com/hylang/hy/archive/7f04b5e45fd20e62124ab8cb55c4ce94daac1bb0.tar.gz
  Downloading https://github.com/hylang/hy/archive/7f04b5e45fd20e62124ab8cb55c4ce94daac1bb0.tar.gz
     | 456.0 kB 3.0 MB/s 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting funcparserlib~=1.0 (from hy==0.0.0)
  Using cached funcparserlib-1.0.1-py2.py3-none-any.whl.metadata (7.1 kB)
Using cached funcparserlib-1.0.1-py2.py3-none-any.whl (17 kB)
Building wheels for collected packages: hy
  Building wheel for hy (pyproject.toml) ... done
  Created wheel for hy: filename=hy-0.0.0-py3-none-any.whl size=115496 sha256=181831e282f62ef840f3205560c6e71030676381ee112b6cae6c09746923f150
  Stored in directory: /tmp/pip-ephem-wheel-cache-culaw257/wheels/7a/17/27/1cb36c472b3691ab634654d6d10cf9b3a1327d15e456817d4d
Successfully built hy
Installing collected packages: funcparserlib, hy
Successfully installed funcparserlib-1.0.1 hy-0.0.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
root@f8f84ce5e7ec:/# hy
Hy unreleased using CPython(main) 3.13.0rc2 on Linux
=> (+ 2 2)
4

(this test was on 7f04b5e45fd20e62124ab8cb55c4ce94daac1bb0 from this PR :+1:)

Kodiologist commented 2 months ago

No, I think all's well now.