Skip to content

Commit 03ea730

Browse files
authored
test: Remove deprecated types (#276)
1 parent 56414c8 commit 03ea730

File tree

5 files changed

+2
-21
lines changed

5 files changed

+2
-21
lines changed

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ install_requires =
2727
appdirs>=1.4.4
2828
appdirs-stubs>=0.1.0
2929
cryptography>=3.4.0
30+
httpcore<0.17.3
3031
httpx[http2]==0.24.0
3132
pydantic[dotenv]>=1.8.2,<2.0
3233
python-dateutil>=2.8.2

src/firebolt/common/_types.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,9 @@ class _InternalType(Enum):
164164
Text = "text"
165165

166166
Date = "date"
167-
DateExt = "date_ext"
168167
PGDate = "pgdate"
169168

170169
Timestamp = "timestamp"
171-
TimestampExt = "timestamp_ext"
172170
TimestampNtz = "timestampntz"
173171
TimestampTz = "timestamptz"
174172

@@ -188,10 +186,8 @@ def python_type(self) -> type:
188186
_InternalType.Double: float,
189187
_InternalType.Text: str,
190188
_InternalType.Date: date,
191-
_InternalType.DateExt: date,
192189
_InternalType.PGDate: date,
193190
_InternalType.Timestamp: datetime,
194-
_InternalType.TimestampExt: datetime,
195191
_InternalType.TimestampNtz: datetime,
196192
_InternalType.TimestampTz: datetime,
197193
_InternalType.Boolean: bool,

tests/integration/dbapi/conftest.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,8 @@ def all_types_query() -> str:
6666
"1.2345678901234 as float64, "
6767
"'text' as \"string\", "
6868
"CAST('2021-03-28' AS DATE) as \"date\", "
69-
"CAST('1860-03-04' AS DATE_EXT) as \"date32\","
7069
"pgdate '0001-01-01' as \"pgdate\", "
7170
"CAST('2019-07-31 01:01:01' AS DATETIME) as \"datetime\", "
72-
"CAST('2019-07-31 01:01:01.1234' AS TIMESTAMP_EXT(4)) as \"datetime64\", "
7371
"CAST('1111-01-05 17:04:42.123456' as timestampntz) as \"timestampntz\", "
7472
"'1111-01-05 17:04:42.123456'::timestamptz as \"timestamptz\", "
7573
'true as "boolean", '
@@ -95,10 +93,8 @@ def all_types_query_description() -> List[Column]:
9593
Column("float64", float, None, None, None, None, None),
9694
Column("string", str, None, None, None, None, None),
9795
Column("date", date, None, None, None, None, None),
98-
Column("date32", date, None, None, None, None, None),
9996
Column("pgdate", date, None, None, None, None, None),
10097
Column("datetime", datetime, None, None, None, None, None),
101-
Column("datetime64", datetime, None, None, None, None, None),
10298
Column("timestampntz", datetime, None, None, None, None, None),
10399
Column("timestamptz", datetime, None, None, None, None, None),
104100
Column("boolean", bool, None, None, None, None, None),
@@ -122,13 +118,11 @@ def all_types_query_response(timezone_offset_seconds: int) -> List[ColType]:
122118
30000000000,
123119
-30000000000,
124120
1.23,
125-
1.23456789012,
121+
1.2345678901234,
126122
"text",
127123
date(2021, 3, 28),
128-
date(1860, 3, 4),
129124
date(1, 1, 1),
130125
datetime(2019, 7, 31, 1, 1, 1),
131-
datetime(2019, 7, 31, 1, 1, 1, 123400),
132126
datetime(1111, 1, 5, 17, 4, 42, 123456),
133127
datetime(
134128
1111,

tests/unit/async_db/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ def types_map() -> Dict[str, type]:
3838
"double": float,
3939
"text": str,
4040
"date": date,
41-
"date_ext": date,
4241
"pgdate": date,
4342
"timestamp": datetime,
44-
"timestamp_ext": datetime,
4543
"timestampntz": datetime,
4644
"timestamptz": datetime,
4745
"Nothing null": str,

tests/unit/db_conftest.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def query_description() -> List[Column]:
2626
Column("float64", "double", None, None, None, None, None),
2727
Column("string", "text", None, None, None, None, None),
2828
Column("date", "date", None, None, None, None, None),
29-
Column("date32", "date_ext", None, None, None, None, None),
3029
Column("datetime", "timestamp", None, None, None, None, None),
31-
Column("datetime64", "timestamp_ext", None, None, None, None, None),
3230
Column("bool", "boolean", None, None, None, None, None),
3331
Column("array", "array(int)", None, None, None, None, None),
3432
Column("decimal", "Decimal(12, 34)", None, None, None, None, None),
@@ -49,9 +47,7 @@ def python_query_description() -> List[Column]:
4947
Column("float64", float, None, None, None, None, None),
5048
Column("string", str, None, None, None, None, None),
5149
Column("date", date, None, None, None, None, None),
52-
Column("date32", date, None, None, None, None, None),
5350
Column("datetime", datetime, None, None, None, None, None),
54-
Column("datetime64", datetime, None, None, None, None, None),
5551
Column("bool", bool, None, None, None, None, None),
5652
Column("array", ARRAY(int), None, None, None, None, None),
5753
Column("decimal", DECIMAL(12, 34), None, None, None, None, None),
@@ -73,9 +69,7 @@ def query_data() -> List[List[ColType]]:
7369
"1.0387398573",
7470
"some text",
7571
"2019-07-31",
76-
"1860-01-31",
7772
"2019-07-31 01:01:01",
78-
"2020-07-31 01:01:01.1234",
7973
1,
8074
[1, 2, 3, 4],
8175
"123456789.123456789123456789123456789",
@@ -99,9 +93,7 @@ def python_query_data() -> List[List[ColType]]:
9993
1.0387398573,
10094
"some text",
10195
date(2019, 7, 31),
102-
date(1860, 1, 31),
10396
datetime(2019, 7, 31, 1, 1, 1),
104-
datetime(2020, 7, 31, 1, 1, 1, 123400),
10597
1,
10698
[1, 2, 3, 4],
10799
Decimal("123456789.123456789123456789123456789"),

0 commit comments

Comments
 (0)