This repository has been archived by the owner on Mar 8, 2020. It is now read-only.
Releases: bblfsh/python-client
Releases · bblfsh/python-client
v4.2.0
- Adds supported languages with aliases:
supported_language_manifests
method. - Adds
server_version
method to check outbblfshd
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
- Solves a bug that crashed the python interpreter when decoding empty bytes: #189
Examples
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)
v4.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 inlibuast
, 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")
v3.1.1
v3.1.0
Node
objects now expose thefilter
anditerate
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 foruast
andast
). - Repository renamed to
python-client
for consistency. - Fixes to v1 compatibility layer (thanks @zurk!).
Fix library installation on macOS (Darwin)
No functional changes are intended in this release.
This release fixes the setup for macOS (Darwin), addressing #156.
v3.0.3
v3.0.2
v3.0.1
v3.0.0
-
First release using the new libuast in Go and the new XPath projection. The API also changed to reflect this and the client was completely rewritten.
-
Added a compatibility layer with previous versions in the
bblfsh.compat
module. Note that XPath expressions probably need to be updated anyway since the projection changed.