[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: getpass.getpass('Password: ', sys.stdout) Traceback (most recent call last): File stdin, line 1, in module File /home/serhiy/py/cpython/Lib/getpass.py, line 72, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File

[issue11959] smtpd cannot be used without affecting global state

2013-06-06 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file30480/34974b9bc4d0.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11959 ___

[issue18146] Document miss, Stats objects has no method called print_results

2013-06-06 Thread Dmi Baranov
Dmi Baranov added the comment: Duplication of issue 18033 -- nosy: +dmi.baranov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18146 ___ ___

[issue11959] smtpd cannot be used without affecting global state

2013-06-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: LGTM now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11959 ___ ___ Python-bugs-list mailing list

[issue18146] Document miss, Stats objects has no method called print_results

2013-06-06 Thread hanks
Changes by hanks zhouhan...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18146 ___ ___ Python-bugs-list

[issue18146] Document miss, Stats objects has no method called print_results

2013-06-06 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate stage: - committed/rejected superseder: - Example for Profile Module shows incorrect method ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18146

[issue18147] SSL: diagnostic functions to list loaded CA certs

2013-06-06 Thread Christian Heimes
New submission from Christian Heimes: The patch adds two methods to SSLContext which return information about loaded x509 certs, CRL and CAs. Example: ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) ctx.load_verify_locations(SVN_PYTHON_ORG_ROOT_CERT) ctx.cert_store_stats() {'crl': 0, 'x509': 1}

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +IO nosy: +hynek, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18116 ___

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is in io.open, not in getpass. Here is a test script. $ ./python buffered_open_fd_leak.py buffered_open_fd_leak.py:7: ResourceWarning: unclosed file _io.FileIO name=3 mode='rb+' tty = io.open(fd, 'w+', 1) -- versions: +Python 3.4

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: So the correct fix should be: 1. Make sure we can open /dev/tty in non-binary mode, 2. We can write string to /dev/tty, 3. Close the leak if we can not open /dev/tty. Is it? -- ___ Python tracker

[issue11959] smtpd cannot be used without affecting global state

2013-06-06 Thread R. David Murray
R. David Murray added the comment: Looks good to me too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11959 ___ ___ Python-bugs-list mailing

[issue18148] Make of Python 3.2.2 fails on Solaris SPARC

2013-06-06 Thread Donal Duane
New submission from Donal Duane: Hi, I am trying to configure/make/make install Python 3.2.2 on Solaris SPARC. The configure goes ok, but I am getting an error when doing make. I am using GCC 3.4.6. Error: make/usr/local/bin/gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Fixing IO leak resource would fix this bug but leave another bug opened which I try to fix as well. These statements with Python3 under Linux will always fail because we need to open /dev/tty file in binary mode (for whatever reason). fd = os.open('/dev/tty',

[issue18149] filecmp.cmp() - cache invalidation fails when file modification times haven't changed

2013-06-06 Thread Matej Fröbe
New submission from Matej Fröbe: Example: with open('file1', 'w') as f: f.write('a') with open('file2', 'w') as f: f.write('a') print filecmp.cmp('file1', 'file2', shallow=False) # true with open('file2', 'w') as f: f.write('b') print filecmp.cmp('file1', 'file2',

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13483 ___ ___

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: getpass.getpass('Password: ', open('/dev/stdout', 'w')) Traceback (most recent call last): File stdin, line 1, in module File /home/serhiy/py/cpython/Lib/getpass.py, line 72, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File

[issue18150] Duplicate test inside TestSingleDispatch

2013-06-06 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is a duplicate test inside TestSingleDispatch in file Lib/test/test_functools.py. The method test_mro and test_classic_classes are not different at all. -- components: Tests files: duplicate_test_for_testsingledispatch.diff keywords: patch

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
New submission from Terry J. Reedy: This issue is about uniformly updating the old idiom try: f = open('file') use f) f.close() # omitted at least in GrepDialog except IOError as msg: ignore or display message to the current idiom try: with open('file') as f: use f except

[issue18152] Idle: add 2.7 backport script

2013-06-06 Thread Terry J. Reedy
New submission from Terry J. Reedy: Backporting Idle patches from 3.x to 2.7 would be easier with a canned edit script. Below are the substitutions I can think of immediately. Do any of you know of others? Easy (str.replace): tkinter - Tkinter import tkinter.messagebox as tkMessageBox -

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Here is the 'OS' version of the fix and update to grep_it. Change 'OS' to 'IO' on line 17 to apply to current 3.3, without the io2os patch. Besides using 'with', it iterates the files directly instead of iterating blocks of readlines. The two changes make

[issue18152] Idle: add 2.7 backport script

2013-06-06 Thread Ezio Melotti
Ezio Melotti added the comment: Are you planning to use this on the patches instead of using hg graft? These things should be easy to fix during the 3-way merge, so I'm not sure if it's worth adding a specific script. If you think it's necessary, consider making it a mercurial extension that

[issue18152] Idle: add 2.7 backport script

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please regenerate your patches without --git for review. Rietveld doesn't like git-style patches. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18152

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-06-06 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17931 ___ ___

[issue18152] Idle: add 2.7 backport script

2013-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg190722 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18152 ___

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please regenerate your patches without --git for review. Rietveld doesn't like git-style patches. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18151

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2013-06-06 Thread Steve Ward
Changes by Steve Ward plane...@gmail.com: -- nosy: +planet36 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12932 ___ ___ Python-bugs-list mailing

[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2013-06-06 Thread STINNER Victor
STINNER Victor added the comment: Oh, I just reproduced the issue on my gdb.py program, which is part of the python-ptrace program. When searching for a pattern in the memory of another process, /proc/pid/maps is used to get the list of all memory mappings of this process. On Linux x64, the

[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2013-06-06 Thread STINNER Victor
STINNER Victor added the comment: About the version field: If we decide to change os.lseek() and FileIO.seek(), it is safer to only do it in Python 3.4. -- versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file22721/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12545 ___

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Incorrect handling of return codes in the posix_lseek function in posixmodule.c - os.lseek() and FileIO.seek() does not support offset larger than 2^63-1 ___ Python tracker

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file22641/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12545 ___

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file22645/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12545 ___

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy: I don't care about patch style but I read somewhere that I 'should' set the hg options file to automatically produce git style diff. However, since the hg doc says that this setting does not affect pushes, I don't know why, and I cannot find where I

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Added file: http://bugs.python.org/file30489/grep_it.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18151 ___

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
STINNER Victor added the comment: lseek_negative.diff is not correct: 0x8000 is a valid offset for a /proc/pid/mem file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12545

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
STINNER Victor added the comment: lseek_unsigned_test.py: script to test manually the patch on Linux. It may work on Solaris, I didn't try. -- Added file: http://bugs.python.org/file30490/lseek_unsigned_test.py ___ Python tracker

[issue12545] os.lseek() and FileIO.seek() does not support offset larger than 2^63-1

2013-06-06 Thread STINNER Victor
STINNER Victor added the comment: The patch is not complete: _iomodule.h defines PyLong_AsOff_t() and PyLong_FromOff_t(), but these functions don't support unsigned off_t (larger than 2^63-1). #if defined(MS_WIN64) || defined(MS_WINDOWS) /* Windows uses long long for offsets */ typedef

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you. AFAIK you need git style diff only when moving/renaming files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18151 ___

[issue18152] Idle: add 2.7 backport script

2013-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ezio: yes. Once I have written a working-directory diff to a file for upload (non-trivial on Windows), 'Import' is as easy to use as Graft and as far as I know, the result when successful is the same. I know I 'should' learn to use kdiff3 effectively, but it

[issue17486] datetime.timezone returns the wrong tzname()

2013-06-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is not a bug in datetime.timezone. The value returned by timezone.tzname() is documented and the code works correctly. %Z should not be used to produce machine-readable timestamps and for a human reader 'UTC+03:00+0300' should not be confusing.

[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-06 Thread tahnoon pasha
New submission from tahnoon pasha: Hi I've suddenly encountered an error using imaplib on some code that worked fine before. import imaplib m = imaplib.IMAP4('myserver','port') m.login(r'username','password') m.select() gives me the error Traceback (most recent call

[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-06 Thread R. David Murray
R. David Murray added the comment: I think that technically the server is out of spec with the RFC. It isn't 100% clear, though since while the RFC says extra spaces are invalid, it also says that an untagged response is formed by prefixing the token '*', without otherwise mentioning it in

[issue18150] Duplicate test inside TestSingleDispatch

2013-06-06 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file30484/duplicate_test_for_testsingledispatch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18150 ___

[issue18150] Duplicate test inside TestSingleDispatch

2013-06-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: I think to test the mro case, we have to test the multiple inheritance with the same ancestor case. Attached my guess of the correct test should be. -- Added file: http://bugs.python.org/file30491/test_mro.diff ___