File tree Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Original file line number Diff line number Diff line change
1
+ # 2.4.5
2
+
3
+ * [ FIX] fix importing ` typing_extensions ` on Python >= 3.11
4
+
1
5
# 2.4.4
2
6
3
7
* [ FIX] fix pyproject.toml build sources and specify package inclusion for sdist and wheel
Original file line number Diff line number Diff line change 1
- FROM python:3.12 -alpine
1
+ FROM python:3.13 -alpine
2
2
3
3
LABEL maintainer="https://github.com/techouse"
4
4
Original file line number Diff line number Diff line change 1
1
"""Utility to transfer data from MySQL to SQLite 3."""
2
2
3
- __version__ = "2.4.4 "
3
+ __version__ = "2.4.5 "
4
4
5
5
from .transporter import MySQLtoSQLite
Original file line number Diff line number Diff line change 12
12
from sys import stdout
13
13
14
14
import mysql .connector
15
- import typing_extensions as tx
16
15
from mysql .connector import CharacterSet , errorcode
17
16
from mysql .connector .abstracts import MySQLConnectionAbstract
18
17
from mysql .connector .types import RowItemType
19
18
from tqdm import tqdm , trange
20
19
20
+
21
+ try :
22
+ # Python 3.11+
23
+ from typing import Unpack # type: ignore[attr-defined]
24
+ except ImportError :
25
+ # Python < 3.11
26
+ from typing_extensions import Unpack # type: ignore
27
+
21
28
from mysql_to_sqlite3 .mysql_utils import CHARSET_INTRODUCERS
22
29
from mysql_to_sqlite3 .sqlite_utils import (
23
30
CollatingSequences ,
@@ -38,7 +45,7 @@ class MySQLtoSQLite(MySQLtoSQLiteAttributes):
38
45
COLUMN_PATTERN : t .Pattern [str ] = re .compile (r"^[^(]+" )
39
46
COLUMN_LENGTH_PATTERN : t .Pattern [str ] = re .compile (r"\(\d+\)$" )
40
47
41
- def __init__ (self , ** kwargs : tx . Unpack [MySQLtoSQLiteParams ]) -> None :
48
+ def __init__ (self , ** kwargs : Unpack [MySQLtoSQLiteParams ]) -> None :
42
49
"""Constructor."""
43
50
if kwargs .get ("mysql_database" ) is not None :
44
51
self ._mysql_database = str (kwargs .get ("mysql_database" ))
Original file line number Diff line number Diff line change 5
5
from logging import Logger
6
6
from sqlite3 import Connection , Cursor
7
7
8
- import typing_extensions as tx
9
8
from mysql .connector .abstracts import MySQLConnectionAbstract
10
9
from mysql .connector .cursor import MySQLCursorDict , MySQLCursorPrepared , MySQLCursorRaw
11
10
12
11
13
- class MySQLtoSQLiteParams (tx .TypedDict ):
12
+ try :
13
+ # Python 3.11+
14
+ from typing import TypedDict # type: ignore[attr-defined]
15
+ except ImportError :
16
+ # Python < 3.11
17
+ from typing_extensions import TypedDict
18
+
19
+
20
+ class MySQLtoSQLiteParams (TypedDict ):
14
21
"""MySQLtoSQLite parameters."""
15
22
16
23
buffered : t .Optional [bool ]
You can’t perform that action at this time.
0 commit comments