Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2234

Use native MappingProxyType instead of hand-written ImmutableDict

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • python
    • None

    Description

      Per the rejection notice in PEP-416, there is no native ImmutableDict in Python. However, there is a MappingProxyType that makes a proxy to the mapping of a dictionary, and is fully native. For most purposes, including avro's, it's a fully suitable replacement for a real ImmutableDict implementation (except for a minor detail about JSON encoding that is easier to solve and support than maintaining a complete implementation of ImmutableDict.)

      I propose that we drop ImmutableDict and replace it with MappingProxyType.

      Attachments

        Issue Links

          Activity

            People

              kojiromike Michael A. Smith
              kojiromike Michael A. Smith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: