This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Repository navigation
Releases
Releases · bblfsh/python-client
v4.2.0
- Adds supported languages with aliases:
supported_language_manifestsmethod. - Adds
server_versionmethod to check outbblfshdversion 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.filtermethod (native context was not getting deallocated after using the iterator) - Bumps
libuastversion, 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
Nodeobjects now expose thefilteranditeratemethods.- CLI will no longer try to run
bblfshdif a remote address is passed as an option. - Added a
rootproperty to the response context (alias foruastandast). - Repository renamed to
python-clientfor consistency. - Fixes to v1 compatibility layer (thanks @zurk!).
Fix library installation on macOS (Darwin)
v3.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).
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.compatmodule. Note that XPath expressions probably need to be updated anyway since the projection changed.