From c305a8f8a2972e22ddb53000961147adfcdb23e3 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 22:46:13 +0200 Subject: [PATCH 1/7] tagging upgrade in setup --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From fd467beeea70c093f7c3f43ca2b4acd1464a42cc Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 22:46:59 +0200 Subject: [PATCH 2/7] upgrade Swift --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e0c663be4..0c27d0435 100644 --- a/tox.ini +++ b/tox.ini @@ -55,7 +55,7 @@ deps = Django<5 pyparsing3: pyparsing>=3.0.6 alabaster==0.7.12 - Sphinx==1.3.6 + Sphinx==8.0.2 jinja2<3.1.0 sphinx_rtd_theme urllib3 From 08dabe4cf428bec51b061bdfef7b4fa191ec7485 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 22:48:06 +0200 Subject: [PATCH 3/7] upgrade jinja2 a bit --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0c27d0435..9e4f833a2 100644 --- a/tox.ini +++ b/tox.ini @@ -56,7 +56,7 @@ deps = pyparsing3: pyparsing>=3.0.6 alabaster==0.7.12 Sphinx==8.0.2 - jinja2<3.1.0 + jinja2<3.2.0 sphinx_rtd_theme urllib3 commands = From bd738edbf2f773efea3db1a7aac8041a4e45fcee Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 22:52:42 +0200 Subject: [PATCH 4/7] alabaster upgrade --- docs/requirements.txt | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1ca4eb523..9c04a79c5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,7 +6,7 @@ git+https://github.com/graphite-project/whisper.git#egg=whisper git+https://github.com/graphite-project/ceres.git#egg=ceres Django<5 pyparsing>=3.0.6 -alabaster==0.7.12 +alabaster==1.0.0 Sphinx==1.3.6 jinja2<3.1.0 sphinx_rtd_theme diff --git a/tox.ini b/tox.ini index 9e4f833a2..38edebd8a 100644 --- a/tox.ini +++ b/tox.ini @@ -54,7 +54,7 @@ deps = git+https://github.com/graphite-project/ceres.git#egg=ceres Django<5 pyparsing3: pyparsing>=3.0.6 - alabaster==0.7.12 + alabaster==1.0.0 Sphinx==8.0.2 jinja2<3.2.0 sphinx_rtd_theme From 1f69ddeead48b28787943f41b182286e07929793 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 23:01:08 +0200 Subject: [PATCH 5/7] Trying to use Django 5 --- docs/install.rst | 2 +- docs/requirements.txt | 4 ++-- requirements.txt | 4 ++-- tox.ini | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) 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 9c04a79c5..7f39a05f8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,10 +1,10 @@ ## 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==1.0.0 Sphinx==1.3.6 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/tox.ini b/tox.ini index 38edebd8a..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,11 +48,11 @@ 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==1.0.0 Sphinx==8.0.2 From da6ea8c3391ae24dd0cd0ae1521809dd5ee5f1d0 Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 23:08:26 +0200 Subject: [PATCH 6/7] trying to fix 3.8 build --- docs/requirements.txt | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7f39a05f8..c5df83aa0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -11,4 +11,4 @@ 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/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 From a0ad0f4928e9518d64d4426454a91b754bacb67a Mon Sep 17 00:00:00 2001 From: Denys Zhdanov Date: Sun, 25 Aug 2024 23:29:45 +0200 Subject: [PATCH 7/7] fix localize test --- webapp/tests/test_attime.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)