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

DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.9
    • Component/s: BSON
    • None
    • Environment:
      OS: Windows_NT x64 10.0.19041
      IDE: Spyder 4.1.4

      import bson

      filename = "C:\\Users\\Admin\\Documents\\Test
      test.bson"
      bs = open(filename, 'rb').read()
      data = bson.decode_all(bs)

       

      leads to output:

      data = bson.decode_all(bs)
      <ipython-input-14-46e487bf5e6b>:1: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
      data = bson.decode_all(bs)

       

      The same warning is mentioned in other packages, it seems to be a recent deprecation, for example:

      https://github.com/rdiff-backup/rdiff-backup/issues/374

      via https://github.com/zopefoundation/persistent/issues/108

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            lorenzznerolgithub@gmail.com lorenzznerol github
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: