pythondotorg icon indicating copy to clipboard operation
pythondotorg copied to clipboard

feat: sanitize release names upon submission

Open JacobCoffee opened this issue 7 months ago • 3 comments

Description

  • Clean release name field to ensure no errors when loading release pages

Closes #2724

JacobCoffee avatar May 06 '25 15:05 JacobCoffee

@JacobCoffee is there an issue associated with this PR? I mean it makes sense but hard to say if it is "correct" without some documenting reason.

ewdurbin avatar May 06 '25 15:05 ewdurbin

yeah sorry, i thought if i put it in the commit message it would link it

JacobCoffee avatar May 06 '25 15:05 JacobCoffee

doh...

before i do all the migrations and things, do you think overriding the name on the NameSlugModel and adding the validator is still the best path @ewdurbin? I'm okay with either just wanting to make sure

JacobCoffee avatar May 06 '25 15:05 JacobCoffee

This should also allows pre-release names such as:

  • Python 3.15.0a1, Python 3.15.0b2, Python 3.15.0rc3

And we now also have Python install manager releases with names like:

  • Python install manager 25.0
  • Python install manager 25.1 beta 1

https://www.python.org/admin/downloads/release/


Also this PR has flipped the order of Slug and Name:

image

Let's keep Name first like in production:

image

hugovk avatar Nov 22 '25 11:11 hugovk