11Summary: Virtual Python Environment builder
22Name: python-virtualenv
3- Version: 20.26.6
4- Release: 2 %{?dist }
3+ Version: 20.36.1
4+ Release: 1 %{?dist }
55License: MIT
66Vendor: Microsoft Corporation
77Distribution: Mariner
88Group: Development/Languages/Python
99URL: https://pypi.python.org/pypi/virtualenv
10- Source0: https://files.pythonhosted.org/packages/3f/40/abc5a766da6b0b2457f819feab8e9203cbeae29327bd241359f866a3da9d /virtualenv-20.26.6.tar.gz# /%{name}-%{version} .tar.gz
10+ Source0: https://files.pythonhosted.org/packages/aa/a3/4d310fa5f00863544e1d0f4de93bddec248499ccf97d4791bc3122c9d4f3 /virtualenv-20.36.1 .tar.gz
1111Patch0: 0001-replace-to-flit.patch
12- Patch1000: CVE-2025-50181v0.patch
13- Patch1001: CVE-2025-50181v1.patch
14- Patch1002: CVE-2025-50181v2.patch
15- Patch1003: CVE-2025-50181v3.patch
12+ Patch1000: CVE-2025-50181.patch
1613BuildArch: noarch
1714
1815%description
@@ -54,66 +51,29 @@ virtualenv is a tool to create isolated Python environment.
5451# For the poolmanager.py under tests, it is archived inside a .whl file, which in turn is archived inside another .whl file,
5552# so, we need to unpack the outer .whl, then unpack the inner .whl, apply the patch, and then re-zip both levels.
5653
57- echo "Manually Patching virtualenv-20.26.6 /src/virtualenv/seed/wheels/embed/pip-24.0 -py3-none-any.whl/pip/_vendor/urllib3/poolmanager.py"
58- mkdir -p unpacked_pip-24.0 -py3-none-any
59- unzip src/virtualenv/seed/wheels/embed/pip-24.0 -py3-none-any.whl -d unpacked_pip-24.0 -py3-none-any
60- patch -p1 -d unpacked_pip-24.0 -py3-none-any < %{PATCH1000 }
54+ echo "Manually Patching virtualenv-20.36.1 /src/virtualenv/seed/wheels/embed/pip-25.0.1 -py3-none-any.whl/pip/_vendor/urllib3/poolmanager.py"
55+ mkdir -p unpacked_pip-25.0.1 -py3-none-any
56+ unzip src/virtualenv/seed/wheels/embed/pip-25.0.1 -py3-none-any.whl -d unpacked_pip-25.0.1 -py3-none-any
57+ patch -p1 -d unpacked_pip-25.0.1 -py3-none-any < %{PATCH1000 }
6158# Remove the original file
62- rm -f src/virtualenv/seed/wheels/embed/pip-24.0 -py3-none-any.whl
59+ rm -f src/virtualenv/seed/wheels/embed/pip-25.0.1 -py3-none-any.whl
6360# After patching, re-zip the contents back into a .whl
64- pushd unpacked_pip-24.0 -py3-none-any
65- zip -r ../src/virtualenv/seed/wheels/embed/pip-24.0 -py3-none-any.whl *
61+ pushd unpacked_pip-25.0.1 -py3-none-any
62+ zip -r ../src/virtualenv/seed/wheels/embed/pip-25.0.1 -py3-none-any.whl *
6663popd
67- rm -rf unpacked_pip-24.0 -py3-none-any
64+ rm -rf unpacked_pip-25.0.1 -py3-none-any
6865
69- echo "Manually Patching virtualenv-20.26.6 /src/virtualenv/seed/wheels/embed/pip-24.2 -py3-none-any.whl/pip/_vendor/urllib3/poolmanager.py"
70- mkdir -p unpacked_pip-24.2 -py3-none-any
71- unzip src/virtualenv/seed/wheels/embed/pip-24.2 -py3-none-any.whl -d unpacked_pip-24.2 -py3-none-any
72- patch -p1 -d unpacked_pip-24.2 -py3-none-any < %{PATCH1001 }
66+ echo "Manually Patching virtualenv-20.36.1 /src/virtualenv/seed/wheels/embed/pip-25.3 -py3-none-any.whl/pip/_vendor/urllib3/poolmanager.py"
67+ mkdir -p unpacked_pip-25.3 -py3-none-any
68+ unzip src/virtualenv/seed/wheels/embed/pip-25.3 -py3-none-any.whl -d unpacked_pip-25.3 -py3-none-any
69+ patch -p1 -d unpacked_pip-25.3 -py3-none-any < %{PATCH1000 }
7370# Remove the original file
74- rm -f src/virtualenv/seed/wheels/embed/pip-24.2 -py3-none-any.whl
71+ rm -f src/virtualenv/seed/wheels/embed/pip-25.3 -py3-none-any.whl
7572# After patching, re-zip the contents back into a .whl
76- pushd unpacked_pip-24.2-py3-none-any
77- zip -r ../src/virtualenv/seed/wheels/embed/pip-24.2-py3-none-any.whl *
78- popd
79- rm -rf unpacked_pip-24.2-py3-none-any
80-
81- echo "Manually Patching the poolmanager.py under tests, it needs to be unpacked from a .whl file, which is inside another .whl file"
82- # unpack the outer wheel
83- mkdir -p unpacked_virtualenv-16.7.9-py2.py3-none-any
84- unzip tests/unit/create/virtualenv-16.7.9-py2.py3-none-any.whl -d unpacked_virtualenv-16.7.9-py2.py3-none-any
85-
86- # This is the pip-19.1.1 wheel that is archived inside the virtualenv_support directory of the outer wheel
87- # We need to unpack it, apply the patch, and then re-zip it
88- echo "Manually Patching virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.1.1-py2.py3-none-any.whl/pip/_vendor/urllib3/poolmanager.py"
89- # unpack the inner wheel
90- mkdir -p unpacked_pip-19.1.1-py2.py3-none-any
91- unzip unpacked_virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.1.1-py2.py3-none-any.whl -d unpacked_pip-19.1.1-py2.py3-none-any
92- patch -p1 -d unpacked_pip-19.1.1-py2.py3-none-any < %{PATCH1002 }
93- rm -f unpacked_virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.1.1-py2.py3-none-any.whl
94- pushd unpacked_pip-19.1.1-py2.py3-none-any
95- zip -r ../unpacked_virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.1.1-py2.py3-none-any.whl *
96- popd
97- rm -rf unpacked_pip-19.1.1-py2.py3-none-any
98-
99- # Now, we need to patch the pip-19.3.1 wheel that is archived inside the virtualenv_support directory of the outer wheel
100- # We need to unpack it, apply the patch, and then re-zip it
101- echo "Manually Patching virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.3.1-py2.py3-none-any.whl/pip/_vendor/urllib3/poolmanager.py"
102- mkdir -p unpacked_pip-19.3.1-py2.py3-none-any
103- unzip unpacked_virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.3.1-py2.py3-none-any.whl -d unpacked_pip-19.3.1-py2.py3-none-any
104- patch -p1 -d unpacked_pip-19.3.1-py2.py3-none-any < %{PATCH1003 }
105- # Repack the inner wheel
106- rm -f unpacked_virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.3.1-py2.py3-none-any.whl
107- pushd unpacked_pip-19.3.1-py2.py3-none-any
108- zip -r ../unpacked_virtualenv-16.7.9-py2.py3-none-any/virtualenv_support/pip-19.3.1-py2.py3-none-any.whl *
109- popd
110- rm -rf unpacked_pip-19.3.1-py2.py3-none-any
111-
112- # Repack the outer wheel
113- rm -f tests/unit/create/virtualenv-16.7.9-py2.py3-none-any.whl
114- pushd unpacked_virtualenv-16.7.9-py2.py3-none-any
115- zip -r ../tests/unit/create/unpacked_virtualenv-16.7.9-py2.py3-none-any *
73+ pushd unpacked_pip-25.3-py3-none-any
74+ zip -r ../src/virtualenv/seed/wheels/embed/pip-25.3-py3-none-any.whl *
11675popd
76+ rm -rf unpacked_pip-25.3-py3-none-any
11777
11878%generate_buildrequires
11979
12686%check
12787pip3 install ' tox>=3.27.1,<4.0.0'
12888# skip "test_can_build_c_extensions" tests since they fail on python3_version >= 3.12. See https://src.fedoraproject.org/rpms/python-virtualenv/blob/rawhide/f/python-virtualenv.spec#_153
129- sed -i ' s/coverage run -m pytest {posargs:--junitxml {toxworkdir}\/junit\.{envname}\.xml tests --int}/coverage run -m pytest {posargs:--junitxml {toxworkdir}\/junit\.{envname}\.xml tests - k "not test_can_build_c_extensions" --int}/g ' tox.ini
89+ export PYTEST_ADDOPTS= ' - k "not test_can_build_c_extensions"'
13090tox -e py
13191
13292%files -n python3-virtualenv
@@ -136,6 +96,9 @@ tox -e py
13696%{_bindir }/virtualenv
13797
13898%changelog
99+ * Thu Jan 15 2026 Archana Shettigar <v-shettigara@microsoft.com> - 20.36.1-1
100+ - Upgrade to 20.36.1 for CVE-2026-22702
101+
139102* Wed Jul 09 2025 Aninda Pradhan <v-anipradhan@microsoft.com> - 20.26.6-2
140103- Add patch to fix CVE-2025-50181 in urllib3 poolmanager.py
141104
0 commit comments