Skip to content

Python 2.x 3.x compatibility notes

Alex Willmer edited this page Aug 17, 2025 · 4 revisions

Exceptions

Exception hierachy

Python <= 3.2

  • BaseException
    • Exception
      • StandardError
        • EnvironmentError
          • IOError
            • socket.error
          • OSError
      • select.error

Python >= 3.3

  • BaseException
    • Exception
      • OSError
        • BlockingIOError
        • EnvironmentError
        • IOError
        • select.error
        • socket.error

Refs

InterruptedError

Python 3.5+ automatically retries system calls that return EINTR.

Backports

Clone this wiki locally