Bentoml: [Proposal] Remove __future__ statements targeting backwards compatibility with Py2

Created on 1 Jun 2020  路  4Comments  路  Source: bentoml/BentoML

While going through the codebase, I noticed the majority of modules contain future statements for Python 2 compatibility. As far as I can see, it's always these three:

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

While working on a new module, I wasn't sure whether to include this boilerplate or not. On the one hand, I was more or less certain that it's a holdover from previous versions, since the project's docs claim support for Python 3.6 and up only, and the project's dependencies are not necessarily Python 2-compatible. On the other hand... Well, you never know.

To spare other developers this quandary, I propose we scrub from the codebase all future statements pertaining to Python 2 compatibility.

In terms of effort, this can be done with a quick find-and-replace. There should be no impact on code quality, because the effects of these statements are present by default in Python 3.

good first issue help wanted

All 4 comments

Great suggestion @lemontheme, those future imports should be removed when we dropped Python 2 support a few months back.

is anyone working on this?
I'm just starting and this will be a great one to get started

Don't think so. I was going to do it, but got sidetracked by #720. Feel free to tackle this one :)

Thanks man.... working on it

Was this page helpful?
0 / 5 - 0 ratings