[3.9] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) (#99230)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 10 Nov 2022 15:57:41 +0000 (07:57 -0800)
committerAdrian Bunk <bunk@debian.org>
Sun, 1 Dec 2024 12:12:57 +0000 (14:12 +0200)
commit82f8d2bb35b02eebf35c0a4a4760feaeee06438f
tree6b644dc2e64064f9c93e79e55ad911d527644c24
parenta5682ef492da12d9f02eb51f1fe06aa40a4dde5c
[3.9] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) (#99230)

There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

(cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d)
(cherry picked from commit a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Gbp-Pq: Name 0011-3.9-gh-98433-Fix-quadratic-time-idna-decoding.-GH-99.patch
Lib/encodings/idna.py
Lib/test/test_codecs.py