File tree Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change 33"""
44
55import functools
6- import hashlib
76import os
87import sys
98import time
@@ -394,16 +393,7 @@ def write_tox_file(packages: dict) -> None:
394393 file .write ("\n " )
395394
396395
397- def _get_tox_hash ():
398- hasher = hashlib .md5 ()
399- with open (TOX_FILE , "rb" ) as f :
400- buf = f .read ()
401- hasher .update (buf )
402-
403- return hasher .hexdigest ()
404-
405-
406- def main (fail_on_changes : bool = False ) -> None :
396+ def main () -> None :
407397 print ("Finding out the lowest and highest Python version supported by the SDK..." )
408398 global MIN_PYTHON_VERSION , MAX_PYTHON_VERSION
409399 sdk_python_versions = determine_python_versions (fetch_package ("sentry_sdk" ))
@@ -488,19 +478,8 @@ def main(fail_on_changes: bool = False) -> None:
488478 }
489479 )
490480
491- old_hash = _get_tox_hash ()
492481 write_tox_file (packages )
493- new_hash = _get_tox_hash ()
494- if fail_on_changes and old_hash != new_hash :
495- raise RuntimeError (
496- "There are unexpected changes in tox.ini. tox.ini is not meant to "
497- "be edited directly. It's generated from a template located in "
498- "scripts/populate_tox/tox.jinja. "
499- "Please make sure that both the template and the tox generation "
500- "script in scripts/populate_tox/populate_tox.py are updated as well."
501- )
502482
503483
504484if __name__ == "__main__" :
505- fail_on_changes = len (sys .argv ) == 2 and sys .argv [1 ] == "--fail-on-changes"
506- main (fail_on_changes )
485+ main ()
You can’t perform that action at this time.
0 commit comments