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

Add Type Check Test for Transactions

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      We can probably adjust our type hinting to avoid needing this cast:

       

      with client.start_session() as session:
          # The type hint from pymongo doesn't have the enum values inherit from ReadPreference, so we must cast it here.
          return await session.with_transaction(
              execute_transaction, read_preference=cast(ReadPreference, ReadPreference.PRIMARY)
          ) 

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: