classification
Title: [RFC] wrong variable used in Lib/poplib.py
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola, mark.dickinson, vincele
Priority: normal Keywords: patch

Created on 2009-08-01 22:24 by vincele, last changed 2009-08-06 16:08 by mark.dickinson. This issue is now closed.

Files
File name Uploaded Description Edit
py3k-poplib.py-use-wrong-variable.patch vincele, 2009-08-01 22:24 use 'password' variable instead of 'secret'
py3k-poplib.py-use-wrong-variable-unittest.patch vincele, 2009-08-04 21:51 untested unittest for POP3.apop()
issue6622.patch mark.dickinson, 2009-08-06 14:35
Messages (7)
msg91175 - (view) Author: Vincent Legoll (vincele) Date: 2009-08-01 22:24
The poplib modules use the 'secret' variable during its creation, this
may be a mistake. Perhaps the intention was to use the 'password' instead...
msg91189 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-08-02 16:28
Comparing with trunk, I agree that it seems very likely that 'password' is 
intended here.

It's unfortunate that the test-suite doesn't expose this bug;  it would be 
good to come up with a test that covers this.
msg91275 - (view) Author: Vincent Legoll (vincele) Date: 2009-08-04 21:51
Could someone ensure the attached unittest does the job, I blindly
copied from above...

I don't know how to launch an unittest with the svn 'Lib', it takes the
system one and just messing with PYTHONPATH won't work either.
msg91363 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-08-06 14:35
> Could someone ensure the attached unittest does the job, I blindly
> copied from above...

Unfortunately it doesn't, because the apop method needs a timestamp in the 
welcome message in order to work.  I've adapted it to make this work---see 
attached patch 'issue6622.patch'.

> I don't know how to launch an unittest with the svn 'Lib', it takes
> the system one and just messing with PYTHONPATH won't work either.

I'm not entirely sure what you're asking here.  On OS X, I usually do 
something like the following at a Terminal prompt:

newton:py3k dickinsm$ ./python.exe Lib/test/test_poplib.py

For better control over output and various other things, use the regrtest 
module:

newton:py3k dickinsm$ ./python.exe Lib/test/regrtest.py -v test_poplib

(execute Lib/test/regrtest.py --help to see a list of options).
msg91364 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-08-06 14:38
Adding Giampaolo Rodola to the nosy list, since he worked on the test code 
recently.  Giampaolo, any comments?
msg91365 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2009-08-06 15:49
@Mark
I can't test your patch right now as I don't have a Python 3.x installed
here but it looks good to me.
msg91366 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-08-06 16:08
Patch committed, r74330 (py3k) and r74331 (release31-maint).
Thanks, Giampaolo and Vincent!
History
Date User Action Args
2009-08-06 16:08:44mark.dickinsonsetstatus: open -> closed
resolution: fixed
messages: + msg91366
2009-08-06 15:49:11giampaolo.rodolasetmessages: + msg91365
2009-08-06 14:38:12mark.dickinsonsetnosy: + giampaolo.rodola
messages: + msg91364
2009-08-06 14:35:29mark.dickinsonsetfiles: + issue6622.patch

messages: + msg91363
2009-08-04 21:51:36vincelesetfiles: + py3k-poplib.py-use-wrong-variable-unittest.patch

messages: + msg91275
2009-08-02 16:28:34mark.dickinsonsetversions: + Python 3.1
nosy: + mark.dickinson

messages: + msg91189

type: behavior
stage: test needed
2009-08-01 22:24:46vincelecreate