Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Apr 29, 2012, 6:39 AM

Post #1 of 19 (172 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

New submission from Dov Feldstern <dfeldstern [at] nds>:

Python has its own implementations of various hash functions, that can be used as fallbacks when openssl is not available. However, if openssl *is* available at build time, then these fallbacks don't get built.

It would be nice if they would get built even if openssl *was* found at build time:

(1) for (perceived?) licensing issues, one might choose to run without linking with openssl (see http://mail.python.org/pipermail/python-dev/2011-March/109053.html; that message requests that a bug be opened about this, but I wasn't able to find it?)

(2) for "portable" builds: build onto portable or shared storage, and run on multiple machines, even if openssl happens not to be available on some of the machines.

----------
components: Build
messages: 159606
nosy: dov
priority: normal
severity: normal
status: open
title: hashlib fallback modules should be built even if openssl *is* available at build time
versions: Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 6:50 AM

Post #2 of 19 (162 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

> that message requests that a bug be opened about this, but I wasn't able to find it?

Probably because no-one opened an issue.

> build onto portable or shared storage, and run on multiple machines,
> even if openssl happens not to be available on some of the machines.

For portable builds, I would suggest you ship OpenSSL as part of the build.

----------
nosy: +gregory.p.smith, pitrou
type: -> enhancement
versions: +Python 3.3 -Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 6:55 AM

Post #3 of 19 (163 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Changes by Antoine Pitrou <pitrou [at] free>:


----------
stage: -> needs patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 8:33 AM

Post #4 of 19 (159 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Actually, the modules are always compiled when in debug mode. Here is a patch to always compile them.

----------
keywords: +patch
Added file: http://bugs.python.org/file25408/hashlibfallbacks.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 11:59 AM

Post #5 of 19 (160 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Dov Feldstern <dfeldstern [at] nds> added the comment:

Thanks for the prompt response!

Yes, this looks good, I made a very similar patch myself and it seemed to work correctly (but that was on 2.7, and I didn't know how exactly to fix up the tests...).

Thanks again!

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 1:21 PM

Post #6 of 19 (157 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

The official way for building certain modules despite auto-configuration is to edit Modules/Setup, or Modules/Setup.local. This already supports the exact use case, so I'm closing this as "works for me".

----------
nosy: +loewis
resolution: -> works for me
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 1:22 PM

Post #7 of 19 (154 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Changes by Antoine Pitrou <pitrou [at] free>:


----------
resolution: works for me ->
stage: needs patch -> patch review
status: closed -> open

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 1:29 PM

Post #8 of 19 (155 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

Antoine: why did you reopen it? Leave *at least* an explanation please.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 1:32 PM

Post #9 of 19 (154 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

> Antoine: why did you reopen it? Leave *at least* an explanation please.

Ah, sorry. I think it's a reasonable enhancement request, and
furthermore the patch simplifies the setup code.
Also, it allows us to test the _md5 (etc.) modules in non-debug mode as
well. Perhaps Gregory can tell us what he thinks.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 1:42 PM

Post #10 of 19 (156 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

If it's an official feature that these modules are always built, the patch is insufficient: it then also needs to adjust the build environment for Windows, and the packaging. It potentially also affects packaging for OSX and Linux.

I still think that users with special needs such as (1) and (2) in the original message are better served by editig Modules/Setup, as that also allows e.g. to make the modules truly builtin.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 2:26 PM

Post #11 of 19 (155 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Gregory P. Smith <greg [at] krypto> added the comment:

I don't have a problem with always compiling them.

Distro packagers should see that the stand alone versions are not distributed with their package that has a dependency on openssl as they'll just be a waste of space. But that is up to the distro package maintainers.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 9:28 PM

Post #12 of 19 (157 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Israel Fruchter <israel.fruchter [at] gmail> added the comment:

I think (2) is very important, and I agree Gregory about the distro responsibility for size.

further more, if everything is define using the standard Modules/Setup, or Modules/Setup.local during compile/build time, why having a fallback anyhow in hashlib.py ?

BTW anyone that compiles for embedded systems adds a patch for remove all the code that detects modules automatically
see this from openembeded.org:

http://cgit.openembedded.org/openembedded/tree/recipes/python/python-2.6.6/nohostlibs.patch?id=9389f986ac8672cb671f00ab749ce323340b9500

----------
nosy: +fruch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 29, 2012, 9:29 PM

Post #13 of 19 (156 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Changes by Israel Fruchter <israel.fruchter [at] gmail>:


----------
versions: +Python 2.6, Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 30, 2012, 12:51 AM

Post #14 of 19 (156 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Changes by Martin v. Löwis <martin [at] v>:


----------
versions: -Python 2.6, Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 30, 2012, 6:10 AM

Post #15 of 19 (156 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA [at] GMail> added the comment:

Python in Gentoo is also patched to always build _sha256, _sha512, _md5 and _sha1 modules.

----------
nosy: +Arfrever

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Apr 30, 2012, 11:46 AM

Post #16 of 19 (153 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Gregory P. Smith <greg [at] krypto> added the comment:

regarding the attached patch, rather than changing the test at all, I'd leave it as is. The test as is will do what we want on the buildbots (warning us if they failed to compile when in debug mode). I am not concerned about it testing if they compiled in opt mode or not. I also do not think it is worth making them always compile on other platforms that do not use setup.py.

In short: if we do anything, just make the setup.py change to get rid of the conditional compilation.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 4, 2012, 9:54 AM

Post #17 of 19 (137 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Changes by Éric Araujo <merwok [at] netwok>:


----------
nosy: +eric.araujo

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 16, 2012, 7:44 AM

Post #18 of 19 (123 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 0a1d7be10946 by Antoine Pitrou in branch 'default':
Issue #14693: Under non-Windows platforms, hashlib's fallback modules are always compiled, even if OpenSSL is present at build time.
http://hg.python.org/cpython/rev/0a1d7be10946

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 16, 2012, 7:45 AM

Post #19 of 19 (126 views)
Permalink
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Ok, should be fixed now. I fixed the proposed patch to avoid warnings when testing under Windows.

----------
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14693>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.