RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1790174 - virtualenv activate chokes when run from bash scripts in strict mode due to missing PS1
Summary: virtualenv activate chokes when run from bash scripts in strict mode due to m...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-virtualenv
Version: 8.3
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: 8.0
Assignee: Python Maintainers
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-12 09:33 UTC by Sorin Sbarnea
Modified: 2020-02-25 14:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-25 14:32:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pypa virtualenv issues 991 0 None closed Activation fails with set -u and unset PS1 2020-02-25 14:02:27 UTC
Launchpad 1858890 0 None None None 2020-01-12 09:34:54 UTC

Description Sorin Sbarnea 2020-01-12 09:33:18 UTC
Description of problem:

That is known bug that was fixed more than an ago in upstream virtualenv but our outdated version still has it.


Version-Release number of selected component (if applicable):
python3-virtualenv-15.1.0-19.module+el8.1.0+3514+14e79d98.noarch


How reproducible:


Steps to Reproduce:

yum install -y virtualenv
virtualenv venv
# Activate bash strict mode:
set -u
source bin/activate

Actual results:

If you are on a ssh connection, it will be dropped because shells exists on the error.

If this happens inside a script, you will see something like 
https://bugs.launchpad.net/bugs/1858890


Expected results:

Success regardless if `set -eu` are set or not.

Additional info:

This bug directly affected OpenStack as got it reported at https://bugs.launchpad.net/bugs/1858890

I recommend bumping virtualenv version because in the last two years their QA improved considerably and they fixed lots of bugs. AFAIK they did not introduce any breaking changes in virtualenv.

Comment 1 Petr Viktorin (pviktori) 2020-01-14 14:24:44 UTC
How much priority should this have? Do you need it for RHEL 8.2?

We will not be rebasing virtualenv to a newer version, but we can backport an individual patch.

Comment 3 Sorin Sbarnea 2020-01-14 18:40:17 UTC
Using non-default python would not be an option for openstack.

Still, that bug can be bypassed if we backport a single patch: https://github.com/pypa/virtualenv/pull/922/files

Comment 4 Sorin Sbarnea 2020-01-21 18:23:19 UTC
I think I already provided enough info.

Comment 5 Miro Hrončok 2020-01-21 19:02:55 UTC
How much priority should this have? Do you need it for RHEL 8.2?

Comment 6 wes hayutin 2020-01-21 19:15:25 UTC
Yes.. please ship the fix in 8.2

Comment 8 Victor Stinner 2020-01-27 09:56:35 UTC
Is virtualenv still relevant when python3 -m venv is available? venv doesn't seem to have the issue.

I cannot reproduce the issue if I use venv instead of virtualenv, on RHEL 8.2 Beta and Python 3.6.8 (python36-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64):

$ python3
Python 3.6.8 (default, Dec  5 2019, 15:45:45) 
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.

$ python3 -m venv env
$ set -u
$ source env/bin/activate
(env) $ exit

--

Note: I cannot reproduce this issue on Fedora 31 with Python 3.7.6 (python3-3.7.6-1.fc31.x86_64) neither:

$ python3 -m venv env
$ set -u
$ source env/bin/activate
(env) $ exit

Comment 9 Petr Viktorin (pviktori) 2020-01-28 14:36:51 UTC
We do not have enough information to request a Blocker/Exception needed to get this into RHEL 8.2. Urgent priority on Bugzilla is not a proper business justification.
If you need it in RHEL 8.2, please request the Blocker/Exception from PM.

Comment 10 Petr Viktorin (pviktori) 2020-02-11 14:23:23 UTC
Sorin, if you need this in 8.2, blease coordinate with PM to get the Blocker/Exception.

Comment 13 Sorin Sbarnea 2020-02-19 08:26:05 UTC
8.3 is ok, please assure you include 20.0.4 for it as it includes lots of important (useful) features. Not doing so it will only create problems for us, like forcing us to upgrade it from pip for testing.

PS. I am referring to the python3-virtualenv, the packaging for default python interpreter. If done for all the better.

Comment 14 Petr Viktorin (pviktori) 2020-02-19 10:01:13 UTC
We are not planning to update python3-virtualenv in RHEL 8 to new releases. RHEL is stable; it does not get the newest releases of components.

If there are specific important features you need in python3-virtualenv, please open bugs for them to be backported.

Comment 16 Petr Viktorin (pviktori) 2020-02-25 14:32:28 UTC
Please re-open if you need some specific features to be backported.


Note You need to log in before you can comment on or make changes to this bug.