[4.0] Remove Python 2 workarounds in family.py
[4.0] Remove Python 2 workarounds in family.py

Changes proposed by zhuyifei1999

Bug: T265817
Change-Id: Idfe7fd5262cd16da92253e0550b1c508bb1480a8

wikimedia/pywikibot-core,wikimedia/pywikibot-core