Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4084

BSON inflation fails for CodeWithSpec objects containing nested RawBsonDocments

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      If C extensions are enabled, inflating a CodeWithSpec BSON object that contains a RawBsonDocument fails with the following error:

      bson.errors.InvalidBSON: RawBSONDocument.__init__() missing 1 required positional argument: 'bson_bytes' 

      Motivation

      Who is the affected end user?

      Any user trying to inflate such a CodeWithSpec BSON object.

      How does this affect the end user?

      Inflating a CodeWithSpec BSON object with a nested RawBsonDocument does not work if C extensions are enabled.

      How likely is it that this problem or use case will occur?

      Edge case, this bug has likely existed for a long time.

      Is this issue urgent?

      Required for PYTHON-3457 & PYTHON-3458

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Does this ticket have any functional impact, or is it just test improvements?

      Acceptance Criteria

      What specific requirements must be met to consider the design phase complete?

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            noah.stapp@mongodb.com Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: