From: Dave Caswell <dave.caswell@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Bug in Python3 ('tempfile', 'subprocess', '_hashlib')
Date: Fri, 06 Apr 2018 01:46:00 -0000 [thread overview]
Message-ID: <CAG2dRtGjnCB=iJCUWEcqbNJsyJSnUBTiOioL_GjhYT8y4o9uoA@mail.gmail.com> (raw)
In-Reply-To: <8011548c-aefd-62a2-a492-69dca7646a44@analog.com>
On Thu, Apr 5, 2018 at 7:14 PM, Giuseppe Scelsi
<giuseppe.scelsi@analog.com> wrote:
> 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
>
Tried to reproduce:
davec@SodiumWin ~/tmp
$ cat py3t.py
#!/usr/bin/python3
import subprocess
import _hashlib
import _sha3
subprocess.run('pwd')
davec@SodiumWin ~/tmp
$ ./py3t.py
/home/davec/tmp
Everything seems to work OK for me. This is with a recently updated Cygwin 64.
--
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
next prev parent reply other threads:[~2018-04-06 1:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 1:14 Giuseppe Scelsi
2018-04-06 1:46 ` Dave Caswell [this message]
2018-04-09 1:14 ` Yaakov Selkowitz
2018-04-09 23:40 ` Giuseppe Scelsi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG2dRtGjnCB=iJCUWEcqbNJsyJSnUBTiOioL_GjhYT8y4o9uoA@mail.gmail.com' \
--to=dave.caswell@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).