Skip to content

Commit b6b1b89

Browse files
committed
Remove mysql-connector-python dependency
1 parent f612190 commit b6b1b89

File tree

11 files changed

+200
-215
lines changed

11 files changed

+200
-215
lines changed

sdks/python/apache_beam/yaml/integration_tests.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from datetime import timezone
3434

3535
import mock
36-
import mysql.connector
3736
import psycopg2
3837
import pytds
3938
import sqlalchemy
@@ -286,26 +285,22 @@ def temp_mysql_database():
286285
Exception: Any other exception encountered during the setup process.
287286
"""
288287
with MySqlContainer(init=True, dialect='pymysql') as mysql_container:
289-
try:
290-
# Make connection to temp database and create tmp table
291-
engine = sqlalchemy.create_engine(mysql_container.get_connection_url())
292-
with engine.begin() as connection:
293-
connection.execute(
294-
sqlalchemy.text(
295-
"CREATE TABLE tmp_table (value INTEGER, `rank` INTEGER);"))
288+
# Make connection to temp database and create tmp table
289+
engine = sqlalchemy.create_engine(mysql_container.get_connection_url())
290+
with engine.begin() as connection:
291+
connection.execute(
292+
sqlalchemy.text(
293+
"CREATE TABLE tmp_table (value INTEGER, `rank` INTEGER);"))
296294

297-
# Construct the JDBC url for connections later on by tests
298-
jdbc_url = (
299-
f"jdbc:mysql://{mysql_container.get_container_host_ip()}:"
300-
f"{mysql_container.get_exposed_port(mysql_container.port)}/"
301-
f"{mysql_container.dbname}?"
302-
f"user={mysql_container.username}&"
303-
f"password={mysql_container.password}")
295+
# Construct the JDBC url for connections later on by tests
296+
jdbc_url = (
297+
f"jdbc:mysql://{mysql_container.get_container_host_ip()}:"
298+
f"{mysql_container.get_exposed_port(mysql_container.port)}/"
299+
f"{mysql_container.dbname}?"
300+
f"user={mysql_container.username}&"
301+
f"password={mysql_container.password}")
304302

305-
yield jdbc_url
306-
except mysql.connector.Error as err:
307-
logging.error("Error interacting with temporary MySQL DB: %s", err)
308-
raise err
303+
yield jdbc_url
309304

310305

311306
@contextlib.contextmanager

sdks/python/container/py310/base_image_requirements.txt

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ build==1.3.0
3737
cachetools==5.5.2
3838
certifi==2025.8.3
3939
cffi==1.17.1
40-
charset-normalizer==3.4.2
40+
charset-normalizer==3.4.3
4141
click==8.2.1
42-
cloud-sql-python-connector==1.18.3
42+
cloud-sql-python-connector==1.18.4
4343
crcmod==1.7
4444
cryptography==45.0.6
45-
Cython==3.1.2
45+
Cython==3.1.3
4646
dill==0.3.1.1
4747
dnspython==2.7.0
4848
docker==7.1.0
@@ -51,17 +51,17 @@ docstring_parser==0.17.0
5151
exceptiongroup==1.3.0
5252
execnet==2.1.1
5353
fastavro==1.12.0
54-
fasteners==0.19
55-
freezegun==1.5.4
54+
fasteners==0.20
55+
freezegun==1.5.5
5656
frozenlist==1.7.0
5757
future==1.0.0
5858
google-api-core==2.25.1
59-
google-api-python-client==2.178.0
59+
google-api-python-client==2.179.0
6060
google-apitools==0.5.31
6161
google-auth==2.40.3
6262
google-auth-httplib2==0.2.0
63-
google-cloud-aiplatform==1.108.0
64-
google-cloud-bigquery==3.35.1
63+
google-cloud-aiplatform==1.110.0
64+
google-cloud-bigquery==3.36.0
6565
google-cloud-bigquery-storage==2.32.0
6666
google-cloud-bigtable==2.32.0
6767
google-cloud-core==2.4.3
@@ -73,12 +73,12 @@ google-cloud-pubsub==2.31.1
7373
google-cloud-pubsublite==1.12.0
7474
google-cloud-recommendations-ai==0.10.18
7575
google-cloud-resource-manager==1.14.2
76-
google-cloud-spanner==3.56.0
76+
google-cloud-spanner==3.57.0
7777
google-cloud-storage==2.19.0
7878
google-cloud-videointelligence==2.16.2
7979
google-cloud-vision==3.10.2
8080
google-crc32c==1.7.1
81-
google-genai==1.29.0
81+
google-genai==1.31.0
8282
google-resumable-media==2.7.2
8383
googleapis-common-protos==1.70.0
8484
greenlet==3.2.4
@@ -92,18 +92,18 @@ hdfs==2.7.3
9292
httpcore==1.0.9
9393
httplib2==0.22.0
9494
httpx==0.28.1
95-
hypothesis==6.137.1
95+
hypothesis==6.138.2
9696
idna==3.10
9797
importlib_metadata==8.7.0
9898
iniconfig==2.1.0
9999
jaraco.classes==3.4.0
100100
jaraco.context==6.0.1
101-
jaraco.functools==4.2.1
101+
jaraco.functools==4.3.0
102102
jeepney==0.9.0
103103
Jinja2==3.1.6
104104
joblib==1.5.1
105105
jsonpickle==3.4.2
106-
jsonschema==4.25.0
106+
jsonschema==4.25.1
107107
jsonschema-specifications==2025.4.1
108108
keyring==25.6.0
109109
keyrings.google-artifactregistry-auth==1.1.2
@@ -114,8 +114,7 @@ pymilvus==2.5.10
114114
mmh3==5.2.0
115115
mock==5.2.0
116116
more-itertools==10.7.0
117-
multidict==6.6.3
118-
mysql-connector-python==9.4.0
117+
multidict==6.6.4
119118
nltk==3.9.1
120119
numpy==2.2.6
121120
oauth2client==4.1.3
@@ -124,7 +123,7 @@ opentelemetry-api==1.36.0
124123
opentelemetry-sdk==1.36.0
125124
opentelemetry-semantic-conventions==0.57b0
126125
oracledb==3.3.0
127-
orjson==3.11.1
126+
orjson==3.11.2
128127
overrides==7.7.0
129128
packaging==25.0
130129
pandas==2.2.3
@@ -146,7 +145,7 @@ pydantic_core==2.33.2
146145
pydot==1.4.2
147146
PyHamcrest==2.1.0
148147
PyJWT==2.10.1
149-
pymongo==4.14.0
148+
pymongo==4.14.1
150149
PyMySQL==1.1.1
151150
pyparsing==3.2.3
152151
pyproject_hooks==1.2.0
@@ -155,13 +154,13 @@ pytest-timeout==2.4.0
155154
pytest-xdist==3.8.0
156155
python-dateutil==2.9.0.post0
157156
python-dotenv==1.1.1
158-
python-tds==1.16.1
157+
python-tds==1.17.0
159158
pytz==2025.2
160159
PyYAML==6.0.2
161160
redis==5.3.1
162161
referencing==0.36.2
163162
regex==2025.7.34
164-
requests==2.32.4
163+
requests==2.32.5
165164
requests-mock==1.12.1
166165
rpds-py==0.27.0
167166
rsa==4.9.1
@@ -175,7 +174,7 @@ six==1.17.0
175174
sniffio==1.3.1
176175
sortedcontainers==2.4.0
177176
soupsieve==2.7
178-
SQLAlchemy==2.0.42
177+
SQLAlchemy==2.0.43
179178
sqlalchemy_pytds==1.0.2
180179
sqlparse==0.5.3
181180
tenacity==8.5.0
@@ -191,7 +190,7 @@ urllib3==2.5.0
191190
virtualenv-clone==0.5.7
192191
websockets==15.0.1
193192
wheel==0.45.1
194-
wrapt==1.17.2
193+
wrapt==1.17.3
195194
yarl==1.20.1
196195
zipp==3.23.0
197-
zstandard==0.23.0
196+
zstandard==0.24.0

sdks/python/container/py310/ml_image_requirements.txt

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ build==1.3.0
3939
cachetools==5.5.2
4040
certifi==2025.8.3
4141
cffi==1.17.1
42-
charset-normalizer==3.4.2
42+
charset-normalizer==3.4.3
4343
click==8.2.1
44-
cloud-sql-python-connector==1.18.3
44+
cloud-sql-python-connector==1.18.4
4545
crcmod==1.7
4646
cryptography==45.0.6
47-
Cython==3.1.2
47+
Cython==3.1.3
4848
dill==0.3.1.1
4949
dnspython==2.7.0
5050
docker==7.1.0
@@ -53,21 +53,21 @@ docstring_parser==0.17.0
5353
exceptiongroup==1.3.0
5454
execnet==2.1.1
5555
fastavro==1.12.0
56-
fasteners==0.19
57-
filelock==3.18.0
56+
fasteners==0.20
57+
filelock==3.19.1
5858
flatbuffers==25.2.10
59-
freezegun==1.5.4
59+
freezegun==1.5.5
6060
frozenlist==1.7.0
6161
fsspec==2025.7.0
6262
future==1.0.0
6363
gast==0.6.0
6464
google-api-core==2.25.1
65-
google-api-python-client==2.178.0
65+
google-api-python-client==2.179.0
6666
google-apitools==0.5.31
6767
google-auth==2.40.3
6868
google-auth-httplib2==0.2.0
69-
google-cloud-aiplatform==1.108.0
70-
google-cloud-bigquery==3.35.1
69+
google-cloud-aiplatform==1.110.0
70+
google-cloud-bigquery==3.36.0
7171
google-cloud-bigquery-storage==2.32.0
7272
google-cloud-bigtable==2.32.0
7373
google-cloud-core==2.4.3
@@ -79,12 +79,12 @@ google-cloud-pubsub==2.31.1
7979
google-cloud-pubsublite==1.12.0
8080
google-cloud-recommendations-ai==0.10.18
8181
google-cloud-resource-manager==1.14.2
82-
google-cloud-spanner==3.56.0
82+
google-cloud-spanner==3.57.0
8383
google-cloud-storage==2.19.0
8484
google-cloud-videointelligence==2.16.2
8585
google-cloud-vision==3.10.2
8686
google-crc32c==1.7.1
87-
google-genai==1.29.0
87+
google-genai==1.31.0
8888
google-pasta==0.2.0
8989
google-resumable-media==2.7.2
9090
googleapis-common-protos==1.70.0
@@ -97,30 +97,30 @@ guppy3==3.1.5
9797
h11==0.16.0
9898
h5py==3.14.0
9999
hdfs==2.7.3
100-
hf-xet==1.1.7
100+
hf-xet==1.1.8
101101
httpcore==1.0.9
102102
httplib2==0.22.0
103103
httpx==0.28.1
104104
huggingface-hub==0.34.4
105-
hypothesis==6.137.1
105+
hypothesis==6.138.2
106106
idna==3.10
107107
importlib_metadata==8.7.0
108108
iniconfig==2.1.0
109109
jaraco.classes==3.4.0
110110
jaraco.context==6.0.1
111-
jaraco.functools==4.2.1
111+
jaraco.functools==4.3.0
112112
jeepney==0.9.0
113113
Jinja2==3.1.6
114114
joblib==1.5.1
115115
jsonpickle==3.4.2
116-
jsonschema==4.25.0
116+
jsonschema==4.25.1
117117
jsonschema-specifications==2025.4.1
118-
keras==3.11.1
118+
keras==3.11.2
119119
keyring==25.6.0
120120
keyrings.google-artifactregistry-auth==1.1.2
121121
libclang==18.1.1
122122
Markdown==3.8.2
123-
markdown-it-py==3.0.0
123+
markdown-it-py==4.0.0
124124
MarkupSafe==3.0.2
125125
mdurl==0.1.2
126126
ujson==5.8.0
@@ -131,8 +131,7 @@ mmh3==5.2.0
131131
mock==5.2.0
132132
more-itertools==10.7.0
133133
mpmath==1.3.0
134-
multidict==6.6.3
135-
mysql-connector-python==9.4.0
134+
multidict==6.6.4
136135
namex==0.1.0
137136
networkx==3.4.2
138137
nltk==3.9.1
@@ -159,7 +158,7 @@ opentelemetry-semantic-conventions==0.57b0
159158
opt_einsum==3.4.0
160159
optree==0.17.0
161160
oracledb==3.3.0
162-
orjson==3.11.1
161+
orjson==3.11.2
163162
overrides==7.7.0
164163
packaging==25.0
165164
pandas==2.2.3
@@ -182,7 +181,7 @@ pydot==1.4.2
182181
Pygments==2.19.2
183182
PyHamcrest==2.1.0
184183
PyJWT==2.10.1
185-
pymongo==4.14.0
184+
pymongo==4.14.1
186185
PyMySQL==1.1.1
187186
pyparsing==3.2.3
188187
pyproject_hooks==1.2.0
@@ -191,13 +190,13 @@ pytest-timeout==2.4.0
191190
pytest-xdist==3.8.0
192191
python-dateutil==2.9.0.post0
193192
python-dotenv==1.1.1
194-
python-tds==1.16.1
193+
python-tds==1.17.0
195194
pytz==2025.2
196195
PyYAML==6.0.2
197196
redis==5.3.1
198197
referencing==0.36.2
199198
regex==2025.7.34
200-
requests==2.32.4
199+
requests==2.32.5
201200
requests-mock==1.12.1
202201
rich==14.1.0
203202
rpds-py==0.27.0
@@ -213,7 +212,7 @@ six==1.17.0
213212
sniffio==1.3.1
214213
sortedcontainers==2.4.0
215214
soupsieve==2.7
216-
SQLAlchemy==2.0.42
215+
SQLAlchemy==2.0.43
217216
sqlalchemy_pytds==1.0.2
218217
sqlparse==0.5.3
219218
sympy==1.14.0
@@ -230,7 +229,7 @@ tokenizers==0.21.4
230229
tomli==2.2.1
231230
torch==2.7.1
232231
tqdm==4.67.1
233-
transformers==4.48.3
232+
transformers==4.55.3
234233
triton==3.3.1
235234
typing-inspection==0.4.1
236235
typing_extensions==4.14.1
@@ -241,7 +240,7 @@ virtualenv-clone==0.5.7
241240
websockets==15.0.1
242241
Werkzeug==3.1.3
243242
wheel==0.45.1
244-
wrapt==1.17.2
243+
wrapt==1.17.3
245244
yarl==1.20.1
246245
zipp==3.23.0
247-
zstandard==0.23.0
246+
zstandard==0.24.0

0 commit comments

Comments
 (0)