
try:
    from __builtins__ import ReferenceError
except (NameError, ImportError): # pragma: no cover
    from weakref import ReferenceError

__all__ = ['ReferenceError']

import sys
try:
    if sys.version_info[0] < 3:
        from __builtins__ import ReferenceError
    else:
        from builtins import ReferenceError
except (NameError, ImportError): # pragma: no cover
    from weakref import ReferenceError

__all__ = ['ReferenceError']

Fix a py3 bug in reference compatibility
Fix a py3 bug in reference compatibility

- 
+ import sys
  try:
+     if sys.version_info[0] < 3:
-     from __builtins__ import ReferenceError
+         from __builtins__ import ReferenceError
+     else:
+         from builtins import ReferenceError
  except (NameError, ImportError): # pragma: no cover
      from weakref import ReferenceError
  
  __all__ = ['ReferenceError']
  
Fix a py3 bug in reference compatibility
## Code Before:

try:
    from __builtins__ import ReferenceError
except (NameError, ImportError): # pragma: no cover
    from weakref import ReferenceError

__all__ = ['ReferenceError']

## Instruction:
Fix a py3 bug in reference compatibility
## Code After:
import sys
try:
    if sys.version_info[0] < 3:
        from __builtins__ import ReferenceError
    else:
        from builtins import ReferenceError
except (NameError, ImportError): # pragma: no cover
    from weakref import ReferenceError

__all__ = ['ReferenceError']
