Description
Over 52 files in models/official/ still contain Python 2 compatibility imports:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
These have been unnecessary since Python 3.0 (2008) and are pure dead code.
Affected areas
models/official/efficientnet/ (multiple files)
models/official/detection/ (multiple files)
models/official/amoeba_net/ (multiple files)
models/official/resnet/
models/official/densenet/
models/official/mnist/
- And others across
models/official/
Impact
- Adds visual noise to every file
- Signals to users that the codebase may still target Python 2, causing confusion
- Inconsistent — some files have them, others don't
Suggested Fix
Remove all from __future__ import statements across the codebase since Python 2 is long past end-of-life (Jan 2020).
Description
Over 52 files in
models/official/still contain Python 2 compatibility imports:These have been unnecessary since Python 3.0 (2008) and are pure dead code.
Affected areas
models/official/efficientnet/(multiple files)models/official/detection/(multiple files)models/official/amoeba_net/(multiple files)models/official/resnet/models/official/densenet/models/official/mnist/models/official/Impact
Suggested Fix
Remove all
from __future__ importstatements across the codebase since Python 2 is long past end-of-life (Jan 2020).