[3.12] bpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408) by miss-islington · Pull Request #113495 · python/cpython

…ime() (pythonGH-13408)

Previously some error messages complained about incompatible
combinations of directives that are not contained in the format string.

(cherry picked from commit 4b2c3e8)

Co-authored-by: Gordon P. Hemsley <me@gphemsley.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>