1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-10 02:38:35 +00:00

Drop support for Python 3.2

The code had a backport shim for importing shutil get_terminal_size.
For modern versions, the call is in shutil in the standard library.
Starting with 3.9, on Debian, the backport reference causes a FTBFS.

Drop the workaround.

Support for security fixes for Python 3.2 ended in 2016.
This commit is contained in:
David Steele 2022-01-10 13:56:22 -05:00 committed by David Steele
parent 2a9feba408
commit d96572c088
2 changed files with 3 additions and 11 deletions

View file

@ -44,12 +44,10 @@ setup(
],
extras_require={
':sys_platform=="win32"': ['colorama>=0.2.5'],
':python_version=="3.2"': ['backports.shutil_get_terminal_size>=1.0.0'],
'columns': ['urwid >= 1.3.0', WATCHDOG],
'ical': [ICALENDAR],
'prompt': ['prompt_toolkit >= 0.53', WATCHDOG],
'test': ['coverage>=4.3', 'freezegun', 'green', ICALENDAR, 'pylint>=1.7.1'],
'test:python_version=="3.2"': ['mock'],
},
entry_points={
'console_scripts': ['topydo=topydo.ui.UILoader:main'],
@ -60,7 +58,6 @@ setup(
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",

View file

@ -76,14 +76,9 @@ def get_terminal_size(p_getter=None):
try:
# shutil.get_terminal_size was added to the standard
# library in Python 3.3
try:
from shutil import \
get_terminal_size as \
_get_terminal_size # pylint: disable=no-name-in-module
except ImportError:
from backports.shutil_get_terminal_size import \
get_terminal_size as \
_get_terminal_size # pylint: disable=import-error
from shutil import \
get_terminal_size as \
_get_terminal_size # pylint: disable=no-name-in-module
size = _get_terminal_size()
except ValueError: