[issue30585] [security][3.3] Backport smtplib fix for TLS stripping vulnerability, CVE-2016-0772

2017-06-07 Thread STINNER Victor
New submission from STINNER Victor: Attached pull request backports a fix for this security vulnerability: http://python-security.readthedocs.io/vuln/cve-2016-0772_smtplib_tls_stripping.html "A vulnerability in smtplib allowing MITM attacker to perform a startTLS stripping attack. smtplib does

[issue30500] urllib connects to a wrong host

2017-06-07 Thread STINNER Victor
STINNER Victor added the comment: > I think the best behavior is to do what popular web browsers do. Chrome and > Firefox, for example, parses this is host 127.0.0.1, path /, fragment > #@evil.com. I agree that in case of doubt, it's better to follow the implementation of most popular web

[issue30080] Add the --duplicate option for timeit

2017-06-07 Thread STINNER Victor
STINNER Victor added the comment: About the command line interface, I would expect that "timeit -n 10 --duplicate 10 STMT" would run STMT 100 times. I chose this behaviour in perf timeit: http://perf.readthedocs.io/en/latest/cli.html#timeit-cmd Current behaviour chosen by Serhiy, -n3

[issue30584] test_os fails on non-English (Russian) Windows

2017-06-07 Thread STINNER Victor
STINNER Victor added the comment: > exit status 1332. On the Internet, I found: 1332No mapping between account names and security IDs was done. The unit test: @unittest.skipUnless(sys.platform == "win32", "Win32 specific tests") def test_access_denied(self): # Default to

[issue30584] test_os fails on non-English (Russian) Windows

2017-06-07 Thread Denis Osipov
Changes by Denis Osipov : -- pull_requests: +2046 ___ Python tracker ___ ___

[issue30584] test_os fails on non-English (Russian) Windows

2017-06-07 Thread Denis Osipov
New submission from Denis Osipov: test_os fails on non-English (Russian) Windows 7 Home Extended 6.1.7601 x64 == ERROR: test_access_denied (test.test_os.StatAttributeTests)

Re: Generator and return value

2017-06-07 Thread Frank Millman
"Jussi Piitulainen" wrote: Frank Millman writes: > It would be nice to write a generator in such a way that, in addition > to 'yielding' each value, it performs some additional work and then > 'returns' a final result at the end. > > From Python 3.3, anything 'returned' becomes the value of

Re: Generator and return value

2017-06-07 Thread Jussi Piitulainen
Frank Millman writes: > It would be nice to write a generator in such a way that, in addition > to 'yielding' each value, it performs some additional work and then > 'returns' a final result at the end. > >> From Python 3.3, anything 'returned' becomes the value of the >> StopIteration >

Re: Psycopg2 pool clarification

2017-06-07 Thread dieter
israel writes: > Since I've gotten no replies to this, I was wondering if someone could > at least confirm which behavior (my expected or my observed) is > *supposed* to be the correct? Should a psycopg2 pool keep connections > open when returned to the pool (if closed is

Generator and return value

2017-06-07 Thread Frank Millman
Hi all It would be nice to write a generator in such a way that, in addition to 'yielding' each value, it performs some additional work and then 'returns' a final result at the end. From Python 3.3, anything 'returned' becomes the value of the StopIteration exception, so it is possible,

<    1   2