@@ -160,7 +160,7 @@ def main() -> None:
160
160
ext_modules = EXTENSIONS ,
161
161
cmdclass = COMMAND_CLASSES ,
162
162
python_requires = ">=3.9" ,
163
- install_requires = ["protobuf==4.25.3 " ],
163
+ install_requires = ["protobuf==5.29.4 " ],
164
164
extras_require = {
165
165
"dns-srv" : ["dnspython==2.6.1" ],
166
166
"compression" : ["lz4>=2.1.6,<=4.3.2" , "zstandard==0.23.0" ],
@@ -177,29 +177,31 @@ def copy_metadata_files() -> None:
177
177
178
178
179
179
def get_long_description () -> str :
180
- """Extracts a long description from the README.rst file that is suited for this specific package.
181
- """
180
+ """Extracts a long description from the README.rst file that is suited for this specific package."""
182
181
with open (pathlib .Path (os .getcwd (), "../README.rst" )) as file_handle :
183
182
# The README.rst text is meant to be shared by both mysql and mysqlx packages, so after getting it we need to
184
183
# parse it in order to remove the bits of text that are not meaningful for this package (mysqlx)
185
184
long_description = file_handle .read ()
186
185
block_matches = re .finditer (
187
186
pattern = (
188
- r' (?P<module_start>\.{2}\s+={2,}\s+(?P<module_tag>\<(?P<module_name>mysql|mysqlx|both)\>)(?P<repls>\s+'
187
+ r" (?P<module_start>\.{2}\s+={2,}\s+(?P<module_tag>\<(?P<module_name>mysql|mysqlx|both)\>)(?P<repls>\s+"
189
188
r'\[(?:(?:,\s*)?(?:repl(?:-mysql(?:x)?)?)\("(?:[^"]+)",\s*"(?:[^"]*)"\))+\])?\s+={2,})'
190
- r' (?P<block_text>.+?(?=\.{2}\s+={2,}))(?P<module_end>\.{2}\s+={2,}\s+\</(?P=module_name)\>\s+={2,})'
189
+ r" (?P<block_text>.+?(?=\.{2}\s+={2,}))(?P<module_end>\.{2}\s+={2,}\s+\</(?P=module_name)\>\s+={2,})"
191
190
),
192
191
string = long_description ,
193
- flags = re .DOTALL )
192
+ flags = re .DOTALL ,
193
+ )
194
194
for block_match in block_matches :
195
- if block_match .group ("module_name" ) == ' mysql' :
195
+ if block_match .group ("module_name" ) == " mysql" :
196
196
long_description = long_description .replace (block_match .group (), "" )
197
197
else :
198
198
block_text = block_match .group ("block_text" )
199
199
if block_match .group ("repls" ):
200
- repl_matches = re .finditer (pattern = r'(?P<repl_name>repl(?:-mysql(?:x)?)?)\("'
201
- r'(?P<repl_source>[^"]+)",\s*"(?P<repl_target>[^"]*)"\)+' ,
202
- string = block_match .group ("repls" ))
200
+ repl_matches = re .finditer (
201
+ pattern = r'(?P<repl_name>repl(?:-mysql(?:x)?)?)\("'
202
+ r'(?P<repl_source>[^"]+)",\s*"(?P<repl_target>[^"]*)"\)+' ,
203
+ string = block_match .group ("repls" ),
204
+ )
203
205
for repl_match in repl_matches :
204
206
repl_name = repl_match .group ("repl_name" )
205
207
repl_source = repl_match .group ("repl_source" )
@@ -211,9 +213,11 @@ def get_long_description() -> str:
211
213
long_description = long_description .replace (block_match .group (), block_text )
212
214
# Make replacements for files that are directly accessible within GitHub but not within PyPI
213
215
files_regex_fragment = "|" .join (mf .replace ("." , r"\." ) for mf in METADATA_FILES )
214
- long_description = re .sub (pattern = rf"\<(?P<file_name>{ files_regex_fragment } )\>" ,
215
- repl = f"<{ GITHUB_URL } /blob/trunk/\g<file_name>>" ,
216
- string = long_description )
216
+ long_description = re .sub (
217
+ pattern = rf"\<(?P<file_name>{ files_regex_fragment } )\>" ,
218
+ repl = f"<{ GITHUB_URL } /blob/trunk/\g<file_name>>" ,
219
+ string = long_description ,
220
+ )
217
221
return long_description
218
222
219
223
0 commit comments