Bblfsh

Latest version: v4.2.0

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

Scan your dependencies

Page 1 of 5

4.2.0

* Adds supported languages with aliases: `supported_language_manifests` method.
* Adds `server_version` method to check out [`bblfshd`](https://github.com/bblfsh/bblfshd) version being used.
* Adds default timeout of 60 seconds for parsing a file.
* Removes CLI. If you are seeking for a terminal CLI check out our [`go-client`](https://github.com/bblfsh/go-client)
* Solves a bug that crashed the python interpreter when decoding empty bytes: 189

Examples

python
import bblfsh

client = bblfsh.BblfshClient("localhost:9432")
bblfshd version being used
client.server_version()
supported languages with aliases
client.supported_language_manifests()

Parse a file with no timeout
ctx = client.parse("file.py", mode=bblfsh.Modes.NATIVE, timeout = -1)
Parse a file with 60 seconds timeout
ctx = client.parse("file.py", mode=bblfsh.Modes.NATIVE)
Parse a file with 70 seconds tiemout
ctx = client.parse("file.py", mode=bblfsh.Modes.NATIVE, timeout = 70)

4.1.0

* Fixes memory leaks in `ResultContext.filter` method (native context was not getting deallocated after using the iterator)
* Bumps `libuast` version, which includes memory leak patches and a new iteration order: `ChildrenOrder`. Also ensures those iteration orders correspond to the ones present in `libuast`, lifting them from the native side.
* Adds managed context functionality:

context owned by libuast
ctx = client.parse(filename)

load to Python
ast = ctx.root.get()
if we had a method to rename some nodes, for example
modified_dict = rename_variables(ast)

context owned by Python
ctx = bblfsh.context(modified_dict)
... = ctx.filter("//uast:Identifier")

3.1.1

- Hotfix for the positional info getter.

3.1.0

- `Node` objects now expose the `filter` and `iterate` methods.
- CLI will no longer try to run `bblfshd` if a remote address is passed as an option.
- Added a `root` property to the response context (alias for `uast` and `ast`).
- Repository renamed to `python-client` for consistency.
- Fixes to v1 compatibility layer (thanks zurk!).

3.0.4

No functional changes are intended in this release.

This release fixes the setup for macOS (Darwin), addressing https://github.com/bblfsh/client-python/issues/156.

3.0.3

There are no functional changes in this release. It removes the "3.4" and "3.5" Python version tags from the PyPI metadata to document the implicit fact that we require Python ≥ 3.6 (see 153).

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.