Skip to content

Error when using a different YStore. #483

@Darshan808

Description

@Darshan808

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 in pycrdt_store classes to accept the extra configuration argument
  • Create wrapper implementations for all stores from pycrdt_store in jupyter-server-ydoc package, customize them (e.g., modifying DB paths and others) and provide LoggingConfigurable to all similar to the default SQLiteYStore 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions