Skip to content

Conversation

Darshan808
Copy link
Member

Fixes #328

Description

This PR adds support for creating a document room if it does not already exist.

  • Introduces a new create argument to the get_document method.
  • If the room for a given document does not exist and create=True, a new room is created.
  • The document is then returned with the newly created room.

Looking forward to feedbacks!

@Darshan808 Darshan808 requested a review from krassowski June 6, 2025 17:59
Copy link
Contributor

github-actions bot commented Jun 6, 2025

Binder 👈 Launch a Binder on branch Darshan808/jupyter-collaboration/modify_get_document_api

@Darshan808 Darshan808 added the enhancement New feature or request label Jun 6, 2025
@Darshan808 Darshan808 requested a review from krassowski June 17, 2025 15:16
@krassowski
Copy link
Member

It looks like this tests reliably fails on Ubuntu with Python 3.13 - it failed 5 times 🤔

=================================== FAILURES ===================================
_____________________ test_room_concurrent_initialization ______________________

self = <Condition(<unlocked _thread.RLock object owner=0 count=0 at 0x7f0b53421680>, 0)>

>   def __enter__(self):
E   RuntimeError: pycrdt::doc::TransactionEvent is unsendable, but is being dropped on another thread

/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/threading.py:303: RuntimeError

The above exception was the direct cause of the following exception:

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )
E   pytest.PytestUnraisableExceptionWarning: Exception ignored in: None

/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnraisableExceptionWarning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

An API to create a document room if it does not exist?
3 participants