jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
936 stars 187 forks source link

DeprecationWarning for traits arguments from traitlets 4.1 #236

Closed glyg closed 5 years ago

glyg commented 5 years ago

Hi,

Thank's a lot for this lib, it works like a charm.

Running a CI job on gitlab, I noticed my code, invoking pythreejs through ipyvolume, rises a lot of deprecation warnings such as the following:


/opt/conda/envs/tyssue/lib/python3.6/site-packages/pythreejs/traits.py:55
  /opt/conda/envs/tyssue/lib/python3.6/site-packages/pythreejs/traits.py:55: DeprecationWarning:
Traits should be given as instances, not types (for example, `Int()`, not `Int`) 
Passing types is deprecated in traitlets 4.1.

The same warning is raised for:

Same warning is raised in ipyvolume in some places.

The fix seems quite straightforward, I can open a PR if you wish.

vidartf commented 5 years ago

Thanks for the report! This should indeed be fixed.

The fix seems quite straightforward, I can open a PR if you wish.

I'd appreciate it!