diff --git a/docs/install.rst b/docs/install.rst index 31bb78e21..5dc9162ca 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -36,7 +36,7 @@ Basic Graphite requirements: * Python 3.8 or greater * `cairocffi`_ * `Django`_ 4.2+ -* `django-tagging`_ 0.4.6 (not `django-taggit`, unfortunately) +* `django-tagging`_ 0.5.0 (not `django-taggit`, unfortunately) * `pytz`_ * `pyparsing` 2.3.0+ * `fontconfig`_ and at least one font package (a system package usually) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1ca4eb523..c5df83aa0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,14 +1,14 @@ ## Requirements for documentation cairocffi -django-tagging +django-tagging==0.5.0 pytz git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres -Django<5 +Django>=4.2,<6 pyparsing>=3.0.6 -alabaster==0.7.12 +alabaster==1.0.0 Sphinx==1.3.6 jinja2<3.1.0 sphinx_rtd_theme urllib3 -scandir;python_version<"3.5" \ No newline at end of file +backports.zoneinfo;python_version<"3.9" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index c0663c71e..5399a5359 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,10 +35,10 @@ # deactivate # -Django>=4.2,<5 +Django>=4.2,<6 python-memcached>=1.58 txAMQP>=0.8.2,<0.9 -django-tagging +django-tagging==0.5.0 gunicorn pytz pyparsing>=2.3.0 diff --git a/setup.cfg b/setup.cfg index 418110d7f..699652a0b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,7 +10,7 @@ requires = Django => 1.8 python-hashlib pytz pyparsing - scandir;python_version<"3.5" + backports.zoneinfo;python_version<"3.9" post_install = distro/redhat/misc/postinstall diff --git a/setup.py b/setup.py index e72ee5690..6b96f302b 100644 --- a/setup.py +++ b/setup.py @@ -107,7 +107,7 @@ def read(fname): package_data={'graphite': ['templates/*', 'local_settings.py.example']}, scripts=glob('bin/*'), data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, - install_requires=['Django>=3.2,<4', 'django-tagging==0.4.3', 'pytz', + install_requires=['Django>=4.2,<5', 'django-tagging==0.5.0', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'six'], classifiers=[ 'Intended Audience :: Developers', diff --git a/tox.ini b/tox.ini index e0c663be4..d289cfea6 100644 --- a/tox.ini +++ b/tox.ini @@ -28,14 +28,14 @@ commands = deps = coverage cairocffi - django-tagging + django-tagging==0.5.0 pytz mock msgpack-python git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres pyparsing>=3.0.6 - Django>=4.2,<5 + Django>=4.2,<6 urllib3 redis rrdtool @@ -48,15 +48,15 @@ basepython = python3.10 changedir = docs deps = cairocffi - django-tagging + django-tagging==0.5.0 pytz git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres - Django<5 + Django>=4.2,<6 pyparsing3: pyparsing>=3.0.6 - alabaster==0.7.12 - Sphinx==1.3.6 - jinja2<3.1.0 + alabaster==1.0.0 + Sphinx==8.0.2 + jinja2<3.2.0 sphinx_rtd_theme urllib3 commands = diff --git a/webapp/tests/test_attime.py b/webapp/tests/test_attime.py index 8ddd1b9a0..ca89956c9 100644 --- a/webapp/tests/test_attime.py +++ b/webapp/tests/test_attime.py @@ -31,7 +31,7 @@ class ATTimeTimezoneTests(TestCase): def test_should_return_absolute_time(self): time_string = '12:0020150308' - expected_time = self.default_tz.localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) + expected_time = pytz.timezone(str(self.default_tz)).localize(datetime.strptime("11:00_20171013", '%H:%M_%Y%m%d')) actual_time = parseATTime(time_string) self.assertEqual(actual_time, expected_time) @@ -43,7 +43,7 @@ def test_absolute_time_should_respect_tz(self): def test_should_return_absolute_time_short(self): time_string = '9:0020150308' - expected_time = self.default_tz.localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) + expected_time = pytz.timezone(str(self.default_tz)).localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) actual_time = parseATTime(time_string) self.assertEqual(actual_time, expected_time) @@ -80,7 +80,7 @@ def test_relative_day_and_offset_with_tz(self): self.assertEqual(actual_time, expected_time) def test_should_return_current_time(self): - expected_time = self.default_tz.localize(datetime.strptime("12:00_20150308", '%H:%M_%Y%m%d')) + expected_time = pytz.timezone(str(self.default_tz)).localize(datetime.strptime("12:00_20150308", '%H:%M_%Y%m%d')) actual_time = parseATTime("now") self.assertEqual(actual_time, expected_time) @@ -465,7 +465,7 @@ class parseATTimeTestNow(TestCase): def test_should_return_absolute_time(self): time_string = '12:0020150308' - expected_time = self.default_tz.localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) + expected_time = pytz.timezone(str(self.default_tz)).localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) actual_time = parseATTime(time_string, now=self.now) self.assertEqual(actual_time, expected_time) @@ -477,7 +477,7 @@ def test_absolute_time_should_respect_tz(self): def test_should_return_absolute_time_short(self): time_string = '9:0020150308' - expected_time = self.default_tz.localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) + expected_time = pytz.timezone(str(self.default_tz)).localize(datetime.strptime(time_string,'%H:%M%Y%m%d')) actual_time = parseATTime(time_string, now=self.now) self.assertEqual(actual_time, expected_time) @@ -514,7 +514,7 @@ def test_relative_day_and_offset_with_tz(self): self.assertEqual(actual_time, expected_time) def test_should_return_current_time(self): - expected_time = self.default_tz.localize(datetime.strptime("11:00_20171013", '%H:%M_%Y%m%d')) + expected_time = pytz.timezone(str(self.default_tz)).localize(datetime.strptime("11:00_20171013", '%H:%M_%Y%m%d')) actual_time = parseATTime("now", now=self.now) self.assertEqual(actual_time, expected_time)