Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed Feb 26, 2024
1 parent 1690531 commit f38d95b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion coconut/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4016,7 +4016,8 @@ def {builder_name}({expr_setnames_str}):

expr_setname_context["callbacks"].append(stmt_lambdef_callback)
if parent_setnames:
builder_args = "**({" + ", ".join('"' + name + '": ' + name for name in sorted(parent_setnames)) + "} | _coconut.locals())"
# use _coconut.dict to ensure it supports |
builder_args = "**(_coconut.dict(" + ", ".join(name + '=' + name for name in sorted(parent_setnames)) + ") | _coconut.locals())"
else:
builder_args = "**_coconut.locals()"
return builder_name + "(" + builder_args + ")"
Expand Down
14 changes: 8 additions & 6 deletions coconut/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,8 @@ def get_path_env_var(env_var, default):
("ipython", "py3;py<37"),
("ipython", "py==37"),
("ipython", "py==38"),
("ipython", "py>=39"),
("ipython", "py==39"),
("ipython", "py>=310"),
("ipykernel", "py<3"),
("ipykernel", "py3;py<38"),
("ipykernel", "py38"),
Expand Down Expand Up @@ -974,8 +975,8 @@ def get_path_env_var(env_var, default):
),
"xonsh": (
("xonsh", "py<36"),
("xonsh", "py>=36;py<38"),
("xonsh", "py38"),
("xonsh", "py>=36;py<39"),
("xonsh", "py39"),
),
"dev": (
("pre-commit", "py3"),
Expand Down Expand Up @@ -1032,25 +1033,26 @@ def get_path_env_var(env_var, default):
("ipykernel", "py38"): (6,),
("jedi", "py39"): (0, 19),
("pygments", "py>=39"): (2, 17),
("xonsh", "py38"): (0, 15),
("xonsh", "py39"): (0, 15),
("pytest", "py38"): (8,),
("async_generator", "py35"): (1, 10),
("exceptiongroup", "py37;py<311"): (1,),
("ipython", "py>=39"): (8, 22),
("ipython", "py>=310"): (8, 22),
"py-spy": (0, 3),
}

pinned_min_versions = {
# don't upgrade these; they break on Python 3.9
("numpy", "py34;py<39"): (1, 18),
("ipython", "py==39"): (8, 18),
# don't upgrade these; they break on Python 3.8
("ipython", "py==38"): (8, 12),
# don't upgrade these; they break on Python 3.7
("ipython", "py==37"): (7, 34),
("typing_extensions", "py==37"): (4, 7),
# don't upgrade these; they break on Python 3.6
("anyio", "py36"): (3,),
("xonsh", "py>=36;py<38"): (0, 11),
("xonsh", "py>=36;py<39"): (0, 11),
("pandas", "py36"): (1,),
("jupyter-client", "py36"): (7, 1, 2),
("typing_extensions", "py==36"): (4, 1),
Expand Down

0 comments on commit f38d95b

Please sign in to comment.