Fix pipe inheritance issue with Python >= 3.4