Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Releases: bblfsh/python-client

v4.2.0

29 Oct 13:07
Compare
Choose a tag to compare
  • Adds supported languages with aliases: supported_language_manifests method.
  • Adds server_version method to check out 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
  • 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

11 Sep 15:20
Compare
Choose a tag to compare
  • 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")

v3.1.1

26 Jul 18:37
Compare
Choose a tag to compare
  • Hotfix for the positional info getter.

v3.1.0

25 Jul 11:40
Compare
Choose a tag to compare
  • 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!).

Fix library installation on macOS (Darwin)

03 May 15:31
788ceb1
Compare
Choose a tag to compare

No functional changes are intended in this release.

This release fixes the setup for macOS (Darwin), addressing #156.

v3.0.3

24 Apr 17:15
7049ac8
Compare
Choose a tag to compare

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

22 Apr 14:02
Compare
Choose a tag to compare
  • Update libuast to the latest version.

v3.0.1

19 Apr 14:29
Compare
Choose a tag to compare
  • Remove unnecessary requirement for GOPATH env when installing.

v3.0.0

25 Mar 08:53
1392e25
Compare
Choose a tag to compare
  • 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.

v2.12.7

17 Dec 17:05
3daf5c4
Compare
Choose a tag to compare
Update setup.py