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

python DataFileWriter and DataFileReader should implement __enter__ and __exit__

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.1
    • 1.6.2
    • python
    • None
    • python

    Description

      I think The python classes

      avio.datafile.DataFileWriter
      avio.datafile.DataFileReader
      

      should implement the methods

      __enter__
      __exit__
      

      So that they can be used in with statements as context managers

      see http://docs.python.org/release/2.5.2/lib/typecontextmanager.html

      Attachments

        1. AVRO-854.patch
          2 kB
          Harsh J

        Activity

          People

            qwertymaniac Harsh J
            jeremy@lewi.us Jeremy Lewi
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: