Skip to content

Commit 3a2719a

Browse files
committed
fix(FIR-49285): remove incompatible method call for python 3.12
1 parent b0792f9 commit 3a2719a

File tree

6 files changed

+25
-9
lines changed

6 files changed

+25
-9
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/integration-tests-core.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: 'Python version'
1313
required: false
1414
type: string
15-
default: '3.8'
15+
default: '3.9'
1616
workflow_call:
1717
inputs:
1818
tag_version:
@@ -24,7 +24,7 @@ on:
2424
description: 'Python version'
2525
required: false
2626
type: string
27-
default: '3.8'
27+
default: '3.9'
2828

2929
jobs:
3030
run-core-integration-tests:

.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: |

src/firebolt_db/firebolt_dialect.py

Lines changed: 17 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,23 @@ 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'. Raises ValueError if
91+
'val' is anything else.
92+
"""
93+
val = val.lower()
94+
if val in ("y", "yes", "t", "true", "on", "1"):
95+
return 1
96+
elif val in ("n", "no", "f", "false", "off", "0"):
97+
return 0
98+
else:
99+
raise ValueError("invalid truth value %r" % (val,))
100+
101+
86102
DEFAULT_TYPE = TEXT
87103

88104

0 commit comments

Comments
 (0)