[issue4821] Patches for thread-support in built-in SHA modules

2016-06-12 Thread Christian Heimes

Changes by Christian Heimes :


--
assignee: christian.heimes -> 

___
Python tracker 

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



[issue4821] Patches for thread-support in built-in SHA modules

2016-04-22 Thread Christian Heimes

Changes by Christian Heimes :


--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue4821] Patches for thread-support in built-in SHA modules

2012-10-05 Thread Christian Heimes

Christian Heimes added the comment:

I'll integrate your patch once I'm done with my SHA-3 patch #16113. I'm using 
parts of your patch in my new sha3 code to release the GIL.

I'll also check if I can share more code between the SHA family modules.

--
assignee:  - christian.heimes
components: +Extension Modules
nosy: +christian.heimes
stage:  - patch review
type:  - performance

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2012-10-04 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-02-11 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

fyi - I took care of the unicode data acceptance issue for all hashlib 
related modules in the py3k branch in r69524.

Yes, the hashlib modules have a -lot- of code in common.  Refactoring 
that would be nice but i haven't looked into it.  I at least moved the 
commonly used #define into a new hashlib.h for the above change.

--
nosy: +gregory.p.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

sha1module_small_locks.diff patch is very similar to the changes made 
in #4751, except:
 - SHA1_GIL_MINSIZE is 8192 whereas HASHLIB_GIL_MINSIZE is 2048
 - There is no test for PyThread_allocate_lock() failure

Instead of copy/paste code in hashlib, sha1, sha256 and sha512 (4 
modules), can't we share some constants, functions or macros? 
Examples:
 - the GIL minimum size constant
 - the long MY_GET_BUFFER_VIEW_OR_ERROUT macro (which can be a 
function)

And about sha, why using 3 files for sha? Are the source code so 
different? In the GNU libc, they use template files (it's possible 
even with the C language using the preprocessor!): strtof(), strtod() 
and strtold() share 99% of the source code. Interesting content of 
strtof.c :

#define FLOAT   float
#define FLT FLT
#ifdef USE_WIDE_CHAR
#define STRTOF  wcstof
#define STRTOF_L__wcstof_l
#else
# define STRTOF strtof
# define STRTOF_L   __strtof_l
#endif

#include strtod.c


Refactoring to share code between hash modules will ease the changes, 
eg. release the GIL ;-)

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Oops, it's not a duplicate /o\ But it may solves #3745 (reject unicode 
in sha256).

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

This patch is a duplicate of #3745.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-03 Thread Lukas Lueg

New submission from Lukas Lueg knabberknusperh...@yahoo.de:

Here is the follow-up to issue #4818. The patches attached allow the
built-in SHA modules to release the GIL.

Also the build-in SHA modules will now no longer accept s# as input.
Input is parsed just as in the openssl-driven classes where
unicode-objects are explicitly rejected.


The built-in hash modules have been not quite beautiful before even more
code is now copy  pasted between them. Is there any interest in
refactoring all those modules? AFAIK _sha1 and such are only used by
hashlib.py ...

--
messages: 78975
nosy: ebfe
severity: normal
status: open
title: Patches for thread-support in built-in SHA modules

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-03 Thread Lukas Lueg

Changes by Lukas Lueg knabberknusperh...@yahoo.de:


--
keywords: +patch
Added file: http://bugs.python.org/file12569/sha1module_small_locks.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-03 Thread Lukas Lueg

Changes by Lukas Lueg knabberknusperh...@yahoo.de:


Added file: http://bugs.python.org/file12570/sha256module_small_locks.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-03 Thread Lukas Lueg

Changes by Lukas Lueg knabberknusperh...@yahoo.de:


Added file: http://bugs.python.org/file12571/sha512module_small_locks.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com