-
-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Description
When trying to use a different YStore implementation via command line configuration, I'm encountering an error.
The documentation shows we can specify a YStore class:
jupyter lab --YDocExtension.ystore_class=pycrdt_websocket.ystore.TempFileYStore
However, when using this, I get the following error:
__init__ got an extra keyword argument config
Problem Details
The config
argument seems to be automatically passed via Jupyterlab.
The default SQLiteYStore
implementation passes the config
argument to LoggingConfigurable
, not to the base store (according to its MRO).
When specifying a different YStore
via command line, the config
is automatically passed to the class's __init__
method
Classes from pycrdt_store
don't expect or handle this config
parameter
Potential Solutions
- Add
**kwargs
to all__init__
methods inpycrdt_store
classes to accept the extra configuration argument - Create wrapper implementations for all stores from
pycrdt_store
injupyter-server-ydoc
package, customize them (e.g., modifying DB paths and others) and provideLoggingConfigurable
to all similar to the defaultSQLiteYStore
and point to use these classes in documentation rather than using pycrdt-store's classes.
The second approach seems cleaner and would ensure all store implementations have the same behavior and would be inside same package i.e jupyter-server-ydoc
.
Open to feedback on this.