Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup extra logic that handle python <=3.3 #11068

Closed
Carreau opened this issue Apr 3, 2018 · 2 comments
Closed

Cleanup extra logic that handle python <=3.3 #11068

Carreau opened this issue Apr 3, 2018 · 2 comments

Comments

@Carreau
Copy link
Member

Carreau commented Apr 3, 2018

#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.

@subhrm
Copy link

subhrm commented Apr 13, 2018

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

@subhrm
Copy link

subhrm commented Apr 13, 2018

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.

takluyver added a commit that referenced this issue Apr 27, 2018
Issue #11068 : Cleanup extra logic that handle python <=3.3 in IPython/utils/openpy.py
takluyver added a commit that referenced this issue Apr 27, 2018
Issue #11068 : Cleanup extra logic that handle python <=3.3 in IPython/core/extensions.py
@Carreau Carreau added this to the 7.0 milestone Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants