brandonwillard: Is this fix actually for #1903?
Kodiologist: Yep, no idea how I came up with that number.
diff --git a/NEWS.rst b/NEWS.rst
index 8c97e0f1..b4bc08fe 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -20,6 +20,7 @@ Bug Fixes
 * Fixed a regression in the production of error messages for empty
   expressions.
 * Fixed a scoping bug for code executed with `hy -c`.
+* Fixed a bug in the compilation of multiple `require`\s.
 
 0.18.0
 ==============================
diff --git a/hy/compiler.py b/hy/compiler.py
index 91e86be2..9cf0d993 100755
--- a/hy/compiler.py
+++ b/hy/compiler.py
@@ -1213,6 +1213,7 @@ class HyASTCompiler(object):
                         [[HyString(k), HyString(v)] for k, v in assignments]),
                     HyKeyword('prefix'),
                     HyString(prefix)]).replace(expr))
+                ret += ret.expr_as_stmt()
 
         return ret
 

Hy repl doesn't open on clean install python 3.7
Did the following on a mac:

```
$ brew install python
$ python3
Python 3.7.0 ....
$ pip3 install hy
...
$ hy
-bash: /usr/local/bin/hy: /usr/local/opt/python3/bin/python3.5: bad interpreter: No such file or directory
```

When I ``cat `which hy``` I get:

```
#!/usr/local/opt/python3/bin/python3.5

# -*- coding: utf-8 -*-
import re
import sys

from hy.cmdline import hy_main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(hy_main())
```

Why is there a shebang line pointing to python 3.5? I can run ``python3 `which hy``` and everything (so far as I can tell) works just fine.

Tried with latest git (pip install git+...) and same issue.
`hy2py` doesn't work for `require` multiple modules
It seems that `hy2py` only generates the last module in `(require ...)`. It might be something wrong within `hy_compile` according to the generated AST.

Example source file `test.hy`:
```hy
(require
 [hy.contrib.loop [loop]]
 [hy.contrib.walk [let]])
```

Run with `hy2py -sa test.hy`:
```
HyExpression([
  HySymbol('do'),
  HyExpression([
    HySymbol('require'),
    HyList([
      HySymbol('hy.contrib.loop'),
      HyList([
        HySymbol('loop')])]),
    HyList([
      HySymbol('hy.contrib.walk'),
      HyList([
        HySymbol('let')])])])])


Module(
    body=[Import(names=[alias(name='hy.macros', asname=None)]),
        Expr(
            value=Call(
                func=Attribute(value=Attribute(value=Name(id='hy'), attr='macros'), attr='require'),
                args=[Str(s='hy.contrib.walk'), Name(id='None')],
                keywords=[
                    keyword(arg='assignments', value=List(elts=[List(elts=[Str(s='let'), Str(s='let')])])),
                    keyword(arg='prefix', value=Str(s=''))]))])


import hy.macros
hy.macros.require('hy.contrib.walk', None, assignments=[['let', 'let']],
    prefix='')
```
diff --git a/tests/compilers/test_ast.py b/tests/compilers/test_ast.py
index 20b9aaab..e3ce4de1 100644
--- a/tests/compilers/test_ast.py
+++ b/tests/compilers/test_ast.py
@@ -294,6 +294,17 @@ import a dotted name."""
     cant_compile("(require [spam [foo.bar]])")
 
 
+def test_ast_multi_require():
+    # https://github.com/hylang/hy/issues/1903
+    x = can_compile("""(require
+      [tests.resources.tlib [qplah]]
+      [tests.resources.macros [threadtail-set-cd]])""")
+    assert sum(1 for stmt in x.body if isinstance(stmt, ast.Expr)) == 2
+    dump = ast.dump(x)
+    assert "qplah" in dump
+    assert "threadtail" in dump
+
+
 def test_ast_good_get():
     "Make sure AST can compile valid get"
     can_compile("(get x y)")
@@ -482,7 +493,6 @@ def test_ast_unicode_vs_bytes():
     assert s('b"\\xa0"') == bytes([160])
 
 
-@pytest.mark.skipif(not PY36, reason='f-strings require Python 3.6+')
 def test_format_string():
     assert can_compile('f"hello world"')
     assert can_compile('f"hello {(+ 1 1)} world"')

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
3.8
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
appdirs==1.4.4
astor==0.8.1
babel==2.17.0
cachetools==5.5.2
certifi==2025.1.31
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
coverage==7.6.1
distlib==0.3.9
docutils==0.20.1
exceptiongroup==1.2.2
execnet==2.1.1
filelock==3.16.1
flake8==7.1.2
funcparserlib==1.0.1
-e git+https://github.com/hylang/hy.git@d5c7a1553271c8d448ebcf1770b73305606aeaf1#egg=hy
idna==3.10
imagesize==1.4.1
importlib_metadata==8.5.0
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==2.1.5
mccabe==0.7.0
packaging==24.2
platformdirs==4.3.6
pluggy==1.5.0
pycodestyle==2.12.1
pyflakes==3.2.0
Pygments==2.19.1
pyproject-api==1.8.0
pytest==8.3.5
pytest-asyncio==0.24.0
pytest-cov==5.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
pytz==2025.2
requests==2.32.3
rply==0.7.8
snowballstemmer==2.2.0
Sphinx==7.1.2
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==2.2.3
virtualenv==20.29.3
zipp==3.20.2

name: hy
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=24.2=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - appdirs==1.4.4
      - astor==0.8.1
      - babel==2.17.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - coverage==7.6.1
      - distlib==0.3.9
      - docutils==0.20.1
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - filelock==3.16.1
      - flake8==7.1.2
      - funcparserlib==1.0.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.5.0
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==2.1.5
      - mccabe==0.7.0
      - packaging==24.2
      - platformdirs==4.3.6
      - pluggy==1.5.0
      - pycodestyle==2.12.1
      - pyflakes==3.2.0
      - pygments==2.19.1
      - pyproject-api==1.8.0
      - pytest==8.3.5
      - pytest-asyncio==0.24.0
      - pytest-cov==5.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - pytz==2025.2
      - requests==2.32.3
      - rply==0.7.8
      - snowballstemmer==2.2.0
      - sphinx==7.1.2
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==1.0.4
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.1
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==2.2.3
      - virtualenv==20.29.3
      - zipp==3.20.2
prefix: /opt/conda/envs/hy

tests/compilers/test_ast.py::test_ast_multi_require
tests/compilers/test_ast.py::test_ast_bad_type tests/compilers/test_ast.py::test_empty_expr tests/compilers/test_ast.py::test_dot_unpacking tests/compilers/test_ast.py::test_ast_bad_if tests/compilers/test_ast.py::test_ast_valid_if tests/compilers/test_ast.py::test_ast_valid_unary_op tests/compilers/test_ast.py::test_ast_invalid_unary_op tests/compilers/test_ast.py::test_ast_bad_while tests/compilers/test_ast.py::test_ast_good_do tests/compilers/test_ast.py::test_ast_good_raise tests/compilers/test_ast.py::test_ast_raise_from tests/compilers/test_ast.py::test_ast_bad_raise tests/compilers/test_ast.py::test_ast_good_try tests/compilers/test_ast.py::test_ast_bad_try tests/compilers/test_ast.py::test_ast_good_except tests/compilers/test_ast.py::test_ast_bad_except tests/compilers/test_ast.py::test_ast_good_assert tests/compilers/test_ast.py::test_ast_bad_assert tests/compilers/test_ast.py::test_ast_good_global tests/compilers/test_ast.py::test_ast_bad_global tests/compilers/test_ast.py::test_ast_good_nonlocal tests/compilers/test_ast.py::test_ast_bad_nonlocal tests/compilers/test_ast.py::test_ast_good_defclass tests/compilers/test_ast.py::test_ast_good_defclass_with_metaclass tests/compilers/test_ast.py::test_ast_bad_defclass tests/compilers/test_ast.py::test_ast_good_lambda tests/compilers/test_ast.py::test_ast_bad_lambda tests/compilers/test_ast.py::test_ast_good_yield tests/compilers/test_ast.py::test_ast_bad_yield tests/compilers/test_ast.py::test_ast_import_mangle_dotted tests/compilers/test_ast.py::test_ast_good_import_from tests/compilers/test_ast.py::test_ast_require tests/compilers/test_ast.py::test_ast_import_require_dotted tests/compilers/test_ast.py::test_ast_good_get tests/compilers/test_ast.py::test_ast_bad_get tests/compilers/test_ast.py::test_ast_good_cut tests/compilers/test_ast.py::test_ast_bad_cut tests/compilers/test_ast.py::test_ast_good_take tests/compilers/test_ast.py::test_ast_good_drop tests/compilers/test_ast.py::test_ast_good_assoc tests/compilers/test_ast.py::test_ast_bad_assoc tests/compilers/test_ast.py::test_ast_bad_with tests/compilers/test_ast.py::test_ast_valid_while tests/compilers/test_ast.py::test_ast_valid_for tests/compilers/test_ast.py::test_nullary_break_continue tests/compilers/test_ast.py::test_ast_expression_basics tests/compilers/test_ast.py::test_ast_anon_fns_basics tests/compilers/test_ast.py::test_ast_non_decoratable tests/compilers/test_ast.py::test_ast_lambda_lists tests/compilers/test_ast.py::test_ast_print tests/compilers/test_ast.py::test_ast_tuple tests/compilers/test_ast.py::test_lambda_list_keywords_rest tests/compilers/test_ast.py::test_lambda_list_keywords_kwargs tests/compilers/test_ast.py::test_lambda_list_keywords_kwonly tests/compilers/test_ast.py::test_lambda_list_keywords_mixed tests/compilers/test_ast.py::test_missing_keyword_argument_value tests/compilers/test_ast.py::test_ast_unicode_strings tests/compilers/test_ast.py::test_ast_unicode_vs_bytes tests/compilers/test_ast.py::test_format_string tests/compilers/test_ast.py::test_ast_bracket_string tests/compilers/test_ast.py::test_compile_error tests/compilers/test_ast.py::test_for_compile_error tests/compilers/test_ast.py::test_attribute_access tests/compilers/test_ast.py::test_attribute_empty tests/compilers/test_ast.py::test_bad_setv tests/compilers/test_ast.py::test_defn tests/compilers/test_ast.py::test_setv_builtins tests/compilers/test_ast.py::test_top_level_unquote tests/compilers/test_ast.py::test_lots_of_comment_lines tests/compilers/test_ast.py::test_compiler_macro_tag_try tests/compilers/test_ast.py::test_ast_good_yield_from tests/compilers/test_ast.py::test_ast_bad_yield_from tests/compilers/test_ast.py::test_eval_generator_with_return tests/compilers/test_ast.py::test_futures_imports tests/compilers/test_ast.py::test_inline_python
hy/compiler.py NEWS.rst
hy/compiler.py NEWS.rst