Skip to content

Commit 17e3fa2

Browse files
authored
fix(FIR-49285): remove incompatible method call for python 3.12 (#110)
1 parent 40f0e80 commit 17e3fa2

File tree

6 files changed

+26
-10
lines changed

6 files changed

+26
-10
lines changed

.github/workflows/code-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
with:
2020
ref: ${{ inputs.branch }}
2121

22-
- name: Set up Python 3.8
22+
- name: Set up Python 3.9
2323
uses: actions/setup-python@v5
2424
with:
25-
python-version: 3.8
25+
python-version: 3.9
2626

2727
- name: Install dependencies
2828
run: |

.github/workflows/nightly-v1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
max-parallel: 2
2323
matrix:
2424
os: ['ubuntu-latest', 'macos-13', 'windows-latest']
25-
python-version: ['3.8', '3.9', '3.10', '3.11']
25+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2626
steps:
2727
- name: Check out code
2828
uses: actions/checkout@v2

.github/workflows/nightly-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
max-parallel: 2
2323
matrix:
2424
os: ['ubuntu-latest', 'macos-13', 'windows-latest']
25-
python-version: ['3.8', '3.9', '3.10', '3.11']
25+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2626
steps:
2727
- name: Check out code
2828
uses: actions/checkout@v2

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
with:
2525
ref: ${{ inputs.branch }}
2626

27-
- name: Set up Python 3.8
27+
- name: Set up Python 3.9
2828
uses: actions/setup-python@v5
2929
with:
30-
python-version: 3.8
30+
python-version: 3.9
3131

3232
- name: Install dependencies
3333
run: |

setup.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ classifiers =
1515
Operating System :: OS Independent
1616
Programming Language :: Python :: 3
1717
Programming Language :: Python :: 3 :: Only
18-
Programming Language :: Python :: 3.8
1918
Programming Language :: Python :: 3.9
2019
Programming Language :: Python :: 3.10
2120
Programming Language :: Python :: 3.11
@@ -29,7 +28,7 @@ packages = find:
2928
install_requires =
3029
firebolt-sdk>=1.13.0
3130
sqlalchemy>=1.0.0
32-
python_requires = >=3.8
31+
python_requires = >=3.9
3332
package_dir =
3433
= src
3534

@@ -45,7 +44,7 @@ sqlalchemy.dialects =
4544
dev =
4645
allure-pytest==2.*
4746
devtools==0.7.0
48-
greenlet==2.0.2
47+
greenlet==3.2.4
4948
mock==4.0.3
5049
mypy==0.910
5150
pre-commit==3.5.0

src/firebolt_db/firebolt_dialect.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
from distutils.util import strtobool
32
from types import ModuleType
43
from typing import Any, Dict, List, Optional, Tuple, Union
54

@@ -83,6 +82,24 @@ def removesuffix(s: str, suffix: str) -> str:
8382
return result
8483

8584

85+
def strtobool(val: str) -> int:
86+
"""Copy of deprecated distutils.util.strtobool
87+
Convert a string representation of truth to true (1) or false (0).
88+
89+
True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
90+
are 'n', 'no', 'f', 'false', 'off', and '0'. Values are compared
91+
case-insensitively. Raises ValueError if
92+
'val' is anything else.
93+
"""
94+
val = val.lower()
95+
if val in ("y", "yes", "t", "true", "on", "1"):
96+
return 1
97+
elif val in ("n", "no", "f", "false", "off", "0"):
98+
return 0
99+
else:
100+
raise ValueError("invalid truth value %r" % (val,))
101+
102+
86103
DEFAULT_TYPE = TEXT
87104

88105

0 commit comments

Comments
 (0)