@@ -83,13 +83,14 @@ class _Options:
8383 },
8484 )
8585
86- insert_marker = attr .ib (
86+ start_marker = attr .ib (
8787 type = str ,
8888 default = "scriv-insert-here" ,
8989 metadata = {
9090 "doc" : """\
9191 A marker string indicating where in the changelog file new
92- entries should be inserted.
92+ entries should be inserted. The old name for this setting is
93+ :ref:`insert_marker <deprecated_config>`.
9394 """ ,
9495 },
9596 )
@@ -223,6 +224,13 @@ class _Options:
223224 )
224225
225226
227+ # Map of old config names to new config names.
228+ REPLACED_NAMES = [
229+ ("output_file" , "changelog" ),
230+ ("insert_marker" , "start_marker" ),
231+ ]
232+
233+
226234@contextlib .contextmanager
227235def validator_exceptions ():
228236 """
@@ -333,7 +341,8 @@ def read_one_config(self, configfile: str) -> None:
333341 scriv_data = parser [section_name ]
334342 for attrdef in attr .fields (_Options ):
335343 self .get_set_option (scriv_data , attrdef .name , attrdef .name )
336- self .get_set_option (scriv_data , "output_file" , "changelog" )
344+ for old , new in REPLACED_NAMES :
345+ self .get_set_option (scriv_data , old , new )
337346
338347 def read_one_toml (self , tomlfile : str ) -> None :
339348 """
@@ -368,7 +377,8 @@ def read_one_toml(self, tomlfile: str) -> None:
368377 return
369378 for attrdef in attr .fields (_Options ):
370379 self .get_set_option (scriv_data , attrdef .name , attrdef .name )
371- self .get_set_option (scriv_data , "output_file" , "changelog" )
380+ for old , new in REPLACED_NAMES :
381+ self .get_set_option (scriv_data , old , new )
372382
373383 def resolve_value (self , value : str ) -> str :
374384 """
0 commit comments