Skip to content

Commit

Permalink
Fixed client flag to default to True on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Oct 31, 2019
1 parent 455ae26 commit 8d00835
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/perspective/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0, 4, 0, 'rc', 1
current_version = 0, 4, 0, 'rc', 2
commit = False
tag = False
parse = (?P<major>\d+)\,\ (?P<minor>\d+)\,\ (?P<patch>\d+)\,\ \'(?P<release>\S+)\'\,\ (?P<build>\d+)
Expand Down
2 changes: 1 addition & 1 deletion python/perspective/perspective/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
])

# DO NOT EDIT THIS DIRECTLY! It is managed by bumpversion
version_info = VersionInfo(0, 4, 0, 'rc', 1)
version_info = VersionInfo(0, 4, 0, 'rc', 2)

_specifier_ = {'alpha': 'alpha', 'beta': 'beta', 'rc': 'rc', 'final': ''}

Expand Down
5 changes: 3 additions & 2 deletions python/perspective/perspective/core/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from .data import deconstruct_pandas
from .exception import PerspectiveError
from .viewer import PerspectiveViewer
from ..table import Table
from ..table import Table, is_libpsp


class DateTimeStringEncoder(json.JSONEncoder):
Expand Down Expand Up @@ -63,7 +63,7 @@ def __init__(self,
table_or_data,
index=None,
limit=None,
client=False,
client=not is_libpsp(),
**kwargs):
'''Initialize an instance of `PerspectiveWidget` with the given table/data and viewer configuration.
Expand All @@ -84,6 +84,7 @@ def __init__(self,
sort=[["b", "desc"]],
filter=[["a", ">", 1]])
'''

# If `self.client` is True, the front-end `perspective-viewer` is given a copy of the data serialized to Arrow,
# and changes made in Python do not reflect to the front-end.
self.client = client
Expand Down
11 changes: 10 additions & 1 deletion python/perspective/perspective/table/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@
#
from .table import Table

__all__ = ["Table"]

def is_libpsp():
"""Was libbinding successfully loaded in this module?"""
return __is_libpsp__


__all__ = ["Table", "is_libpsp"]

__is_libpsp__ = True

try:
from .libbinding import PerspectiveCppError # noqa: F401
__all__.append("PerspectiveCppError")
except ImportError:
__is_libpsp__ = False
pass

0 comments on commit 8d00835

Please sign in to comment.