          'sitemaps/kml/<label>/<model>/<field_name>.kml',
          gis_sitemap_views.kml,
          name='django.contrib.gis.sitemaps.views.kml'),
      path(
          'sitemaps/kml/<label>/<<model>/<field_name>.kmz',
          gis_sitemap_views.kmz,
          name='django.contrib.gis.sitemaps.views.kmz'),
  ]
 
</s> remove     path(r'(?P<named-group>\d+)', lambda x: x),
 </s> add     path(r'(?P<named_group>\d+)', lambda x: x), </s> remove     def test_non_identifier_parameter_name_causes_exception(self):
 </s> add     def test_integer_parameter_name_causes_exception(self): </s> remove         expected_msg = "Your URL pattern '(?P<named-group>\\d+)' has a route"
 </s> add         expected_msg = "Your URL pattern '(?P<named_group>\\d+)' has a route" </s> remove     r'<(?:(?P<converter>[^>:]+):)?(?P<parameter>\w+)>'
 </s> add     r'<(?:(?P<converter>[^>:]+):)?(?P<parameter>[^>]+)>'
        'sitemaps/kml/<label>/<model>/<field_name>.kmz',
          'sitemaps/kml/<label>/<model>/<field_name>.kml',
          gis_sitemap_views.kml,
          name='django.contrib.gis.sitemaps.views.kml'),
      path(
        'sitemaps/kml/<label>/<model>/<field_name>.kmz',
          gis_sitemap_views.kmz,
          name='django.contrib.gis.sitemaps.views.kmz'),
  ]
keep keep keep keep replace keep keep keep
 Fixed #31459 -- Fixed handling invalid indentifiers in URL path conversion.

This patch adjusted existing tests that used invalid identifiers. 
tests/gis_tests/geoapp/urls.py