Repository navigation
Cleanup extra logic that handle python <=3.3 #11068
Copy link
Copy link
Closed
Milestone
Description
#10833 dis most of that but there seem to be some logic still handling python 3.3
ipython/IPython/core/extensions.py
Lines 17 to 21 in dda5238
| try: | |
| from importlib import reload | |
| except ImportError : | |
| ## deprecated since 3.4 | |
| from imp import reload |
ipython/IPython/utils/openpy.py
Lines 117 to 121 in dda5238
| 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 |
Lines 512 to 519 in dda5238
| #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+)
ipython/IPython/core/magics/execution.py
Lines 145 to 149 in dda5238
| # 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.
Reactions are currently unavailable
Activity
subhrm commentedon Apr 13, 2018
I would try to clean them up with separate PRs for each fix.
subhrm commentedon 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.
Merge pull request #11093 from subhrm/11068-B
Merge pull request #11092 from subhrm/11068-A