We're in the process of upgrading to Python 3, and were surprised to find the
bitstring package failed to work on Python 3, despite claiming full Python 3 support. After investigation, we found that
bitstring (and possibly other packages) check whether they are on Python 3 by seeing if accessing
xrange throws a
NameError. Unfortunately, Reportlab patches
range under Python 3 and leaks that patch, so the Python 3 check was failing.
I'll be opening an issue on
bitstring, as I don't think that's a great way of checking Python 3 compatibility, but I also think it's unexpected and incorrect behaviour to leak patches like this, so it would be great to fix this in Reportlab as well.
The leaks appear to be:
cmpon Python 3
xrangeon Python 3
asciion Python 2