This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Bug in Python3 ('tempfile', 'subprocess', '_hashlib')
- From: Giuseppe Scelsi <giuseppe dot scelsi at analog dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 6 Apr 2018 11:14:26 +1000
- Subject: Bug in Python3 ('tempfile', 'subprocess', '_hashlib')
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi,
Using freshly-updated Cygwin 64-bit under Windows 7 Enterprise Ver 6.1
and Python 3 version 3.6.4.
The execution of the following script:
import subprocess
import _hashlib
import _sha3
subprocess.run('pwd')
always results in 'BlockingIOError: [Errno 11] Resource temporarily
unavailable'.
I saw this error first in a script that imported 'tempfile' together
with 'subprocess' (in any order):
import subprocess
import tempfile
subprocess.run('pwd')
I then managed to narrow down the problem to the '_sha3' module.
Notice that you need to import both '_hashlib' and '_sha3' *in that
order*. If I swap the order and import '_sha3' before '_hashlib', the
error becomes sporadic, sometimes it happens and sometimes not.
This problem makes it impossible to use 'tempfile' and 'subprocess' in
the same script. My workaround is currently to disable '_sha3' in
'/lib/python3.6/hashlib.py' by adding at line 62:
__always_supported = __always_supported[0:8]
This problem only happens in Cygwin 64, 32-bit Cygwin works ok.
Can anyone reproduce this problem?
Best regards,
Giuseppe
--
Giuseppe B. Scelsi (giuseppe.scelsi@analog.com)
Senior Design Engineer, Analog Devices Australia Pty Ltd
Unit 3, 97 Lewis Road, Wantirna, Victoria, 3152, AUSTRALIA
Direct: +61 3 9881 9909 Main: +61 3 9881 9999
Fax: +61 3 9881 9988 Web: www.analog.com/au
Embedded & Digital Signal Processing Software.
This communication is proprietary and confidential.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple