Remove unused validation functions from pymongo/common.py

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • 4.17.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Three validation functions in pymongo/common.py are defined but never called anywhere in the codebase (confirmed via vulture and grep):

      • validate_positive_integer_or_none (line 236) — superseded by validate_non_negative_integer_or_none which is used
      • validate_int_or_basestring (line 264) — a variant of validate_non_negative_int_or_basestring which is used
      • validate_auth_option (line 823) — validates auth mechanism properties but is never invoked

      These are internal functions (no public docs, no _all_), so no deprecation is needed — they can be deleted directly.

      Definition of done

      Unused functions deleted.

      Pitfalls

      N/A

            Assignee:
            Alex Clark
            Reporter:
            Alex Clark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: