From 4804629bdc647a3374c7d67a3a95ea2b1997e00e Mon Sep 17 00:00:00 2001 From: Badr Date: Mon, 30 Oct 2023 11:23:07 -0400 Subject: [PATCH 1/3] Supporting Python 3.12 --- vertica_highcharts/highcharts/highcharts.py | 10 ++++++++-- vertica_highcharts/highmaps/highmap_helper.py | 10 ++++++++-- vertica_highcharts/highmaps/highmaps.py | 10 ++++++++-- vertica_highcharts/highstock/highstock.py | 10 ++++++++-- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/vertica_highcharts/highcharts/highcharts.py b/vertica_highcharts/highcharts/highcharts.py index d03eefb..71f51a9 100644 --- a/vertica_highcharts/highcharts/highcharts.py +++ b/vertica_highcharts/highcharts/highcharts.py @@ -1,8 +1,14 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import -from future.standard_library import install_aliases -install_aliases() +try: + from future.standard_library import install_aliases + + install_aliases() +except: + import warnings + + warnings.warn('future library does not support Python 3.12 yet. The import is skipped.') from past.builtins import basestring from jinja2 import Environment, PackageLoader diff --git a/vertica_highcharts/highmaps/highmap_helper.py b/vertica_highcharts/highmaps/highmap_helper.py index 834662b..29e3a3c 100644 --- a/vertica_highcharts/highmaps/highmap_helper.py +++ b/vertica_highcharts/highmaps/highmap_helper.py @@ -1,6 +1,12 @@ # -*- coding: utf-8 -*- -from future.standard_library import install_aliases -install_aliases() +try: + from future.standard_library import install_aliases + + install_aliases() +except: + import warnings + + warnings.warn('future library does not support Python 3.12 yet. The import is skipped.') from past.builtins import basestring from urllib.request import urlopen diff --git a/vertica_highcharts/highmaps/highmaps.py b/vertica_highcharts/highmaps/highmaps.py index 53150c0..444b08a 100644 --- a/vertica_highcharts/highmaps/highmaps.py +++ b/vertica_highcharts/highmaps/highmaps.py @@ -1,8 +1,14 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import -from future.standard_library import install_aliases -install_aliases() +try: + from future.standard_library import install_aliases + + install_aliases() +except: + import warnings + + warnings.warn('future library does not support Python 3.12 yet. The import is skipped.') from past.builtins import basestring diff --git a/vertica_highcharts/highstock/highstock.py b/vertica_highcharts/highstock/highstock.py index 49d8120..395df62 100644 --- a/vertica_highcharts/highstock/highstock.py +++ b/vertica_highcharts/highstock/highstock.py @@ -1,8 +1,14 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import -from future.standard_library import install_aliases -install_aliases() +try: + from future.standard_library import install_aliases + + install_aliases() +except: + import warnings + + warnings.warn('future library does not support Python 3.12 yet. The import is skipped.') from jinja2 import Environment, PackageLoader From 7ed2c8c981de9cb835c4ca963ce72f297a22db85 Mon Sep 17 00:00:00 2001 From: Badr Date: Mon, 30 Oct 2023 11:39:39 -0400 Subject: [PATCH 2/3] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1553b36..6749e20 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", 3.11] + python-version: [3.8, 3.9, "3.10", 3.11, 3.12] steps: - name: Check out repository From e857696746a32d58bd59475befdd10c3fb68de96 Mon Sep 17 00:00:00 2001 From: Badr Date: Mon, 30 Oct 2023 12:24:57 -0400 Subject: [PATCH 3/3] Update highstock_helper.py --- vertica_highcharts/highstock/highstock_helper.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vertica_highcharts/highstock/highstock_helper.py b/vertica_highcharts/highstock/highstock_helper.py index 029d885..cbe5dce 100644 --- a/vertica_highcharts/highstock/highstock_helper.py +++ b/vertica_highcharts/highstock/highstock_helper.py @@ -1,6 +1,10 @@ # -*- coding: utf-8 -*- -from future.standard_library import install_aliases -install_aliases() +try: + from future.standard_library import install_aliases + + install_aliases() +except: + import warnings from past.builtins import basestring from urllib.request import urlopen