From 4592e9ba50e68a6fbd87939a8f0da5c711ddccb4 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Mon, 17 Jun 2024 10:56:46 +0200 Subject: [PATCH] drop six dependency --- edtf/natlang/en.py | 5 ++--- pyproject.toml | 1 - requirements.txt | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/edtf/natlang/en.py b/edtf/natlang/en.py index f6eef54..f28e685 100644 --- a/edtf/natlang/en.py +++ b/edtf/natlang/en.py @@ -4,7 +4,6 @@ from datetime import datetime from dateutil.parser import ParserError, parse -from six.moves import xrange from edtf import appsettings @@ -216,7 +215,7 @@ def text_to_edtf_date(text): mentions_month = re.findall(r"\bmonth\b.+(in|during)\b", t) mentions_day = re.findall(r"\bday\b.+(in|during)\b", t) - for i in xrange(len(date1)): + for i in range(len(date1)): # if the given year could be a century (e.g. '1800s') then use # approximate/uncertain markers to decide whether we treat it as # a century or a decade. @@ -238,7 +237,7 @@ def text_to_edtf_date(text): # strip off unknown chars from end of string - except the first 4 - for i in reversed(xrange(len(result))): + for i in reversed(range(len(result))): if result[i] not in ("X", "-"): smallest_length = 4 diff --git a/pyproject.toml b/pyproject.toml index f533477..860741e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ version = "5.0.0" dependencies = [ "python-dateutil", "pyparsing", - "six" ] description = "Python implementation of Library of Congress EDTF (Extended Date Time Format) specification" requires-python = ">=3.8" diff --git a/requirements.txt b/requirements.txt index 0ab3a7d..1656e27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ python-dateutil pyparsing -six