Skip to content

Cleanup extra logic that handle python <=3.3 #11068

Closed

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.

Activity

  1. subhrm commented on Apr 13, 2018

    @subhrm

    I would try to clean them up with separate PRs for each fix.

  2. subhrm commented on Apr 13, 2018

    @subhrm

    I have now created two pull requests for fixes in IPython/core/extensions.py and IPython/utils/openpy.py. Based on the feedback from the maintainers, I would proceed to clean up rest of the files.

  3. added a commit that references this issue on Apr 27, 2018
  4. added a commit that references this issue on Apr 27, 2018
  5. added this to the 7.0 milestone on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions