@@ -160,7 +160,7 @@ def main() -> None:
160160 ext_modules = EXTENSIONS ,
161161 cmdclass = COMMAND_CLASSES ,
162162 python_requires = ">=3.9" ,
163- install_requires = ["protobuf==4.25.3 " ],
163+ install_requires = ["protobuf==5.29.4 " ],
164164 extras_require = {
165165 "dns-srv" : ["dnspython==2.6.1" ],
166166 "compression" : ["lz4>=2.1.6,<=4.3.2" , "zstandard==0.23.0" ],
@@ -177,29 +177,31 @@ def copy_metadata_files() -> None:
177177
178178
179179def 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."""
182181 with open (pathlib .Path (os .getcwd (), "../README.rst" )) as file_handle :
183182 # The README.rst text is meant to be shared by both mysql and mysqlx packages, so after getting it we need to
184183 # parse it in order to remove the bits of text that are not meaningful for this package (mysqlx)
185184 long_description = file_handle .read ()
186185 block_matches = re .finditer (
187186 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+"
189188 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,})"
191190 ),
192191 string = long_description ,
193- flags = re .DOTALL )
192+ flags = re .DOTALL ,
193+ )
194194 for block_match in block_matches :
195- if block_match .group ("module_name" ) == ' mysql' :
195+ if block_match .group ("module_name" ) == " mysql" :
196196 long_description = long_description .replace (block_match .group (), "" )
197197 else :
198198 block_text = block_match .group ("block_text" )
199199 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+ )
203205 for repl_match in repl_matches :
204206 repl_name = repl_match .group ("repl_name" )
205207 repl_source = repl_match .group ("repl_source" )
@@ -211,9 +213,11 @@ def get_long_description() -> str:
211213 long_description = long_description .replace (block_match .group (), block_text )
212214 # Make replacements for files that are directly accessible within GitHub but not within PyPI
213215 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+ )
217221 return long_description
218222
219223
0 commit comments