[issue33282] Subprocess Popen communicate hung if stdin not given to Popen, even though script not expecting any input

2018-04-15 Thread Jatin Goel

New submission from Jatin Goel :

Hi
needed a small help related to the subprocess module
I'm executing a powershell process using the subprocess module

process = subprocess.Popen(
[
'powershell.exe',
script
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True
)

output, error = process.communicate()

but the call to the communicate method is getting hung on some machines, and 
not all

i tried to debug the subprocess module but couldn't find anything helpful

the script is not expecting any input from the user

on the machines where it failed, if I just add stdin=subprocess.PIPE argument, 
it works

process = subprocess.Popen(
[
'powershell.exe',
script
],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True
)

above works

--
components: Windows
messages: 315317
nosy: JatinGoel, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Subprocess Popen communicate hung if stdin not given to Popen, even 
though script not expecting any input
versions: Python 3.6

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



[issue34737] Python upgrade with SYSTEM account uninstalls python

2018-09-19 Thread Jatin Goel


New submission from Jatin Goel :

Team,

I have some Windows machines where Python version 3.6.2 is installed.

We are now upgrading them to 3.6.6

As part of our Install process, we launch the installation script with the 
SYSTEM account with the command:

python-3.6.6-amd64.exe /quiet InstallAllUsers=1 log "[logpath]\InstallPython"

This command works fine if I launch it interactively, i.e., from an 
Administrator account from command prompt, and version is upgraded successfully.


But when launching the same command from the SYSTEM account, it tries to 
install Just for Me, and not all users and some checks fails, and it removes 
the installed python as well.



[1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable 
'InstallLauncherAllUsers' to value 1
[1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable 
'Include_launcher' to value 1
[1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable 
'DetectedLauncher' to value 1
[1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable 
'Include_launcherState' to value 'disable'
[1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable 
'InstallLauncherAllUsersState' to value 'disable'

[1C18:1F24][2018-09-19T16:25:58]w208: Plan disabled rollback for package: 
tcltk_JustForMe, due to incomplete cache: None, original rollback action: 
Install
[1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable 
'WixBundleLog_tcltk_JustForMe' to value 'C:\ProgramData\Commvault 
Systems\Galaxy\LogFiles\Instance001\\InstallPython_007_tcltk_JustForMe.log'
[1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and 
Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
[1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and 
Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
[1C18:1F24][2018-09-19T16:25:58]i204: Plan 1 msi features for package: 
tcltk_JustForMe_pdb
[1C18:1F24][2018-09-19T16:25:58]i203: Planned feature: Symbols, state: Absent, 
default requested: Unknown, ba requested: Local, execute action: AddLocal, 
rollback action: Remove

[1C18:1F24][2018-09-19T16:26:03]i319: Applied execute package: dev_JustForMe, 
result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:26:03]i329: Removed package dependency provider: 
{5CE3EB5B-1823-4B8E-BE10-95262BDD1148}, package: exe_JustForMe
[1C18:1F24][2018-09-19T16:26:03]i301: Applying execute package: exe_JustForMe, 
action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" 
MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" 
OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:26:04]i319: Applied execute package: exe_JustForMe, 
result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:26:04]i329: Removed package dependency provider: 
{4D137679-6FB4-446B-9BDB-279292FA2D2C}, package: lib_JustForMe
[1C18:1F24][2018-09-19T16:26:04]i301: Applying execute package: lib_JustForMe, 
action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" 
MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" 
OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:26:47]i319: Applied execute package: lib_JustForMe, 
result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:26:47]i329: Removed package dependency provider: 
{C9596636-022D-4123-B369-98819F772985}, package: test_JustForMe
[1C18:1F24][2018-09-19T16:26:47]i301: Applying execute package: test_JustForMe, 
action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" 
MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" 
OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:27:15]i319: Applied execute package: test_JustForMe, 
result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:27:15]i329: Removed package dependency provider: 
{16EF5AB7-4A89-4F06-B20B-209DA4FE0533}, package: doc_JustForMe
[1C18:1F24][2018-09-19T16:27:16]i301: Applying execute package: doc_JustForMe, 
action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" 
MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" 
OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:27:17]i319: Applied execute package: doc_JustForMe, 
result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:27:17]i329: Removed package dependency provider: 
{E95CEC86-EFB3-47B8-A5F6-C8FB757AD060}, package: tools_JustForMe
[1C18:1F24][2018-09-19T16:27:17]i301: Applying execute package: 
tools_JustForMe, action: Uninstall, path: (null), arguments: ' 
ARPSYSTEMCOMPONENT="1" MSI

[issue34737] Python upgrade with SYSTEM account uninstalls python

2018-09-19 Thread Jatin Goel


Jatin Goel  added the comment:

Correction to the install command:

python-3.6.6-amd64.exe /quiet InstallAllUsers=1 /log
"[logpath]\InstallPython"

On Wed, Sep 19, 2018 at 7:14 PM Jatin Goel  wrote:

>
> New submission from Jatin Goel :
>
> Team,
>
> I have some Windows machines where Python version 3.6.2 is installed.
>
> We are now upgrading them to 3.6.6
>
> As part of our Install process, we launch the installation script with the
> SYSTEM account with the command:
>
> python-3.6.6-amd64.exe /quiet InstallAllUsers=1 log
> "[logpath]\InstallPython"
>
> This command works fine if I launch it interactively, i.e., from an
> Administrator account from command prompt, and version is upgraded
> successfully.
>
>
> But when launching the same command from the SYSTEM account, it tries to
> install Just for Me, and not all users and some checks fails, and it
> removes the installed python as well.
>
>
>
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable
> 'InstallLauncherAllUsers' to value 1
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable
> 'Include_launcher' to value 1
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable
> 'DetectedLauncher' to value 1
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable
> 'Include_launcherState' to value 'disable'
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable
> 'InstallLauncherAllUsersState' to value 'disable'
>
> [1C18:1F24][2018-09-19T16:25:58]w208: Plan disabled rollback for package:
> tcltk_JustForMe, due to incomplete cache: None, original rollback action:
> Install
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable
> 'WixBundleLog_tcltk_JustForMe' to value 'C:\ProgramData\Commvault
> Systems\Galaxy\LogFiles\Instance001\\InstallPython_007_tcltk_JustForMe.log'
> [1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and
> Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
> [1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and
> Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
> [1C18:1F24][2018-09-19T16:25:58]i204: Plan 1 msi features for package:
> tcltk_JustForMe_pdb
> [1C18:1F24][2018-09-19T16:25:58]i203: Planned feature: Symbols, state:
> Absent, default requested: Unknown, ba requested: Local, execute action:
> AddLocal, rollback action: Remove
>
> [1C18:1F24][2018-09-19T16:26:03]i319: Applied execute package:
> dev_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:26:03]i329: Removed package dependency provider:
> {5CE3EB5B-1823-4B8E-BE10-95262BDD1148}, package: exe_JustForMe
> [1C18:1F24][2018-09-19T16:26:03]i301: Applying execute package:
> exe_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:26:04]i319: Applied execute package:
> exe_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:26:04]i329: Removed package dependency provider:
> {4D137679-6FB4-446B-9BDB-279292FA2D2C}, package: lib_JustForMe
> [1C18:1F24][2018-09-19T16:26:04]i301: Applying execute package:
> lib_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:26:47]i319: Applied execute package:
> lib_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:26:47]i329: Removed package dependency provider:
> {C9596636-022D-4123-B369-98819F772985}, package: test_JustForMe
> [1C18:1F24][2018-09-19T16:26:47]i301: Applying execute package:
> test_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:27:15]i319: Applied execute package:
> test_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:27:15]i329: Removed package dependency provider:
> {16EF5AB7-4A89-4F06-B20B-209DA4FE0533}, package: doc_JustForMe
> [1C18:1F24][2018-09-19T16:27:16]i301: Applying execute package:
> doc_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1

[issue34737] Python upgrade with SYSTEM account uninstalls python

2018-09-20 Thread Jatin Goel


Jatin Goel  added the comment:

Hi Steve,

It's not actually an issue with the Tcl/Tk package.

This is happening for all the packages.

Even with the installAllUsers flag set, the installation for all users fail, 
and then it tries to do justForMe installation, and that too is failing.

Again elaborating, this issue only comes when trying to upgrade the Python 
using the SYSTEM account.

No antivirus is running on any of the machines where it failed.

PFA the log file for Python installation.

You can find all the other log files in this GitHub repository: 
https://github.com/GoelJatin/PythonIssue34737

--
Added file: https://bugs.python.org/file47816/InstallPython

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



[issue34737] Python upgrade with SYSTEM account uninstalls python

2018-09-20 Thread Jatin Goel


Jatin Goel  added the comment:

Thanks for the info Steve.

Yeah I noticed it earlier, but couldn't make sense why it would try  per-user 
uninstall at all. (Thought some upgrade issue, and it was a rollback action)

Though we've been doing the installation for all users from the beginning with 
our script from SYSTEM account.

This is the first time we tried upgrade.

I'll check and verify on the machines if someone modified it, i.e., uninstalled 
python and then re-installed with Just for Me option selected.

Will let you know how it goes.

Thanks Again!

--

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