File tree Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -431,13 +431,32 @@ pub fn get_project_info(use_defaults: bool) -> Result<ProjectInfo> {
431431 let github_actions_python_test_version_default =
432432 match config. github_actions_python_test_versions {
433433 Some ( versions) => versions,
434- None => vec ! [
435- "3.8" . to_string( ) ,
436- "3.9" . to_string( ) ,
437- "3.10" . to_string( ) ,
438- "3.11" . to_string( ) ,
439- "3.12" . to_string( ) ,
440- ] ,
434+ None => {
435+ let mut split_version = min_python_version. split ( '.' ) ;
436+ if let Some ( v) = split_version. nth ( 1 ) {
437+ let min = v. parse :: < i32 > ( ) ?;
438+ if min >= 12 {
439+ vec ! [ format!( "3.{min}" ) ]
440+ } else {
441+ let mut versions: Vec < String > = Vec :: new ( ) ;
442+
443+ // Up to 3.12
444+ for i in min..13 {
445+ versions. push ( format ! ( "3.{i}" ) ) ;
446+ }
447+
448+ versions
449+ }
450+ } else {
451+ vec ! [
452+ "3.8" . to_string( ) ,
453+ "3.9" . to_string( ) ,
454+ "3.10" . to_string( ) ,
455+ "3.11" . to_string( ) ,
456+ "3.12" . to_string( ) ,
457+ ]
458+ }
459+ }
441460 } ;
442461 let github_actions_python_test_versions = if use_defaults {
443462 github_actions_python_test_version_default
You can’t perform that action at this time.
0 commit comments