@@ -207,11 +207,15 @@ def parse_modules(*, module_ctx, logger, _fail = fail):
207207 # "3.X"` transitions work as expected.
208208 minor_version_toolchains = []
209209 other_toolchains = []
210- minor_mapping = list (config .minor_mapping .values () )
210+ minor_mapping = list ([ minor for minor , full in config .minor_mapping .items () if full ] )
211211 for t in toolchains :
212212 # FIXME @aignas 2025-04-04: How can we unit test that this ordering is
213213 # consistent with what would actually work?
214- if config .minor_mapping .get (t .python_version , t .python_version ) in minor_mapping :
214+ py_version = config .minor_mapping .get (t .python_version , t .python_version )
215+ if not py_version :
216+ # disable version
217+ continue
218+ elif py_version in minor_mapping :
215219 minor_version_toolchains .append (t )
216220 else :
217221 other_toolchains .append (t )
@@ -840,7 +844,11 @@ def _get_toolchain_config(*, modules, _fail = fail):
840844
841845 return struct (
842846 kwargs = kwargs ,
843- minor_mapping = minor_mapping ,
847+ # TODO @aignas 2025-11-04: better place for this?
848+ minor_mapping = minor_mapping | {
849+ # Add unsupported versions here
850+ "3.8" : "" ,
851+ },
844852 default = default ,
845853 register_all_versions = register_all_versions ,
846854 )
@@ -940,7 +948,11 @@ def _create_toolchain_attr_structs(*, mod, config, seen_versions):
940948 if config .register_all_versions :
941949 arg_structs .extend ([
942950 _create_toolchain_attrs_struct (python_version = v )
943- for v in config .default ["tool_versions" ].keys () + config .minor_mapping .keys ()
951+ for v in config .default ["tool_versions" ].keys () + [
952+ minor
953+ for minor , full in config .minor_mapping .items ()
954+ if full
955+ ]
944956 if v not in seen_versions
945957 ])
946958
0 commit comments