Coconut

Latest version: v3.1.2

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

3.1.2

See Coconut's [documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for more information on all of the features listed below.

Bugfixes:
* 851, 852: Fixed comments inside of parentheses in the Jupyter kernel.

Language features:
* 846: `reduce`, `takewhile`, and `dropwhile` now support keyword arguments.
* 848: Class and data patterns now support keyword argument name elision.
* 847: New pattern-matching syntax for matching anonymous named tuples.

Compiler features:
* 843: Added compiler warnings for (some cases of) undefined variables.

3.1.1

See Coconut's [documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for more information on all of the features listed below.

Language features:
* 833: New `case def` syntax for more easily defining pattern-matching functions with many patterns.
* 811: New `f(name=)` syntax as a shorthand for `f(name=name)`, replacing the now deprecated `f(...=name)` syntax.
* 836: New `CoconutWarning` built-in used for Coconut runtime warnings.

Compiler features:
* 837: Coconut will now warn about implicit string concatenation and disable it completely with `--strict`.
* 718: Coconut will now warn about use of `addpattern def` without a prior `match def`. This was a previously-supported feature to make pattern-matching functions with many patterns easier to write, but the new recommended way to do that is now via `case def`.
* 785: Initial [pyright](https://github.com/microsoft/pyright) support via the `--pyright` flag.

Bugfixes:
* 839, 840: Fixed some f-string parsing issues.
* 834: Fixed `len` of empty `zip` objects.
* 830: Improved use of colored output.
* 757: Improved PEP 695 support on Python 3.12.

3.1.0

See Coconut's [documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for more information on all of the features listed below.

Language features:
* 814: Changes to statement lambda scoping rules, including capturing names introduced in the surrounding expression.
* 618: Changes to handling of pattern-matching function defaults including support for e.g. `match def f(x, y=x) = (x, y)`.
* 809: New array concatenation implicit partials (e.g. `[. ; a]`).
* 823: New `(x := .)` implicit partial syntax (only available in pipes).
* 807: New `lift_apart` built-in combinator.
* 813: New `(if)` operator function.
* 826 (thanks JayXon!): Better universalization and `fmap` support for `bytes` and `bytearray`.
* 816: Support for `xarray` to match existing `numpy`/`pandas` support.
* 817: New `to` argument to `all_equal`.
* 821 (thanks GolfingSuccess!): Expanded implicit function application syntax to support string literal methods.

Compiler features:
* 799: `coconut-run` and `coconut --run` now work on packages rather than just files.
* 812: Better formatting of Coconut exceptions.

Bugfixes:
* 810: Fixed an issue compiling certain syntax constructs in the Coconut Jupyter kernel.
* 818, 825 (thanks kg583, dokutan!): Fixed parsing of different Unicode line break characters.
* 822 (thanks JayXon!): Fixed parsing of Unicode backward pipe operators.
* 819, 820 (thanks kg583!): Fixed some incompatibilities between Python and Coconut syntax.

3.0.4

This is primarily a bugfix release to resolve 804. See Coconut's [documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for more information on all of the features listed below.

Language changes:
* 784: `where` statements now use temporary variable names to limit the scope of contained assignments.
* 795: New `async_map` function utilizing `anyio` to work with `asyncio` or `trio`.
* 793: New `mapreduce`, `collectby.using_threads`, `collectby.using_processes`, `mapreduce.using_threads`, and `mapreduce.using_processes` built-ins.
* 787: Support for `.method[index]` implicit partials.
* 749, 792: Some built-ins have been renamed for clarity (the old names will still work unless `--strict` is passed). Specifically:
- `recursive_iterator` -> `recursive_generator`
- `parallel_map` -> `process_map`
- `concurrent_map` -> `thread_map`
* 797: Partial application objects now preserve the original function's `__name__` attribute.
* 789: Coconut will automatically backport `ExceptionGroup` using the `exceptiongroup` module.

Compiler changes:
* 772: Substantial improvements to recompilation speed for most files.
* 798: New `api.find_packages` and `api.find_and_compile_packages` utilities for working with Coconut packages.
* 803: New `--fail-fast` option to fail upon the first error when compiling multiple files.
* 778: The `--history-file` command-line option has been removed; use `COCONUT_HISTORY_FILE` environment variable if you really need it.

Bugfixes:
* 804: Fixed an incompatibility with new `cPyparsing` versions.
* 781, 794: Improved formatting for compilation errors/warnings.
* 800: `override` now works in conjunction with `classmethod` and `staticmethod`.

3.0.3

See Coconut's [documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for more information on all of the features listed below.

New features:
* 738: New `and_then` and `and_then_await` built-ins for async function composition.

Language changes:
* 763: Lambdas now support fat arrows (`x => x`) as an alternative to skinny arrows (`x -> x`) to better distinguish them from type annotations. Skinny arrow lambdas will be deprecated at some later date.
* 756: Coconut now fully supports Python 3.12's enhanced `f`-string syntax on all targets.
* 773: `f`-strings with no expressions in them (e.g. `f"why does this have an f"` will now show a warning by default and an error on `--strict`.

Compiler changes:
* 761: `--line-numbers` are now on by default. Pass `--no-line-numbers` to turn them off.
* 768 (thanks kxmh42!): Automatic compilation now uses a cache directory rather than compiling files in-place; additionally, automatic compilation options can now be set via `coconut-run`.
* 767: New `--target psf` support for targeting all versions not considered end-of-life.
* 765 (thanks rtbs-dev!): New `coconut --jupyter install` command for easily installing all Jupyter kernels added as an alternative to the existing `coconut --jupyter` syntax.
* 766: Coconut now internally supports an incremental parsing mode that is used in some situations (e.g. in the Jupyter kernel) to substantially improve recompilation times.

Bugfixes:
* 759 (thanks Starwort!): `multiset` methods should now always return `multiset`s when the arguments are all `multiset`s rather than `Counter`s.
* 764 (thanks koraa!): An issue that caused function definitions to take much longer to compile when compiling from the interpreter has now been fixed.
* 762 (thanks Starwort!): Semicolon-separated commands should now always work properly on `xonsh`.
* 775: Coconut should no longer set the `MYPYPATH` to include the entire directory that Coconut has been installed into when running with `--mypy`.
* 777: Docstrings should now show up properly in any third-party tools that look at Coconut's stub files.

3.0.2

See Coconut's [documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for more information on all of the features listed below.

This is another patch release, mainly for 751 and 755.

New features:
* 753: `async with for` loops provide a simple syntax for implementing the recommended pattern for handling `async` generators.

Language changes:
* 752: `typing` imports will redirect to `typing_extensions` whenever possible to ensure you always get the latest implementation of `typing` objects on all versions.
* 754: `async` generators and some related utilities will now be automatically backported to 3.5 via the `async_generator` library.
* 748: Certain confusing Unicode operator alternatives removed.

Compiler changes:
* 750: `coconut.convenience` renamed to `coconut.api` (`coconut.convenience` is still available as an alias for backwards compatibility).

Bugfixes:
* 751: Coconut in `xonsh` will no longer throw an error in certain situations.
* 755: Due to a documentation rendering issue, previous 3.0.x releases weren't getting their documentation rendered successfully.

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.