title: Enum cannot be pickled in Python 3.6 but can in 3.7
body: <p>Today, I ran into a problem in which an Enum could not be pickled in Python 3.6 but no errors occurred in Python 3.7. The following code demonstrates the issue:</p>
  
  <pre class="lang-py prettyprint-override"><code>import enum
  import pickle
  
  
  class GoodEnum(enum.Enum):
      CAT = 'C'
      DOG = 'D'
  
      def __str__(self):
          return str(self.value)
  
  
  # Can be pickled just fine
  print(pickle.dumps(GoodEnum.CAT))
  
  
  class StringValue:
      def __str__(self):
          return str(self.value)
  
  
  class ErrorEnum(StringValue, enum.Enum):
      CAT = 'C'
      DOG = 'D'
  
  
  # Causes TypeError: &lt;ErrorEnum.CAT: 'C'&gt; cannot be pickled in Python 3.6
  print(pickle.dumps(ErrorEnum.CAT))
  </code></pre>
  
  <p>In Python <strong>3.6</strong>:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ python --version
  Python 3.6.9
  $ python pickleerror.py
  b'\x80\x03c__main__\nGoodEnum\nq\x00X\x01\x00\x00\x00Cq\x01\x85q\x02Rq\x03.'
  Traceback (most recent call last):
    File "pickleerror.py", line 28, in &lt;module&gt;
      print(pickle.dumps(ErrorEnum.CAT))
    File "/usr/local/lib/python3.6/enum.py", line 46, in _break_on_call_reduce
      raise TypeError('%r cannot be pickled' % self)
  TypeError: &lt;ErrorEnum.CAT: 'C'&gt; cannot be pickled
  </code></pre>
  
  <p>While in Python <strong>3.7</strong>:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ python --version
  Python 3.7.5
  $ python pickleerror.py
  b'\x80\x03c__main__\nGoodEnum\nq\x00X\x01\x00\x00\x00Cq\x01\x85q\x02Rq\x03.'
  b'\x80\x03c__main__\nErrorEnum\nq\x00X\x01\x00\x00\x00Cq\x01\x85q\x02Rq\x03.'
  </code></pre>
  
  <p>I could not find anything in the Python release notes regarding this specific issue. So basically there are two questions here:</p>
  
  <ul>
  <li>Why does this code cause this error in Python 3.6?</li>
  <li>Why does it not cause the same error in Python 3.7?</li>
  </ul>