You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Quadratic parsing time in ftplib.parse227() #162867
I tested ftplib.parse227() directly on CPython 3.11 and 3.15. The parser searches the reply for the numeric fields of a PASV response. For some inputs, it repeats matching work, and parsing time grows quadratically with input length.
I would expect parsing time to scale linearly with input length while preserving the current behavior for valid replies.
Activity
encukou commentedon Nov 30, 2026
Please do. Thank you!
pythongh-162867: Fix quadratic parsing time in ftplib.parse227()
pythongh-162867: Use a resolvable reference in the NEWS entry
pythongh-162867: Address review feedback on parse227()
pythongh-162867: Bound parse227() regression test execution time
pythongh-162867: Move ftplib parsing tests to MiscTestCase
pythongh-162867: Build the parse227() regex more readably