Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Victor Stinner
Python 3.5 requires a 64 bit signed integer to build. Search for _PyTime type in pytime.h ;-) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/pytho

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Ivan Levkivskyi
Type clone sounds good. But I am still inclined more towards "distinct". -- Ivan 29 Тра 2016 01:04 "Chris Jerdonek" пише: > On Fri, May 27, 2016 at 9:26 PM, Guido van Rossum > wrote: > > We discussed this over dinner at PyCon, some ideas we came up with: > > > > - Dependent types, harking back

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread cs
On 28May2016 08:19, Steve Dower wrote: Did anyone suggest "distinct type alias"? Regardless of what name, I'm fairly sure people will call it whatever the function to create it is called. So if the function is typings.distinguish_type(...), then distinguished will stick. Just casting an opi

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Chris Jerdonek
On Fri, May 27, 2016 at 9:26 PM, Guido van Rossum wrote: > We discussed this over dinner at PyCon, some ideas we came up with: > > - Dependent types, harking back to a similar concept in Ada > (https://en.wikibooks.org/wiki/Ada_Programming/Type_System#Derived_types) > which in that language is als

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 15:52, Nathaniel Smith wrote: > On Fri, May 27, 2016 at 3:08 PM, M.-A. Lemburg wrote: >> On 27.05.2016 23:46, Donald Stufft wrote: >>> On May 27, 2016, at 5:41 PM, M.-A. Lemburg wrote: If we add this now, there should at least be an exit strategy to remove the co

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-28 14:06, Brett Cannon wrote: > We can always make the test vector file an external download like we do > for some of the codec tests. That is actually a great idea! :) Thanks Brett ___ Python-Dev mailing list Python-Dev@python.org https://m

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-28 14:06, Guido van Rossum wrote: > But you could choose which implementation to use at compile time based > on the autoconf output, right? We compile all modules and then let hashlib decide which implementation is used. hashlib prefers OpenSSL but falls back to our builtin modules. For

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Donald Stufft
> On May 28, 2016, at 5:06 PM, Guido van Rossum wrote: > > But you could choose which implementation to use at compile time based > on the autoconf output, right? I think we should follow what hashlib already does. If we want to change the way it works that's fine but these hashes shouldn't be

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 14:41, M.-A. Lemburg wrote: > On 27.05.2016 22:58, Ryan Gonzalez wrote: >> On May 27, 2016 3:04 PM, "Victor Stinner" wrote: >>> >>> Le vendredi 27 mai 2016, M.-A. Lemburg a écrit : The current patch is 1.2MB for SHA-3 - that's pretty heavy for just a few hash function

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Guido van Rossum
But you could choose which implementation to use at compile time based on the autoconf output, right? On Sat, May 28, 2016 at 2:01 PM, Christian Heimes wrote: > On 2016-05-27 09:41, Chris Barker wrote: >> I'm probably showing my ignorance here, but couldn't we swap in the >> OpenSSL implementatio

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Brett Cannon
On Sat, May 28, 2016, 13:58 Christian Heimes wrote: > On 2016-05-27 03:54, M.-A. Lemburg wrote: > > On 27.05.2016 06:54, Raymond Hettinger wrote: > >> > >>> On May 25, 2016, at 3:29 AM, Christian Heimes > wrote: > >>> > >>> I have three hashing-related patches for Python 3.6 that are waiting > f

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Donald Stufft
> On May 28, 2016, at 5:01 PM, Christian Heimes wrote: > > No, not any time soon. As soon as we guarantee SHA3 support we have to > keep our own implementation for a couple of additional releases. We can > drop our own SHA3 code as soon as all supported OpenSSL versions have SHA3. It still wil

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 09:41, Chris Barker wrote: > I'm probably showing my ignorance here, but couldn't we swap in the > OpenSSL implementation when that becomes available? No, not any time soon. As soon as we guarantee SHA3 support we have to keep our own implementation for a couple of additional release

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 03:54, M.-A. Lemburg wrote: > On 27.05.2016 06:54, Raymond Hettinger wrote: >> >>> On May 25, 2016, at 3:29 AM, Christian Heimes wrote: >>> >>> I have three hashing-related patches for Python 3.6 that are waiting for >>> review. Altogether the three patches add ten new hash algorithm

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-28 Thread Christian Heimes
On 2016-05-27 03:44, Victor Stinner wrote: > Le 27 mai 2016 12:05 PM, "Donald Stufft" > a écrit : >> BLAKE2 is an interesting one, because while SHA3 is a NIST standard > (so it’s going to gain adoption because of that), BLAKE2 is at least as > strong as SHA3 but is better

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Bernardo Sulzbach
On 05/28/2016 12:19 PM, Steve Dower wrote: Did anyone suggest "distinct type alias"? I would just like to mention that "distinguished" seems to be more often associated with notability and excellence than "distinct", which is usually more neutral towards the quality of what it describes. U

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Stephen J. Turnbull
Guido van Rossum writes: > But seriously I think we should just decide between Derived Type and > Distinguished Type [Alias]. I like "typedef", but I'm pretty sure it wouldn't carry the same connotations to people who aren't C programming oldtimers. I dislike "derived" because that fits stuff

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Peter Ludemann via Python-Dev
I'm surprised that nobody has suggested UniqueType. ;) On 28 May 2016 at 10:17, Ivan Levkivskyi wrote: > My final vote goes to "distinct type alias". > But how should we call the function? NewType? Or should we change it to > DistinctAlias or something? > > -- > Ivan > 28 Тра 2016 19:14 "Guido

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Ivan Levkivskyi
My final vote goes to "distinct type alias". But how should we call the function? NewType? Or should we change it to DistinctAlias or something? -- Ivan 28 Тра 2016 19:14 "Guido van Rossum" пише: > Oh, another D-word! I really like distinct. > > On Sat, May 28, 2016 at 8:19 AM, Steve Dower

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Guido van Rossum
Oh, another D-word! I really like distinct. On Sat, May 28, 2016 at 8:19 AM, Steve Dower wrote: > Did anyone suggest "distinct type alias"? > > Regardless of what name, I'm fairly sure people will call it whatever the > function to create it is called. So if the function is > typings.distingu

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Ivan Levkivskyi
There is another interesting idea from Twitter: call them type wrappers. -- Ivan On 28 May 2016 at 11:01, Ivan Levkivskyi wrote: > > On 28 May 2016 at 06:26, Guido van Rossum wrote: > > > Personally I'm still in favor of Derived type (but I'm more into > > ancient programming languages than mos

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Ivan Levkivskyi
On 28 May 2016 at 06:26, Guido van Rossum wrote: > Personally I'm still in favor of Derived type (but I'm more into > ancient programming languages than most folks here). I could also live > with Distinguished Type. I think both "derived" and "distinguished" are OK, but I am more in favour of "d

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Steve Dower
Did anyone suggest "distinct type alias"? Regardless of what name, I'm fairly sure people will call it whatever the function to create it is called. So if the function is typings.distinguish_type(...), then distinguished will stick. Top-posted from my Windows Phone -Original Message- F

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Guido van Rossum
Just to add to the list of options, Twitter also came up with - invention - DomainType - TypedAlias But seriously I think we should just decide between Derived Type and Distinguished Type [Alias]. The latter comes from the idea that when you write e.g. UserId = int then UserId is a type alia

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Steven D'Aprano
On Fri, May 27, 2016 at 09:26:29PM -0700, Guido van Rossum wrote: > We discussed this over dinner at PyCon, some ideas we came up with: > > - Dependent types, harking back to a similar concept in Ada > (https://en.wikibooks.org/wiki/Ada_Programming/Type_System#Derived_types) > which in that langu

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread André Malo
* Steven D'Aprano wrote: > On Fri, May 27, 2016 at 04:01:11PM -0700, Guido van Rossum wrote: > > Also -- the most important thing. :-) What to call these things? We're > > pretty much settled on the semantics and how to create them (A = > > NewType('A', int)) but what should we call types like A w