From 9fffde9e65082ea97025b1f6a1a394d1b7c09bd1 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 30 Dec 2021 15:03:28 +0000 Subject: [PATCH] Drop Python 2.7 support Upstream IPython dropped it in version 6.0.0, in April 2017. I think it's fine to drop it here now. Would also be good to use this opportunity to mark the release as 1.0.0. --- HISTORY.txt | 2 +- ipdb/__main__.py | 11 ++--------- setup.py | 2 -- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/HISTORY.txt b/HISTORY.txt index da89402..3f7fe3a 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -4,7 +4,7 @@ Changelog 0.13.10 (unreleased) -------------------- -- Nothing changed yet. +- Drop Python 2.7 compatibility. 0.13.9 (2021-06-02) diff --git a/ipdb/__main__.py b/ipdb/__main__.py index ea2ae88..694dc45 100644 --- a/ipdb/__main__.py +++ b/ipdb/__main__.py @@ -16,10 +16,7 @@ from IPython.core.debugger import BdbQuit_excepthook from IPython.terminal.ipapp import TerminalIPythonApp from IPython.terminal.embed import InteractiveShellEmbed -try: - import configparser -except: - import ConfigParser as configparser +import configparser def _get_debugger_cls(): @@ -255,11 +252,7 @@ def main(): import sys import getopt - try: - from pdb import Restart - except ImportError: - class Restart(Exception): - pass + from pdb import Restart if sys.version_info >= (3, 7): opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command=']) diff --git a/setup.py b/setup.py index 19d49cd..5d98349 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,6 @@ description="IPython-enabled pdb", long_description=long_description, classifiers=[ - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', @@ -58,7 +57,6 @@ 'setuptools', ], extras_require={ - ':python_version == "2.7"': ['ipython >= 5.1.0, < 6.0.0', 'toml >= 0.10.2', 'decorator < 5.0.0'], # No support for python 3.0, 3.1, 3.2. # FTR, `decorator` is also a dependency of Ipython. ':python_version == "3.4"': ['ipython >= 6.0.0, < 7.0.0', 'toml >= 0.10.2', 'decorator < 5.0.0'],