./lang/py-hy, Lisp and Python love each other

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 0.29.0, Package name: py312-hy-0.29.0, Maintainer: pkgsrc-users

Hy is a Python <--> Lisp layer. It helps make things work nicer, and lets Python
and the Hy lisp variant play nice together.


Required to run:
[devel/py-setuptools] [devel/py-funcparserlib] [devel/py-rply] [devel/py-astor] [comms/py-colorama] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 103.438 KB

Version history: (Expand)


CVS history: (Expand)


   2023-03-29 11:34:15 by Thomas Klausner | Files touched by this commit (96)
Log message:
*: use PYTHON_VERSION instead of _PYTHON_VERSION
   2022-11-29 23:09:15 by Thomas Klausner | Files touched by this commit (1)
Log message:
py-hy: add missing tool dependency on py-wheel
   2022-11-26 20:53:38 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
py-hy: updated to 0.25.0

0.25.0 (released 2022-11-08)
==============================

Breaking Changes
------------------------------
* `dfor` no longer requires brackets around its final arguments, so
  `(dfor x (range 5) [x (* 2 x)])` is now `(dfor x (range 5) x (* 2
  x))`.
* `except*` (PEP 654) is now recognized in `try`, and a placeholder
  macro for `except*` has been added.

Bug Fixes
------------------------------
* `__file__` should now be set the same way as in Python.
* `\N{…}` escape sequences are now recognized in f-strings.
* Fixed a bug with `python -O` where assertions were still partly
  evaluated.
* Fixed `hy.repr` of `slice` objects with non-integer arguments.

New Features
------------------------------
* Python 3.11 is now supported.

Misc. Improvements
------------------------------
* `hyc` now requires a command-line argument.
* `hyc` prints each path it writes bytecode to, and its messages now
  go to standard error instead of standard output.
   2022-01-04 21:55:40 by Thomas Klausner | Files touched by this commit (1595)
Log message:
*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS
   2021-10-26 12:51:59 by Nia Alarie | Files touched by this commit (260)
Log message:
lang: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

The following distfiles could not be fetched (possibly fetched
conditionally?):

./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-aarch64-unknown-linux-gnu.tar.gz
./lang/rust-bin/distinfo \ 
rust-bin-1.54.0/rust-1.54.0-aarch64-unknown-linux-musl.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-aarch64-unknown-netbsd.tar.gz
./lang/rust-bin/distinfo \ 
rust-bin-1.54.0/rust-1.54.0-armv7-unknown-netbsd-eabihf.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-i686-unknown-linux-gnu.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-powerpc-unknown-netbsd90.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-sparc64-unknown-netbsd.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-x86_64-apple-darwin.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-x86_64-unknown-freebsd.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-x86_64-unknown-linux-gnu.tar.gz
./lang/rust-bin/distinfo rust-bin-1.54.0/rust-1.54.0-x86_64-unknown-linux-musl.tar.gz
./lang/smlnj/distinfo smlnj-110.73/boot.ppc-unix.tgz
./lang/smlnj/distinfo smlnj-110.73/boot.sparc-unix.tgz
./lang/oracle-jre8/distinfo jce_policy-8.zip
./lang/oracle-jre8/distinfo jre-8u202-linux-i586.tar.gz
./lang/oracle-jre8/distinfo jre-8u202-linux-x64.tar.gz
./lang/oracle-jre8/distinfo jre-8u202-macosx-x64.tar.gz
./lang/oracle-jre8/distinfo jre-8u202-solaris-x64.tar.gz
./lang/oracle-jdk8/distinfo jdk-8u202-linux-i586.tar.gz
./lang/oracle-jdk8/distinfo jdk-8u202-linux-x64.tar.gz
./lang/oracle-jdk8/distinfo jdk-8u202-solaris-x64.tar.gz
./lang/ghc80/distinfo ghc-7.10.3-boot-x86_64-unknown-solaris2.tar.xz
./lang/ghc80/distinfo ghc-8.0.2-boot-i386-unknown-freebsd.tar.xz
./lang/ghc80/distinfo ghc-8.0.2-boot-x86_64-unknown-freebsd.tar.xz
./lang/gcc5-aux/distinfo ada-bootstrap.i386.freebsd.100B.tar.bz2
./lang/gcc5-aux/distinfo ada-bootstrap.i386.freebsd.84.tar.bz2
./lang/gcc5-aux/distinfo ada-bootstrap.x86_64.dragonfly.41.tar.bz2
./lang/gcc5-aux/distinfo ada-bootstrap.x86_64.freebsd.100B.tar.bz2
./lang/gcc5-aux/distinfo ada-bootstrap.x86_64.freebsd.84.tar.bz2
./lang/gcc5-aux/distinfo ada-bootstrap.x86_64.solaris.511.tar.bz2
./lang/rust/distinfo rust-1.53.0-aarch64-apple-darwin.tar.gz
./lang/rust/distinfo rust-1.53.0-aarch64-unknown-linux-gnu.tar.gz
./lang/rust/distinfo rust-1.53.0-aarch64-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-1.53.0-aarch64_be-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-1.53.0-arm-unknown-linux-gnueabihf.tar.gz
./lang/rust/distinfo rust-1.53.0-armv7-unknown-linux-gnueabihf.tar.gz
./lang/rust/distinfo rust-1.53.0-i686-unknown-linux-gnu.tar.gz
./lang/rust/distinfo rust-1.53.0-powerpc-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-1.53.0-powerpc-unknown-netbsd90.tar.gz
./lang/rust/distinfo rust-1.53.0-sparc64-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-1.53.0-x86_64-apple-darwin.tar.gz
./lang/rust/distinfo rust-1.53.0-x86_64-unknown-freebsd.tar.gz
./lang/rust/distinfo rust-1.53.0-x86_64-unknown-illumos.tar.gz
./lang/rust/distinfo rust-1.53.0-x86_64-unknown-linux-gnu.tar.gz
./lang/rust/distinfo rust-std-1.53.0-aarch64-apple-darwin.tar.gz
./lang/rust/distinfo rust-std-1.53.0-aarch64-unknown-linux-gnu.tar.gz
./lang/rust/distinfo rust-std-1.53.0-aarch64-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-std-1.53.0-aarch64_be-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-std-1.53.0-arm-unknown-linux-gnueabihf.tar.gz
./lang/rust/distinfo rust-std-1.53.0-armv7-unknown-linux-gnueabihf.tar.gz
./lang/rust/distinfo rust-std-1.53.0-i686-unknown-linux-gnu.tar.gz
./lang/rust/distinfo rust-std-1.53.0-powerpc-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-std-1.53.0-powerpc-unknown-netbsd90.tar.gz
./lang/rust/distinfo rust-std-1.53.0-sparc64-unknown-netbsd.tar.gz
./lang/rust/distinfo rust-std-1.53.0-x86_64-apple-darwin.tar.gz
./lang/rust/distinfo rust-std-1.53.0-x86_64-unknown-freebsd.tar.gz
./lang/rust/distinfo rust-std-1.53.0-x86_64-unknown-linux-gnu.tar.gz
./lang/smlnj11072/distinfo smlnj-110.72/boot.ppc-unix.tgz
./lang/smlnj11072/distinfo smlnj-110.72/boot.sparc-unix.tgz
./lang/ghc84/distinfo ghc-8.0.2-boot-x86_64-unknown-solaris2.tar.xz
./lang/ghc84/distinfo ghc-8.4.4-boot-i386-unknown-freebsd.tar.xz
./lang/ghc84/distinfo ghc-8.4.4-boot-x86_64-apple-darwin.tar.xz
./lang/ghc84/distinfo ghc-8.4.4-boot-x86_64-unknown-freebsd.tar.xz
./lang/ghc7/distinfo ghc-7.10.3-boot-i386-unknown-freebsd.tar.xz
./lang/ghc7/distinfo ghc-7.6.3-boot-i386-unknown-solaris2.tar.xz
./lang/ghc7/distinfo ghc-7.6.3-boot-powerpc-apple-darwin.tar.xz
./lang/ghc7/distinfo ghc-7.6.3-boot-x86_64-unknown-solaris2.tar.xz
./lang/ghc90/distinfo ghc-8.10.4-boot-x86_64-unknown-solaris2.tar.xz
./lang/ghc90/distinfo ghc-9.0.1-boot-aarch64-unknown-netbsd.tar.xz
./lang/ghc90/distinfo ghc-9.0.1-boot-i386-unknown-freebsd.tar.xz
./lang/ghc90/distinfo ghc-9.0.1-boot-x86_64-apple-darwin.tar.xz
./lang/ghc90/distinfo ghc-9.0.1-boot-x86_64-unknown-freebsd.tar.xz
./lang/openjdk8/distinfo \ 
openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz
./lang/openjdk8/distinfo \ 
openjdk7/bootstrap-jdk-1.7.76-netbsd-7-sparc64-20150301.tar.xz
./lang/openjdk8/distinfo \ 
openjdk7/bootstrap-jdk-1.8.181-netbsd-8-aarch64-20180917.tar.xz
./lang/openjdk8/distinfo \ 
openjdk7/bootstrap-jdk7u60-bin-dragonfly-3.6-amd64-20140719.tar.bz2
./lang/openjdk8/distinfo \ 
openjdk7/bootstrap-jdk7u60-bin-dragonfly-3.8-amd64-20140719.tar.bz2
./lang/go-bin/distinfo go1.14.2.darwin-amd64.tar.gz
./lang/go-bin/distinfo go1.14.2.linux-386.tar.gz
./lang/go-bin/distinfo go1.14.2.linux-amd64.tar.gz
./lang/go-bin/distinfo go1.14.2.linux-arm64.tar.gz
./lang/go-bin/distinfo go1.14.2.linux-armv6l.tar.gz
./lang/go-bin/distinfo go1.14.2.netbsd-arm64.tar.gz
./lang/go-bin/distinfo go1.16beta1.darwin-arm64.tar.gz
./lang/gcc6-aux/distinfo ada-bootstrap.i386.freebsd.100B.tar.bz2
./lang/gcc6-aux/distinfo ada-bootstrap.x86_64.dragonfly.41.tar.bz2
./lang/gcc6-aux/distinfo ada-bootstrap.x86_64.freebsd.100B.tar.bz2
./lang/gcc6-aux/distinfo ada-bootstrap.x86_64.freebsd.84.tar.bz2
./lang/gcc6-aux/distinfo ada-bootstrap.x86_64.solaris.511.tar.bz2
./lang/ghc810/distinfo ghc-8.8.4-boot-x86_64-unknown-solaris2.tar.xz
./lang/sun-jre7/distinfo UnlimitedJCEPolicyJDK7.zip
./lang/sun-jre7/distinfo jre-7u80-linux-x64.tar.gz
./lang/sun-jre7/distinfo jre-7u80-solaris-i586.tar.gz
./lang/sun-jre7/distinfo jre-7u80-solaris-x64.tar.gz
./lang/ghc88/distinfo ghc-8.4.4-boot-i386-unknown-freebsd.tar.xz
./lang/ghc88/distinfo ghc-8.4.4-boot-x86_64-apple-darwin.tar.xz
./lang/ghc88/distinfo ghc-8.4.4-boot-x86_64-unknown-freebsd.tar.xz
./lang/ghc88/distinfo ghc-8.4.4-boot-x86_64-unknown-solaris2.tar.xz
./lang/gcc-aux/distinfo ada-bootstrap.i386.dragonfly.36A.tar.bz2
./lang/gcc-aux/distinfo ada-bootstrap.i386.freebsd.100B.tar.bz2
./lang/gcc-aux/distinfo ada-bootstrap.i386.freebsd.84.tar.bz2
./lang/gcc-aux/distinfo ada-bootstrap.x86_64.dragonfly.36A.tar.bz2
./lang/gcc-aux/distinfo ada-bootstrap.x86_64.freebsd.100B.tar.bz2
./lang/gcc-aux/distinfo ada-bootstrap.x86_64.freebsd.84.tar.bz2
./lang/gcc-aux/distinfo ada-bootstrap.x86_64.solaris.511.tar.bz2
./lang/gcc6/distinfo ecj-4.5.jar
./lang/openjdk11/distinfo bootstrap-jdk-1.11.0.7.10-netbsd-9-aarch64-20200509.tar.xz
./lang/sun-jdk7/distinfo jdk-7u80-linux-x64.tar.gz
./lang/sun-jdk7/distinfo jdk-7u80-solaris-i586.tar.gz
./lang/sun-jdk7/distinfo jdk-7u80-solaris-x64.tar.gz
   2021-10-07 16:21:17 by Nia Alarie | Files touched by this commit (282)
Log message:
lang: Remove SHA1 hashes for distfiles
   2021-03-20 20:14:57 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-hy: updated to 0.20.0

0.20.0 (released 2021-01-25)
==============================

Removals
------------------------------
* Python 3.5 is no longer supported.

New Features
------------------------------
* `let` macro now supports extended iterable unpacking syntax.
* New contrib module `pprint`, a Hy equivalent of `python.pprint`.

Bug Fixes
------------------------------
* Fixed a bug that made `hy.eval` from Python fail on `require`.
* Fixed a bug that prevented pickling of keyword objects.
* Fixed a compiler crash from `setv` with an odd number of arguments in
  `defclass`.

0.19.0 (released 2020-07-16)
==============================

Breaking Changes
------------------------------
* `parse-args` is no longer implemented with `eval`; so e.g. you should
  now say `:type int` instead of `:type 'int`.

New Features
------------------------------
* Python 3.9 is now supported.

Bug Fixes
------------------------------
* Improved support for nesting anaphoric macros by only applying
  symbol replacement where absolutely necessary.
* Quoted f-strings are no longer evaluated prematurely.
* 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.
* Fixed various bugs in command-line option parsing.
   2020-03-27 16:27:41 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
py-hy: updated to 0.18.0

0.18.0
==============================

Removals
------------------------------
* Python 2 is no longer supported.
* Support for attribute lists in `defclass` has been removed. Use `setv`
  and `defn` instead.
* Literal keywords are no longer parsed differently in calls to functions
  with certain names.
* `hy.contrib.multi` has been removed. Use `cond` or the PyPI package
  `multipledispatch` instead.

Other Breaking Changes
------------------------------
* `HySequence` is now a subclass of `tuple` instead of `list`.
  Thus, a `HyList` will never be equal to a `list`, and you can't
  use `.append`, `.pop`, etc. on a `HyExpression` or `HyList`.

New Features
------------------------------
* Added special forms `py` to `pys` that allow Hy programs to include
  inline Python code.
* Added a special form `cmp` for chained comparisons.
* All augmented assignment operators (except `%=` and `^=`) now allow
  more than two arguments.
* Added support for function annotations (PEP 3107) and variable
  annotations (PEP 526).
* Added a function `parse-args` as a wrapper for Python's `argparse`.

Bug Fixes
------------------------------
* Statements in the second argument of `assert` are now executed.
* Fixed a bug that caused the condition of a `while` to be compiled
  twice.
* `in` and `not-in` now allow more than two arguments, as in Python.
* `hy2py` can now handle format strings.
* Fixed crashes from inaccessible history files.
* Removed an accidental import from the internal Python module `test`.
* Fixed a swarm of bugs in `hy.extra.anaphoric`.

Misc. Improvements
------------------------------
* Replaced the dependency `clint` with `colorama`.

0.17.0
==============================

**Warning**: Hy 0.17.x will be the last Hy versions to support Python 2,
and we expect 0.17.0 to be the only release in this line. By the time
0.18.0 is released (in 2020, after CPython 2 has ceased being developed),
Hy will only support Python 3.

Removals
------------------------------
* Python 3.4 is no longer supported.

New Features
------------------------------
* Python 3.8 is now supported.
* Format strings with embedded Hy code (e.g., `f"The sum is {(+ x y)}"`)
  are now supported, even on Pythons earlier than 3.6.
* Added a special form `setx` to create Python 3.8 assignment expressions.
* Added new core functions `list?` and `tuple`.
* Gensyms now have a simpler format that's more concise when
  mangled (e.g., `_hyx_XsemicolonXfooXvertical_lineX1235` is now
  `_hyx_fooXUffffX1`).

Bug Fixes
------------------------------
* Fixed a crash caused by errors creating temporary files during
  bytecode compilation.

0.16.0
==============================

Removals
------------------------------
* Empty expressions (`()`) are no longer legal at the top level.

New Features
------------------------------
* `eval` / `hy_eval` and `hy_compile` now accept an optional `compiler`
  argument that enables the use of an existing `HyASTCompiler` instance.
* Keyword objects (not just literal keywords) can be called, as
  shorthand for `(get obj :key)`, and they accept a default value
  as a second argument.
* Minimal macro expansion namespacing has been implemented. As a result,
  external macros no longer have to `require` their own macro
  dependencies.
* Macros and tags now reside in module-level `__macros__` and `__tags__`
  attributes.

Bug Fixes
------------------------------
* Cleaned up syntax and compiler errors.
* You can now call `defmain` with an empty lambda list.
* `require` now compiles to Python AST.
* Fixed circular `require`\s.
* Fixed module reloading.
* Fixed circular imports.
* Fixed errors from `from __future__ import ...` statements and missing
  Hy module docstrings caused by automatic importing of Hy builtins.
* Fixed `__main__` file execution.
* Fixed bugs in the handling of unpacking forms in method calls and
  attribute access.
* Fixed crashes on Windows when calling `hy-repr` on date and time
  objects.
* Fixed a crash in `mangle` for some pathological inputs.
* Fixed incorrect mangling of some characters at low code points.
* Fixed a crash on certain versions of Python 2 due to changes in the
  standard module `tokenize`.

0.15.0
==============================

Removals
------------------------------
* Dotted lists, `HyCons`, `cons`, `cons?`, and `list*` have been
  removed. These were redundant with Python's built-in data structures
  and Hy's most common model types (`HyExpression`, `HyList`, etc.).
* `&key` is no longer special in lambda lists. Use `&optional` instead.
* Lambda lists can no longer unpack tuples.
* `ap-pipe` and `ap-compose` have been removed. Use threading macros and
  `comp` instead.
* `for/a` has been removed. Use `(for [:async ...] ...)` instead.
* `(except)` is no longer allowed. Use `(except [])` instead.
* `(import [foo])` is no longer allowed. Use `(import foo)` instead.

Other Breaking Changes
------------------------------
* `HyExpression`, `HyDict`, and `HySet` no longer inherit from `HyList`.
  This means you can no longer use alternative punctuation in place of
  square brackets in special forms (e.g. `(fn (x) ...)` instead of
  the standard `(fn [x] ...)`).
* Mangling rules have been overhauled; now, mangled names are
  always legal Python identifiers.
* `_` and `-` are now equivalent, even as single-character names.

  * The REPL history variable `_` is now `*1`.

* Non-shadow unary `=`, `is`, `<`, etc. now evaluate their argument
  instead of ignoring it.
* `list-comp`, `set-comp`, `dict-comp`, and `genexpr` have been replaced
  by `lfor`, `sfor`, `dfor`, and `gfor`, respectively, which use a new
  syntax and have additional features. All Python comprehensions can now
  be written in Hy.
* `&`-parameters in lambda lists must now appear in the same order that
  Python expects.
* Literal keywords now evaluate to themselves, and `HyKeyword` no longer
  inherits from a Python string type
* `HySymbol` no longer inherits from `HyString`.

New Features
------------------------------
* Python 3.7 is now supported.
* `while` and `for` are allowed to have empty bodies.
* `for` supports the various new clause types offered by `lfor`.
* `defclass` in Python 3 supports specifying metaclasses and other
  keyword arguments.
* Added `mangle` and `unmangle` as core functions.
* Added more REPL history variables: `*2` and `*3`.
* Added a REPL variable holding the last exception: `*e`.
* Added a command-line option `-E` per CPython.
* Added a new module `hy.model_patterns`.

Bug Fixes
------------------------------
* `hy2py` should now output legal Python code equivalent to the input Hy
  code in all cases.
* Fixed `(return)` so it can exit a Python 2 generator.
* Fixed a case where `->` and `->>` duplicated an argument.
* Fixed bugs that caused `defclass` to drop statements or crash.
* Fixed a REPL crash caused by illegal backslash escapes.
* `NaN` can no longer create an infinite loop during macro-expansion.
* Fixed a bug that caused `try` to drop expressions.
* The compiler now properly recognizes `unquote-splice`.
* Trying to import a dotted name is now a syntax error, as in Python.
* `defmacro!` now allows optional arguments.
* Fixed handling of variables that are bound multiple times in a single
  `let`.

Misc. Improvements
----------------------------
* `hy-repr` uses registered functions instead of methods.
* `hy-repr` supports more standard types.
* `macroexpand-all` will now expand macros introduced by a `require` in the body \ 
of a macro.