@@ -53,10 +53,6 @@ def git_ls_remote_versions(url) -> list[VersionTuple]:
53
53
if version .is_prerelease :
54
54
log .info ("Ignoring pre-release %r" , str (version ))
55
55
continue
56
- # Do not upgrade past 20.22.0 to keep python 3.6 compat
57
- if version >= Version ("20.22.0" ):
58
- log .info ("Ignoring %r which is not compatible with python 3.6" , str (version ))
59
- continue
60
56
versions .append (VersionTuple (version , version_string ))
61
57
except InvalidVersion :
62
58
log .warning ("Ignoring ref %r" , ref )
@@ -82,15 +78,20 @@ def update_virtualenv(force: bool, level: str) -> None:
82
78
83
79
original_toml = toml_file_path .read_text ()
84
80
with toml_file_path .open ("rb" ) as f :
85
- loaded_file = tomllib .load (f )
86
- version = str (loaded_file ["version" ])
81
+ configurations = tomllib .load (f )
82
+ default = configurations .pop ("default" )
83
+ version = str (default ["version" ])
87
84
versions = git_ls_remote_versions (GET_VIRTUALENV_GITHUB )
88
85
if versions [0 ].version > Version (version ):
89
86
version = versions [0 ].version_string
90
87
91
- result_toml = (
92
- f'version = "{ version } "\n '
93
- f'url = "{ GET_VIRTUALENV_URL_TEMPLATE .format (version = version )} "\n '
88
+ configurations ["default" ] = {
89
+ "version" : version ,
90
+ "url" : GET_VIRTUALENV_URL_TEMPLATE .format (version = version ),
91
+ }
92
+ result_toml = "" .join (
93
+ f'{ key } = {{ version = "{ value ["version" ]} ", url = "{ value ["url" ]} " }}\n '
94
+ for key , value in configurations .items ()
94
95
)
95
96
96
97
rich .print () # spacer
0 commit comments