[issue27322] test_compile_path fails when python has been installed

2016-09-07 Thread Chris Angelico

Chris Angelico added the comment:

Just ran into the same issue, but in a slightly different way, and with 
slightly different consequences. You can actually eliminate this failure by 
manually running compileall on the affected directory:

sudo python3 -m compileall /usr/local/lib/python3.6/site-packages

In other words, a test failure can come and go depending on the presence of 
other files on the system.

IMO the test should (a) restrict itself to directories within the build tree, 
and (b) call compile_path with force=True. That should make it more consistent. 
Something like the attached patch.

--
keywords: +patch
nosy: +Rosuav
Added file: http://bugs.python.org/file44426/compile-nearly-all.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-07 Thread Cory Benfield

Cory Benfield added the comment:

> Future OpenSSLs don't affect Python 3.4, as Python 3.4 won't be upgraded to 
> them.

Can I get a clarification on this, please, Larry? I just want to confirm I 
understand what your meaning is here.

My reading of this is that for OpenSSL Python defines a range of compatible 
sonames at the time of the first release in a series (e.g. 3.4.0), and then 
will never extend that in either direction for that release series. Put another 
way: patches to extend the supported OpenSSL versions are not acceptable in 
patch releases of Python.

Is that reading accurate?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-09-07 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Hi Brett, I backported only portions of the patch some this issue that were 
applicable to the issue that I was fixing. I will backport remain portions so 
that everything will be consistent now.

--
Added file: http://bugs.python.org/file44427/issue26896-3.3.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7537ca1c2aaf by Senthil Kumaran in branch '3.5':
[backport to 3.5] - issue26896 - Disambiguate uses of "importer" with "finder".
https://hg.python.org/cpython/rev/7537ca1c2aaf

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a4360b1b45a8 by Senthil Kumaran in branch 'default':
issue20842 - null merge with 3.5
https://hg.python.org/cpython/rev/a4360b1b45a8

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26032] Use scandir() to speed up pathlib globbing

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 927665c4aaab by Serhiy Storchaka in branch 'default':
Issue #26032: Optimized globbing in pathlib by using os.scandir(); it is now
https://hg.python.org/cpython/rev/927665c4aaab

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27963] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-09-07 Thread Xiang Zhang

Xiang Zhang added the comment:

> Also one side effect that I can not eliminate is when it is used as a normal 
> function, the function instead of None is returned. I see the former patches 
> get this problem too.

I think this does not matter after seeing functools.singledispatch. The 
versionadded tags should be changed to versionchanged in my last patch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Add support of butes paths in os.scandir()

2016-09-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Bytes paths are deprecated on Windows and their support was not added in 
os.scandir() for purpose. But this makes harder converting filesystem walking 
functions to use os.scandir(). We have to add a special case for bytes paths on 
Windows in every such function (os.walk(), glob.iglob()). This is cumbersome 
inefficient and errorprone code that slows down common case due to additional 
checks for special case. It would be better to add a support of bytes paths 
directly in os.scandir().

--
components: Extension Modules, Windows
messages: 274778
nosy: benhoyt, haypo, paul.moore, serhiy.storchaka, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: Add support of butes paths in os.scandir()
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Add support of bytes paths in os.scandir()

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: Add support of butes paths in os.scandir() -> Add support of bytes paths 
in os.scandir()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Add support of bytes paths in os.scandir()

2016-09-07 Thread Paul Moore

Paul Moore added the comment:

In the light of Steve Dower's work to "un-deprecate" bytes paths, I agree this 
should be added.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Victor! I benchmarked your patch. There is no regression in comparison 
with my patch. In few cases your patch is even faster!

UnpatchedPatch v.4Patch v.5

148 (+76%)   235 (+11%)   260decode  unicode-escape  'A'*1
197 (+30%)   257 (+0%)257decode  unicode-escape  '\x80'*1
195 (+32%)   232 (+11%)   258decode  unicode-escape'\x80'+'A'*
227 (+39%)   308 (+2%)315decode  unicode-escape  '\u0100'*1
197 (+56%)   241 (+27%)   307decode  unicode-escape'\u0100'+'A'*
201 (+35%)   264 (+3%)271decode  unicode-escape'\u0100'+'\x80'*
227 (+39%)   308 (+2%)315decode  unicode-escape  '\u8000'*1
197 (+56%)   241 (+27%)   307decode  unicode-escape'\u8000'+'A'*
201 (+35%)   264 (+3%)271decode  unicode-escape'\u8000'+'\x80'*
227 (+39%)   308 (+2%)315decode  unicode-escape
'\u8000'+'\u0100'*
200 (+26%)   245 (+2%)251decode  unicode-escape  '\U0001'*1
192 (+38%)   230 (+15%)   265decode  unicode-escape'\U0001'+'A'*
167 (+26%)   203 (+4%)211decode  unicode-escape
'\U0001'+'\x80'*
194 (+31%)   248 (+2%)254decode  unicode-escape
'\U0001'+'\u0100'*
194 (+31%)   247 (+3%)254decode  unicode-escape
'\U0001'+'\u8000'*

197 (+9%)214 (+0%)215decode  raw-unicode-escape  'A'*1
197 (+9%)214 (+0%)214decode  raw-unicode-escape  '\x80'*1
197 (+9%)214 (+0%)214decode  raw-unicode-escape'\x80'+'A'*
216 (+68%)   365 (-1%)363decode  raw-unicode-escape  '\u0100'*1
181 (+43%)   262 (-1%)259decode  raw-unicode-escape'\u0100'+'A'*
181 (+43%)   264 (-2%)258decode  raw-unicode-escape
'\u0100'+'\x80'*
216 (+68%)   365 (-1%)363decode  raw-unicode-escape  '\u8000'*1
181 (+43%)   261 (-1%)259decode  raw-unicode-escape'\u8000'+'A'*
181 (+43%)   263 (-2%)258decode  raw-unicode-escape
'\u8000'+'\x80'*
216 (+68%)   365 (-1%)363decode  raw-unicode-escape
'\u8000'+'\u0100'*
245 (+29%)   313 (+1%)315decode  raw-unicode-escape  '\U0001'*1
211 (+10%)   195 (+19%)   232decode  raw-unicode-escape
'\U0001'+'A'*
211 (+10%)   195 (+19%)   233decode  raw-unicode-escape
'\U0001'+'\x80'*
192 (+51%)   287 (+1%)289decode  raw-unicode-escape
'\U0001'+'\u0100'*
192 (+51%)   287 (+1%)289decode  raw-unicode-escape
'\U0001'+'\u8000'*


269 (+73%)   424 (+10%)   465encode  unicode-escape  'A'*1
266 (+108%)  591 (-6%)553encode  unicode-escape  '\x80'*1
298 (+55%)   423 (+9%)463encode  unicode-escape'\x80'+'A'*
358 (+93%)   695 (-0%)692encode  unicode-escape  '\u0100'*1
190 (+13%)   215 (+0%)215encode  unicode-escape'\u0100'+'A'*
235 (+109%)  520 (-5%)492encode  unicode-escape'\u0100'+'\x80'*
342 (+102%)  695 (-1%)691encode  unicode-escape  '\u8000'*1
190 (+13%)   215 (+0%)215encode  unicode-escape'\u8000'+'A'*
235 (+109%)  520 (-5%)492encode  unicode-escape'\u8000'+'\x80'*
367 (+89%)   698 (-1%)694encode  unicode-escape
'\u8000'+'\u0100'*
531 (+124%)  915 (+30%)   1190   encode  unicode-escape  '\U0001'*1
196 (+20%)   235 (+0%)236encode  unicode-escape'\U0001'+'A'*
237 (+104%)  506 (-4%)484encode  unicode-escape
'\U0001'+'\x80'*
325 (+111%)  681 (+1%)687encode  unicode-escape
'\U0001'+'\u0100'*
325 (+117%)  681 (+3%)704encode  unicode-escape
'\U0001'+'\u8000'*

578 (+853%)  5672 (-3%)   5507   encode  raw-unicode-escape  'A'*1
578 (+731%)  4761 (+1%)   4806   encode  raw-unicode-escape  '\x80'*1
581 (+760%)  5218 (-4%)   4995   encode  raw-unicode-escape'\x80'+'A'*
365 (+96%)   714 (+0%)714encode  raw-unicode-escape  '\u0100'*1
226 (+72%)   389 (+0%)389encode  raw-unicode-escape'\u0100'+'A'*
226 (+72%)   389 (+0%)389encode  raw-unicode-escape
'\u0100'+'\x80'*
373 (+91%)   715 (-0%)714encode  raw-unicode-escape  '\u8000'*1
226 (+72%)   389 (+0%)389encode  raw-unicode-escape'\u8000'+'A'*
226 (+72%)   389 (+0%)389encode  raw-unicode-escape
'\u8000'+'\x80'*
366 (+96%)   718 (+0%)719encode  raw-unicode-escape
'\u8000'+'\u0100'*
537 (+110%)  879 (+28%)   1128   encode  raw-unicode-escape  '\U0001'*1
214 (+37%)   293 (+0%)294encode  raw-unicode-escape
'\U0001'+'A'*
214 (+37%)   293 (+0%)294encode  raw-unicode-escape
'\U0001'+'\x80'*
342 (+96%)   669 (+0%)669encode  raw-unicode-escape
'\U0001'+'\u0100'*
342 (+96%)   669 (+0%)669encode  raw-unicode-escape
'\U0001000

[issue26970] Replace OpenSSL's CPRNG with system entropy source

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

No, it won't make it into 3.6. My patch is far from ready.

--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Add support of bytes paths in os.scandir()

2016-09-07 Thread Eryk Sun

Eryk Sun added the comment:

This is implemented in Steve's latest patch in issue 27781. For example:

>>> sys.platform
'win32'
>>> os.mkdir('test')
>>> f = open('test/\U0001.txt', 'w')
>>> next(os.scandir(b'test')).name
b'\xf0\x90\x80\x80.txt'
>>> next(os.scandir(b'test')).path
b'test\\\xf0\x90\x80\x80.txt'

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Change sys.getfilesystemencoding() on Windows to UTF-8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25596] Use scandir() to speed up the glob module

2016-09-07 Thread Dima Tisnek

Dima Tisnek added the comment:

@Serhiy please comment the implications / limitations of the fallback on 
Windows.

Is it that scandir cannot handle bytes argument only?
If argument is unicode, but response set contains bytes paths, will that work?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27984] singledispatch register should typecheck its argument

2016-09-07 Thread Xiang Zhang

Xiang Zhang added the comment:

It's also better to add the typecheck to dispatch. Otherwise sometimes it can 
generate not obvious exception message.

>>> from enum import IntEnum
>>> from functools import singledispatch
>>> IS = IntEnum("IS", "a, b")
>>> @singledispatch
... def foo(x):
... pass
... 
>>> foo.dispatch(IS.a)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/angwer/cpython/Lib/functools.py", line 718, in dispatch
impl = dispatch_cache[cls]
  File "/home/angwer/cpython/Lib/weakref.py", line 365, in __getitem__
return self.data[ref(key)]
TypeError: cannot create weak reference to 'IS' object
>>>

--
keywords: +patch
nosy: +xiang.zhang
Added file: http://bugs.python.org/file44428/issue27984.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11551] test_dummy_thread.py test coverage improvement

2016-09-07 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I've updated the patch to use unittest.mock, the removed the old style way of 
exercising it.

--
nosy: +orsenthil
Added file: http://bugs.python.org/file44429/issue11551.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27989] incomplete signature with help function using typing

2016-09-07 Thread Spencer Brown

Spencer Brown added the comment:

More precisely, the issue is with inspect.formatannotation(), which 
overrides/ignores the repr if the annotation is an instance of type. Perhaps 
that should be changed to also check that __repr__ is type's repr.

--
nosy: +Spencer Brown

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f8700ee4aef0 by Christian Heimes in branch 'default':
Issue #16113: Add SHA-3 and SHAKE support to hashlib module.
https://hg.python.org/cpython/rev/f8700ee4aef0

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2016-09-07 Thread Erik Bray

Changes by Erik Bray :


--
nosy: +erik.bray
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27928] Add hashlib.scrypt

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

Benjamin, what's your take on Alex's suggestion?

 gutworth: Alex_Gaynor has asked me if hashlib.scrypt() can go into 2.7, 
too. It's a password-based KDF like hashlib.pbkdf2() but more secure than 
PBKDF2. It requires OpenSSL 1.1.0.
 gutworth: I think it'd be good if this were approved, for the 
same reasons as PEP466
 contrary to PKBDF2 it doesn't make sense to have a pure-Python 
implementation. scrypt uses ChaCha20 cipher. I don't want to add a cipher to 
CPython core (possible legal issue) and it's not available in OpenSSL < 1.1.0.

--
nosy: +benjamin.peterson
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4971ca2960c7 by Christian Heimes in branch 'default':
Issue #16113: KeccakP-1600-opt64 does not support big endian platforms yet.
https://hg.python.org/cpython/rev/4971ca2960c7

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e8884dcace9f by Christian Heimes in branch 'default':
Issue #16113: compile the module on Windows, too.
https://hg.python.org/cpython/rev/e8884dcace9f

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68df416e94ba by Christian Heimes in branch 'default':
Issue #16113: take 2 on big endian machines.
https://hg.python.org/cpython/rev/68df416e94ba

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16384] import.c doesn't handle EOFError from PyMarshal_Read*

2016-09-07 Thread Sye van der Veen

Sye van der Veen added the comment:

I feel this patch (file44424) misses the mark. Any two Python processes
that try to import a module, without a pyc, at the same time could suffer
race conditions.  The first process will start to write the pyc, get
interrupted, and the second will fail with an EOFError.

When importing encodings at startup, this is a nasty abort. But it's just
as nasty if a running script gets unpredictable EOFErrors.

Corrupt .pyc files should not prevent importing if the valid .py files are
available.

On Tue, Sep 6, 2016, 11:29 PM Eric Snow  wrote:

>
> Eric Snow added the comment:
>
> After looking more closely, it looks like we should be ignoring such bogus
> modules.  Here's a patch to do so.
>
> --
> keywords: +patch
> stage: test needed -> patch review
> Added file: http://bugs.python.org/file44424/issue16384.diff
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

A buildbot is complaining about strict aliasing:

In file included from 
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/sha3module.c:113:0:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_SetBytesInLaneToZero’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:97:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 low = *((UINT32*)(laneAsBytes+0));
 ^
In file included from 
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/sha3module.c:113:0:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_AddBytesInLane’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:152:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 low = *((UINT32*)(laneAsBytes+0));
 ^
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_ExtractBytesInLane’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:294:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 *((UINT32*)(laneAsBytes+0)) = low;
 ^
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:
 In function ‘_PySHA3_KeccakP1600_ExtractAndAddBytesInLane’:
/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c:367:5:
 warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
 *((UINT32*)(laneAsBytes+0)) = low;

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8800] add threading.RWLock

2016-09-07 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Seems to have fizzled out due to the intense amount of bikeshedding required.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25596] Use scandir() to speed up the glob module

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

os.scandir() cannot handle bytes argument on Windows. If an argument is string, 
os.scandir() yields entries with string names, if an argument is bytes object, 
os.scandir() yields entries with bytes names. Opened issue27998 for adding 
support of bytes paths in os.scandir(). After this will be implemented, a 
workaround cb7ee9d9cddd can be reverted.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Maybe Windows buildbots failures are related:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8294/steps/test/logs/stdio

==
FAIL: test_create_at_shutdown_without_encoding 
(test.test_io.PyTextIOWrapperTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_io.py", line 
3174, in test_create_at_shutdown_without_encoding
self.assertIn(self.shutdown_error, err.decode())
AssertionError: 'LookupError: unknown encoding: ascii' not found in 'Exception 
ignored in: >\r\nTraceback (most recent call last):\r\n  File 
"", line 12, in __del__\r\n  File 
"C:\\buildbot.python.org\\3.x.kloth-win64\\build\\lib\\_pyio.py", line 1934, in 
__init__\r\n  File 
"C:\\buildbot.python.org\\3.x.kloth-win64\\build\\lib\\encodings\\__init__.py", 
line 158, in _alias_mbcs\r\nImportError: sys.meta_path is None, Python is 
likely shutting down'

--

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ddc95a9bc2e0 by Christian Heimes in branch 'default':
Issue #16113: one more C90 violation in big endian code.
https://hg.python.org/cpython/rev/ddc95a9bc2e0

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26032] Use scandir() to speed up pathlib globbing

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27996] Python 3 ssl module can't use a fileno to create a SSLSocket

2016-09-07 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report. This looks like a duplicate of issue 27629. Please 
provide a reproducer if it's different problem than issue 27629.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Cannot create ssl.SSLSocket without existing socket

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25776] More compact pickle of iterators etc

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file44430/iterators_pickle_4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

The patch is incomplete. Please also check that type == SOCK_STREAM. The code 
can be simplified with a bitmask test:

if sock is not None:
type = sock.type
if type & socket.SOCK_STREAM != socket.SOCK_STREAM:
raise NotImplementedError

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25856] The __module__ attribute of non-heap classes is not interned

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please make a review?

--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25856] The __module__ attribute of non-heap classes is not interned

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file44431/intern_and_cache___module__2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27996] Python 3 ssl module can't use a fileno to create a SSLSocket

2016-09-07 Thread SenBin Yu

SenBin Yu added the comment:

The issue 27629 describe creating a SSLSocket only with server_hostname 
argument.But what i said is that we can't creating a SSLSocket with fileno 
argument from a existing socket.I'm strange about this code design that 
meaningless branch conditions exists.

--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27654] [Patch] Use arc4random_buf() on CloudABI

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

Thanks. The bare call to arc4random_buf() looks wrong at first. Please add a 
comment that arc4random_buf() cannot fail / does not report back errors.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27996] Python 3 ssl module can't use a fileno to create a SSLSocket

2016-09-07 Thread Berker Peksag

Berker Peksag added the comment:

Did you look at the patch? It adds the following test case:

+s = socket.socket()
+sfd = s.fileno()
+# Create secure socket from fileno
+ss = ssl.SSLSocket(fileno=sfd)
+self.assertTrue(ss.fileno() == sfd)

Isn't that what you want to achieve?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27996] Python 3 ssl module can't use a fileno to create a SSLSocket

2016-09-07 Thread SenBin Yu

SenBin Yu added the comment:

Yes, the giving code is what i desiere and shoud be supported. Sorry, i haven't 
see the patch file.And the next release will include this patch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27996] Python 3 ssl module can't use a fileno to create a SSLSocket

2016-09-07 Thread Berker Peksag

Berker Peksag added the comment:

Great, closing this then.

> And the next release will include this patch?

Christian (one of our SSL module maintainers) just reviewed the patch so the 
next step is to address his review comments and upload a new patch. If you 
don't see any movement from nemunaire (the original author of the patch) after 
a week or so, you can update the patch yourself (it would help to get it fixed 
sooner.)

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry

Emanuel Barry added the comment:

Rebased patch after Victor's commit in #16334. Also regenerated 
invalid_stdlib_escapes_3 in the hopes that Rietveld picks it up.

--
Added file: 
http://bugs.python.org/file44432/deprecate_invalid_escapes_both_4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry

Changes by Emanuel Barry :


Added file: 
http://bugs.python.org/file44433/invalid_stdlib_escapes_3_regen.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27654] [Patch] Use arc4random_buf() on CloudABI

2016-09-07 Thread Ed Schouten

Ed Schouten added the comment:

Sure thing! Attached is an updated patch.

--
Added file: http://bugs.python.org/file44434/patch-arc4random

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry

Changes by Emanuel Barry :


Removed file: 
http://bugs.python.org/file44433/invalid_stdlib_escapes_3_regen.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry

Changes by Emanuel Barry :


Added file: http://bugs.python.org/file44435/invalid_stdlib_escapes_4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27654] [Patch] Use arc4random_buf() on CloudABI

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

LGTM, but it's Victor's final call.

--
assignee:  -> haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27137] Python implementation of `functools.partial` is not a class

2016-09-07 Thread Emanuel Barry

Emanuel Barry added the comment:

Hi Nick, thank you for letting me know! I started trying to fix this, however I 
found it very hard to fix the recursive repr issue. I've whipped up an 
incomplete (but yet working) patch that fixes all but the recursive repr issue. 
Only those two tests fail (once for functools.partial and once for the 
subclass). I have to go for now, but feel free to play with this patch and see 
if you can fix it. The problem is that the way it's handled is inconsistent 
within the C implementation, and is incompatible with reprlib.recursive_repr. I 
might try my hand at it later today or tomorrow.

In the meantime, I think maybe the C implementation cares too much about the 
special cases for that.

--
Added file: 
http://bugs.python.org/file44436/functools_partial_3_1_incomplete.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-09-07 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch. I'd like to get this in before 3.6 beta 1.

--
Added file: http://bugs.python.org/file44437/issue10740_upstream_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-07 Thread Eric V. Smith

Eric V. Smith added the comment:

This patch implements the new logic. It passes all of the fstring tests (except 
of course the ones that had backslashes in the expressions). I'd still like to 
add some more tests, because I'm not convinced the named unicode escapes are 
correct (f"\N{LEFT CURLY BRACE}". Because I'm now scanning the decoded utf-8 
version of the string, I need to be aware of this syntax and not decide it's 
part of an expression (because of the braces).

--
keywords: +patch
Added file: http://bugs.python.org/file44438/27948-1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-07 Thread Eric V. Smith

Changes by Eric V. Smith :


--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27445] Charset instance not passed to set_payload()

2016-09-07 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> patch review
type:  -> behavior
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Add support of bytes paths in os.scandir()

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

Heh, totally by accident as well.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi:

The documentation at https://docs.python.org/3/reference/simple_stmts.html says 
that:

"Names listed in a global statement must not be used in the same code block 
textually preceding that global statement"

But then later:

"CPython implementation detail: The current implementation does not enforce the 
two restrictions,
but programs should not abuse this freedom, as future implementations may 
enforce them..."

Code like this

def f():
x = 1
global x

gives SyntaxWarning for several releases, maybe it is time to make it a 
SyntaxError?

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 274813
nosy: docs@python, gvanrossum, levkivskyi
priority: normal
severity: normal
status: open
title: Make "global after use" a SyntaxError
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27989] incomplete signature with help function using typing

2016-09-07 Thread David E. Franco G.

David E. Franco G. added the comment:

as that is the case, how about this as a solution:

def formatannotation(annotation, base_module=None):
if isinstance(annotation, type):
if annotation.__module__ in ('builtins', base_module):
return annotation.__qualname__
elif annotation.__module__ in ('typing', base_module):   
return repr(annotation).replace("typing.","")
return annotation.__module__+'.'+annotation.__qualname__
return repr(annotation)

the same way that it check for builtins, do it for typing and clean up a 
little. 

With that change the result with the example is

>>> help(foo)
Help on function foo in module __main__:

foo(data:List[Any]) -> Iterator[Tuple[int, Any]]

>>>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-07 Thread STINNER Victor

STINNER Victor added the comment:

Feel free to document the change. It's not my patch, it's yours :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-09-07 Thread Aymeric Augustin

Aymeric Augustin added the comment:

The latest patch removes the current statement parsing and unexpected implicit 
commits. It looks good to me.

Unfortunately it also introduces a new kind of statement parsing that detects 
DDL statements and doesn't open a transaction in that case, while it should. 
See https://github.com/ghaering/pysqlite/issues/105 for details.

As a consequence, this change will allow Django to remove one of the two 
special cases for transaction in SQLite:
https://github.com/django/django/blob/master/django/db/transaction.py#L159-L166

but not the other:
https://github.com/django/django/blob/271581df606b307d89c141e8b1a50ace763bea81/django/db/backends/base/base.py#L375-L404

It's still a step forward so I support merging it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue433028] SRE: (?flag:...) is not supported

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed generating info for fast search for groups with local flags and added 
some documentation (would appreciate for improving it).

--
priority: low -> normal
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file44439/re_scoped_flags_3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22493] Deprecate the use of flags not at the start of regular expression

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
versions: +Python 3.6 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27877] Add recipe for "valueless" Enums to docs

2016-09-07 Thread Ethan Furman

Ethan Furman added the comment:

New changeset 871bdb06c1cf by Ethan Furman in branch 'default':
add recipes for pseudo-valueless enums
https://hg.python.org/cpython/rev/871bdb06c1cf

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28000] Build fails on AIX with _LINUX_SOURCE_COMPAT flag

2016-09-07 Thread Matthieu S

New submission from Matthieu S:

Python build fails on AIX when using the _LINUX_SOURCE_COMPAT flag.

When using this flag, the gethostbyname_r subroutine has 6 parameters instead 
of 3, like on Linux, but Modules/socketmodule.c always expects a 
gethostbyname_r subroutine with only 3 parameters on AIX.

The attached patch allows to build with this flag. It has been tested for 
Python 3.5.1 and 3.5.2 with GCC and XLC compilers.

--
components: Extension Modules
files: Python-3.5.1-compat.patch
keywords: patch
messages: 274819
nosy: sarterm
priority: normal
severity: normal
status: open
title: Build fails on AIX with _LINUX_SOURCE_COMPAT flag
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file0/Python-3.5.1-compat.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27928] Add hashlib.scrypt

2016-09-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

No, scrypt is a simple new feature.  An extension module on PyPI is the 
appropriate place for that for 2.6 through 3.5.  Wholly unrelated to PEP466.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27877] Add recipe for "valueless" Enums to docs

2016-09-07 Thread Ethan Furman

Ethan Furman added the comment:

Thanks for the patch, John and Emanuel!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23591] enum: Add Flags and IntFlags

2016-09-07 Thread Ethan Furman

Ethan Furman added the comment:

I would like to add a function that can be used when creating a Flag (and Enum, 
but that's less important) that will generate the next value.

This is important because in Flag the values are an important internal detail, 
but are largely irrelevant to the user (if they weren't then an IntFlag is 
probably more appropriate).

Actually, this function already exists and is used to supply the values when 
using the Functional API: _generate_next_value_ .  But that's a bit clunky for 
use during class definition:

class Color(Flag):
red = _generate_next_value_()
blue = _generate_next_value_()
green = _generate_next_value_()

What would be a better name for class use?

- _next_value_
- _value_
- _flag_
- _next_flag_

Any others?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27968] test_coroutines generates some warnings

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 234f758449f8 by Benjamin Peterson in branch '3.5':
supress coroutine warning when an exception is pending (#27968)
https://hg.python.org/cpython/rev/234f758449f8

New changeset f48b00b1ec4f by Benjamin Peterson in branch 'default':
merge 3.5 (#27968)
https://hg.python.org/cpython/rev/f48b00b1ec4f

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27928] Add hashlib.scrypt

2016-09-07 Thread Alex Gaynor

Alex Gaynor added the comment:

PEP466 includes hashlib.pbkdf2_hmac(). Any reasoning that includes that surely 
is applicable to scrypt as well.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28000] Build fails on AIX with _LINUX_SOURCE_COMPAT flag

2016-09-07 Thread Eric N. Vander Weele

Changes by Eric N. Vander Weele :


--
nosy: +ericvw

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27968] test_coroutines generates some warnings

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 096dfac57e44 by Benjamin Peterson in branch '3.5':
capture stderr to silence output during test_coroutines (closes #27968)
https://hg.python.org/cpython/rev/096dfac57e44

New changeset b43923ce86f0 by Benjamin Peterson in branch 'default':
merge 3.5 (closes #27968)
https://hg.python.org/cpython/rev/b43923ce86f0

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23591] enum: Add Flags and IntFlags

2016-09-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23591] enum: Add Flags and IntFlags

2016-09-07 Thread Vedran Čačić

Vedran Čačić added the comment:

I think we had that discussion in the other thread, and concluded that auto() 
(or _auto_() if you insist) is quite fine. I think it's important to emphasize 
it's automatically generated, not that it's really "next" in any particular 
order.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27137] Python implementation of `functools.partial` is not a class

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think we can change C implementation of __repr__ to match straightforward 
Python implementation.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23591] enum: Add Flags and IntFlags

2016-09-07 Thread Ethan Furman

Ethan Furman added the comment:

I like it!  (Although I have no idea which other thread you are talking about.)

And yes, it needs the leading and trailing underscore so as not to clash with 
member names.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16384] import.c doesn't handle EOFError from PyMarshal_Read*

2016-09-07 Thread Brett Cannon

Brett Cannon added the comment:

It's a question of whether you want the error that your .pyc files have somehow 
ended up in a bad state to pass silently or you should know you that something 
on your system is corrupting .pyc files (hence why the EOFError has been 
allowed to propagate).

Making corrupt .pyc files pass silently would be a change in semantics and 
practice, so we need to think through the ramifications. At worst we would need 
to raise a warning that such a thing happened, if not keep the current 
semantics.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27928] Add hashlib.scrypt

2016-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Why are we adding scrypt and not argon2 anyway?

On Wed, Sep 7, 2016, at 03:25, Christian Heimes wrote:
> 
> Christian Heimes added the comment:
> 
> Benjamin, what's your take on Alex's suggestion?
> 
>  gutworth: Alex_Gaynor has asked me if hashlib.scrypt() can go into
> 2.7, too. It's a password-based KDF like hashlib.pbkdf2() but more secure
> than PBKDF2. It requires OpenSSL 1.1.0.
>  gutworth: I think it'd be good if this were approved, for
> the same reasons as PEP466
>  contrary to PKBDF2 it doesn't make sense to have a pure-Python
> implementation. scrypt uses ChaCha20 cipher. I don't want to add a cipher
> to CPython core (possible legal issue) and it's not available in OpenSSL
> < 1.1.0.
> 
> --
> nosy: +benjamin.peterson
> versions: +Python 2.7
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

The Windows buildbot failures are partly my fault and partly Ben's fault (I 
created a new error message - Ben added it to the wrong test), so I'll go and 
prevent the error message.

No idea on the other issue. It doesn't repro for me, but since it seems to be 
FreeBSD readline related that isn't a surprise.

--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27959] Add 'oem' encoding

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 47b4dbd451f5 by Steve Dower in branch 'default':
Issue #27959: Prevent ImportError from escaping codec search function
https://hg.python.org/cpython/rev/47b4dbd451f5

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27966] PEP-397 documents incorrect registry path

2016-09-07 Thread Ned Deily

Changes by Ned Deily :


--
components: +Windows -Documentation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27928] Add hashlib.scrypt

2016-09-07 Thread Alex Gaynor

Alex Gaynor added the comment:

OpenSSL supports scrypt

On Sep 7, 2016 12:28 PM, "Benjamin Peterson"  wrote:

>
> Benjamin Peterson added the comment:
>
> Why are we adding scrypt and not argon2 anyway?
>
> On Wed, Sep 7, 2016, at 03:25, Christian Heimes wrote:
> >
> > Christian Heimes added the comment:
> >
> > Benjamin, what's your take on Alex's suggestion?
> >
> >  gutworth: Alex_Gaynor has asked me if hashlib.scrypt() can go into
> > 2.7, too. It's a password-based KDF like hashlib.pbkdf2() but more secure
> > than PBKDF2. It requires OpenSSL 1.1.0.
> >  gutworth: I think it'd be good if this were approved, for
> > the same reasons as PEP466
> >  contrary to PKBDF2 it doesn't make sense to have a pure-Python
> > implementation. scrypt uses ChaCha20 cipher. I don't want to add a cipher
> > to CPython core (possible legal issue) and it's not available in OpenSSL
> > < 1.1.0.
> >
> > --
> > nosy: +benjamin.peterson
> > versions: +Python 2.7
> >
> > ___
> > Python tracker 
> > 
> > ___
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

2016-09-07 Thread STINNER Victor

STINNER Victor added the comment:

> FAIL: test_create_at_shutdown_without_encoding 
> (test.test_io.PyTextIOWrapperTest)

Steve fixed it:
---
changeset:   103229:47b4dbd451f5
tag: tip
user:Steve Dower 
date:Wed Sep 07 09:31:52 2016 -0700
files:   Lib/encodings/__init__.py Lib/test/test_io.py
description:
Issue #27959: Prevent ImportError from escaping codec search function
---

Its new search function now catchs ImportError as expected.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27968] test_coroutines generates some warnings

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks Benjamin!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I like fixing this. I suppose it'll be fixed for nonlocal too?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28001] test.support.open_urlresource should work from an installed Python

2016-09-07 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: christian.heimes, r.david.murray, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: test.support.open_urlresource should work from an installed Python
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27928] Add hashlib.scrypt

2016-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

PEP 466 is explicitly not blanket approval for backporting All The
Things to 2.7. The only justification for pbkdf2 in PEP 466 is to "lower
the barriers to secure password storage and checking in Python 2 server
applications". While scrypt is probably a bit better, applications using
pkbdf2 are still in a much better situation than ones using, e.g., a
naïve salted hash.

There is a self-contained, easily-installable scrypt module on PyPI.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

+1 on getting this in. Who can help reviewing and merging before beta 1?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-07 Thread Eric V. Smith

Eric V. Smith added the comment:

The problem with test_unparse is that:
f'''{"'"}'''
becomes:
f'{"\'"}'
when it's run through Tools/parser/unparse.py.

I'll open another issue for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread R. David Murray

R. David Murray added the comment:

This looks good to me.  However, although it is by no means obvious, the tests 
in test_parser are supposed to be for the new policies.  When I changed the 
test to test them another place that needed to fixed was revealed.  I've 
updated the patch accordingly.

--
Added file: http://bugs.python.org/file1/crlf-headers2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25856] The __module__ attribute of non-heap classes is not interned

2016-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I don't understand this code:
   type->tp_dict && PyDict_Check(type->tp_dict)
since the code explicitly assume it's not NULL and access it as a dict earlier 
in the function

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28002] f-strings do not round trip through Tools/parser/test_unparse.py

2016-09-07 Thread Eric V. Smith

New submission from Eric V. Smith:

The problem relates to how f-strings are re-created.

For the input file foo.txt containing this one line:
f'''{"'"}'''

Run:
./python Tools/parser/test_unparse.py foo.txt

Gives this output:
f'{"\'"}'

This result is not a valid f-string, since it contains a backslash inside the 
expression part of the f-string.

The input string is a valid f-string:
>>> f'''{"'"}'''
"'"

--
components: Demos and Tools
messages: 274841
nosy: eric.smith
priority: low
severity: normal
status: open
title: f-strings do not round trip through Tools/parser/test_unparse.py
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-07 Thread Eric V. Smith

Eric V. Smith added the comment:

Issue 28002 tracks the problem with Tools/parser/unparse.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread R. David Murray

Changes by R. David Murray :


--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread R. David Murray

Changes by R. David Murray :


Added file: http://bugs.python.org/file2/crlf-headers2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2651] Strings passed to KeyError do not round trip

2016-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The current behavior seems to be a recurring source of confusion and bugs, so 
something needs to change.  I'm thinking that the least egregious thing to do 
is to remove (in 3.6) the special case code for KeyError.  The small downside 
is that KeyError('')  wouldn't look as good.  The benefit is that we eliminate 
an unexpected special case and make KeyErrors behave like all the other 
exceptions including LookupError. 

I'm against the two-args solution as being too disruptive.  Since args[0] is 
currently the only reliable way of extracting the key, prepending a message 
field will likely break much existing code that really wants to access the key.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread R. David Murray

Changes by R. David Murray :


Removed file: http://bugs.python.org/file1/crlf-headers2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28003] PEP 525 asynchronous generators implementation

2016-09-07 Thread Yury Selivanov

New submission from Yury Selivanov:

The PEP has been accepted, let's review the reference implementation and get it 
committed.

--
assignee: yselivanov
components: Interpreter Core
files: asyncgen_1.patch
keywords: patch
messages: 274845
nosy: haypo, lukasz.langa, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: PEP 525 asynchronous generators implementation
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file3/asyncgen_1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Add support of bytes paths in os.scandir()

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

Guido just said that we should make sure that os.scandir() continues to not 
support bytes, even after the patch for issue27781 goes in, so I'm reopening 
this.

--
dependencies: +Change sys.getfilesystemencoding() on Windows to UTF-8
nosy: +gvanrossum
resolution: duplicate -> 
stage: resolved -> needs patch
status: closed -> open
superseder: Change sys.getfilesystemencoding() on Windows to UTF-8 -> 
type: enhancement -> behavior
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2651] Strings passed to KeyError do not round trip

2016-09-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

What are you suggesting? Something like:

  KeyError: key 'foobar' not found in dict

? If so, +1 from me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Remove support of bytes paths in os.scandir()

2016-09-07 Thread Steve Dower

Changes by Steve Dower :


--
title: Add support of bytes paths in os.scandir() -> Remove support of bytes 
paths in os.scandir()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27998] Remove support of bytes paths in os.scandir()

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But why? The code of os and glob modules could be simpler if add the support.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   >