old_contents: """ACME JSON fields."""
  import pyrfc3339
  
  from acme import jose
  
  
  class RFC3339Field(jose.Field):
      """RFC3339 field encoder/decoder.
  
      Handles decoding/encoding between RFC3339 strings and aware (not
      naive) `datetime.datetime` objects
      (e.g. ``datetime.datetime.now(pytz.utc)``).
  
      """
  
      @classmethod
      def default_encoder(cls, value):
          return pyrfc3339.generate(value)
  
      @classmethod
      def default_decoder(cls, value):
          try:
              return pyrfc3339.parse(value)
          except ValueError as error:
              raise jose.DeserializationError(error)
  
  
  class Resource(jose.Field):
      """Resource MITM field."""
  
      def __init__(self, resource_type, *args, **kwargs):
          self.resource_type = resource_type
          super(Resource, self).__init__(
              # TODO: omitempty used only to trick
              # JSONObjectWithFieldsMeta._defaults..., server implementation
              'resource', default=resource_type, *args, **kwargs)
  
      def decode(self, value):
          if value != self.resource_type:
              raise jose.DeserializationError(
                  'Wrong resource type: {0} instead of {1}'.format(
                      value, self.resource_type))
          return value
  
new_contents: """ACME JSON fields."""
  import pyrfc3339
  
  from acme import jose
  
  
  class RFC3339Field(jose.Field):
      """RFC3339 field encoder/decoder.
  
      Handles decoding/encoding between RFC3339 strings and aware (not
      naive) `datetime.datetime` objects
      (e.g. ``datetime.datetime.now(pytz.utc)``).
  
      """
  
      @classmethod
      def default_encoder(cls, value):
          return pyrfc3339.generate(value)
  
      @classmethod
      def default_decoder(cls, value):
          try:
              return pyrfc3339.parse(value)
          except ValueError as error:
              raise jose.DeserializationError(error)
  
  
  class Resource(jose.Field):
      """Resource MITM field."""
  
      def __init__(self, resource_type, *args, **kwargs):
          self.resource_type = resource_type
          super(Resource, self).__init__(
              'resource', default=resource_type, *args, **kwargs)
  
      def decode(self, value):
          if value != self.resource_type:
              raise jose.DeserializationError(
                  'Wrong resource type: {0} instead of {1}'.format(
                      value, self.resource_type))
          return value
  
subject: Remove obsolete comment.