Skip to content

Cleanup extra logic that handle python <=3.3 #11068

Closed
@Carreau

Description

@Carreau

#10833 dis most of that but there seem to be some logic still handling python 3.3

try:
from importlib import reload
except ImportError :
## deprecated since 3.4
from imp import reload

try:
from importlib.util import source_from_cache, cache_from_source
except ImportError :
## deprecated since 3.4
from imp import source_from_cache, cache_from_source

#XXX: As of Python 3.4, the format string parsing no longer splits on a colon
# inside [], so EvalFormatter can handle slicing. Once we only support 3.4 and
# above, it should be possible to remove FullEvalFormatter.
class FullEvalFormatter(Formatter):
"""A String Formatter that allows evaluation of simple expressions.
Any time a format key is not found in the kwargs,

(3.4.2+)

# Timer.timeit copied from CPython 3.4.2
def timeit(self, number=timeit.default_number):
"""Time 'number' executions of the main statement.
To be precise, this executes the setup statement once, and

There are possibly other places, this should be relatively easy to fix for a new contributor.

Each of these removal can be a separate PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions