classification
Title: Lib/ftplib.py netrc class parsing problem
Type: Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: vincele
Priority: normal Keywords: patch

Created on 2009-08-01 22:25 by vincele, last changed 2009-08-04 22:04 by vincele.

Files
File name Uploaded Description Edit
py3k-ftplib.py-use-before-assignment.patch vincele, 2009-08-01 22:29 fix for the macro parsing in ftplib review
Messages (2)
msg91176 - (view) Author: Vincent Legoll (vincele) Date: 2009-08-01 22:29
The 'macro_lines' list should probably be emptied upon leaving macro
parsing mode.

Simplify code by using the 'macro_name' variable as the boolean for
macro parsing mode.

Deprecated code probably should be fixed until completely removed
msg91278 - (view) Author: Vincent Legoll (vincele) Date: 2009-08-04 22:04
If the macro_lines is not emptied upon end of parsing a macro
definition, if there's another macro definiton it will 'inherit' the
lines from the previous one, which could very well be uncool.

The use before definition should also be fixed.

Please advise if a better fix would be to completely remove the Netrc
class from ftplib, or replace it with a compatibility wrapper that use
the netrc module.
History
Date User Action Args
2009-08-04 22:04:31vincelesetmessages: + msg91278
2009-08-01 22:29:40vincelesetfiles: + py3k-ftplib.py-use-before-assignment.patch
keywords: + patch
messages: + msg91176

title: Lib/ftplib.py -> Lib/ftplib.py netrc class parsing problem
2009-08-01 22:25:35vincelecreate