File tree Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ def _normalize_release(release: dict) -> dict:
665
665
return normalized
666
666
667
667
668
- def main (fail_on_changes : bool = False ) -> None :
668
+ def main (fail_on_changes : bool = False ) -> dict [ str , list ] :
669
669
"""
670
670
Generate tox.ini from the tox.jinja template.
671
671
@@ -825,6 +825,8 @@ def main(fail_on_changes: bool = False) -> None:
825
825
"files to reflect the new test targets."
826
826
)
827
827
828
+ return packages
829
+
828
830
829
831
if __name__ == "__main__" :
830
832
fail_on_changes = len (sys .argv ) == 2 and sys .argv [1 ] == "--fail-on-changes"
Original file line number Diff line number Diff line change
1
+ """
2
+ Find out what the actual minimum supported version of each framework/library is.
3
+ """
4
+
5
+ import os
6
+ import sys
7
+
8
+ populate_tox_dir = os .path .join (
9
+ os .path .dirname (os .path .abspath (__file__ )), "populate_tox"
10
+ )
11
+ sys .path .append (populate_tox_dir )
12
+
13
+ from populate_tox import main
14
+
15
+
16
+ def update ():
17
+ print ("Running populate_tox.py..." )
18
+ packages = main ()
19
+
20
+ print ("Figuring out the lowest supported version of integrations..." )
21
+ min_versions = []
22
+
23
+ for _ , integrations in packages .items ():
24
+ for integration in integrations :
25
+ min_versions .append (
26
+ (integration ["integration_name" ], str (integration ["releases" ][0 ]))
27
+ )
28
+
29
+ min_versions = sorted (
30
+ set (
31
+ [
32
+ (integration , tuple ([int (v ) for v in min_version .split ("." )]))
33
+ for integration , min_version in min_versions
34
+ ]
35
+ )
36
+ )
37
+
38
+ print ()
39
+ print ("Effective minimal versions:" )
40
+ print (
41
+ "(The format is the same as _MIN_VERSIONS in sentry_sdk/integrations/__init__.py for easy replacing.)"
42
+ )
43
+ print (
44
+ "(When updating these, make sure to also update the docs page for the integration.)"
45
+ )
46
+ print ()
47
+ for integration , min_version in min_versions :
48
+ print (f'"{ integration } ": { min_version } ,' )
49
+
50
+
51
+ if __name__ == "__main__" :
52
+ update ()
You can’t perform that action at this time.
0 commit comments