Your message dated Tue, 07 Mar 2023 20:10:15 +0000
with message-id <[email protected]>
and subject line Bug#1026268: fixed in python3.12 3.12.0~a5-1
has caused the Debian Bug report #1026268,
regarding python3.10: `$ python3 -m venv dir` outputs "Error: name 'cmd' is not 
defined" if python3-venv is not installed.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1026268: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026268
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3.10
Version: 3.10.9-1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

When I tried to create a python3 venv environment, I got an error message
"Error: name 'cmd' is not defined" and got partially-created venv environment.

Steps I did:
- Ran ` $ python3 -m venv venv ` to create a venv directory under the
  current directory, without installing python3-venv.

Expected:
- Have an error message "The virtual environment was not created successfully
  because ensurepip is not available."

Actual:
- Got an error message "Error: name 'cmd' is not defined" instead.

I found the following code snippet in /usr/lib/python3.10/venv/__init__.py
is suspicious. It uses a variable 'cmd' without defining it.

>     def _setup_pip(self, context):
>         """Installs or upgrades pip in a virtual environment"""
>         try:
>             self._call_new_python(context, '-m', 'ensurepip', '--upgrade',
>                                   '--default-pip', stderr=subprocess.STDOUT)
>         except subprocess.CalledProcessError:
>             stdlib = sysconfig.get_path('stdlib')
>             if not os.path.exists(f'{stdlib}/ensurepip/__main__.py'):
>                 print("""\
> The virtual environment was not created successfully because ensurepip is not
> available.  On Debian/Ubuntu systems, you need to install the python3-venv
> package using the following command.
> 
>     apt install python{}-venv
> 
> You may need to use sudo with that command.  After installing the python3-venv
> package, recreate your virtual environment.
> 
> Failing command: {}
> """.format(sysconfig.get_python_version(), cmd))
>                 sys.exit(1)

I installed python3-venv and now venv works for me.
But I'd be glad if I could get the correct error message.

Thanks,

-- System Information:
Debian Release: bookworm/sid
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-5-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3.10 depends on:
ii  libpython3.10-stdlib  3.10.9-1
ii  media-types           8.0.0
ii  mime-support          3.66
ii  python3.10-minimal    3.10.9-1

python3.10 recommends no packages.

Versions of packages python3.10 suggests:
ii  binutils         2.39.50.20221208-5
pn  python3.10-doc   <none>
ii  python3.10-venv  3.10.9-1

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: python3.12
Source-Version: 3.12.0~a5-1
Done: Matthias Klose <[email protected]>

We believe that the bug you reported is fixed in the latest version of
python3.12, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <[email protected]> (supplier of updated python3.12 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 02 Mar 2023 19:00:33 +0100
Source: python3.12
Binary: idle-python3.12 libpython3.12 libpython3.12-dbg libpython3.12-dev 
libpython3.12-minimal libpython3.12-stdlib libpython3.12-testsuite python3.12 
python3.12-dbg python3.12-dev python3.12-doc python3.12-examples 
python3.12-full python3.12-minimal python3.12-nopie python3.12-venv
Architecture: source all amd64
Version: 3.12.0~a5-1
Distribution: experimental
Urgency: medium
Maintainer: Matthias Klose <[email protected]>
Changed-By: Matthias Klose <[email protected]>
Description:
 idle-python3.12 - IDE for Python (v3.12) using Tkinter
 libpython3.12 - Shared Python runtime library (version 3.12)
 libpython3.12-dbg - Debug Build of the Python Interpreter (version 3.12)
 libpython3.12-dev - Header files and a static library for Python (v3.12)
 libpython3.12-minimal - Minimal subset of the Python language (version 3.12)
 libpython3.12-stdlib - Interactive high-level object-oriented language 
(standard library
 libpython3.12-testsuite - Testsuite for the Python standard library (v3.12)
 python3.12 - Interactive high-level object-oriented language (version 3.12)
 python3.12-dbg - Debug Build of the Python Interpreter (version 3.12)
 python3.12-dev - Header files and a static library for Python (v3.12)
 python3.12-doc - Documentation for the high-level object-oriented language 
Python
 python3.12-examples - Examples for the Python language (v3.12)
 python3.12-full - Python Interpreter with complete class library (version 3.12)
 python3.12-minimal - Minimal subset of the Python language (version 3.12)
 python3.12-nopie - Python interpreter linked without PIE (version 3.12)
 python3.12-venv - Interactive high-level object-oriented language (pyvenv 
binary, v
Closes: 1026268
Changes:
 python3.12 (3.12.0~a5-1) experimental; urgency=medium
 .
   * Python 3.12.0 alpha 5 snapshot.
 .
   [ Matthias Klose ]
   * Fix error message for 'python3 -m venv dir`, when python3-venv
     is not installed. Closes: #1026268.
 .
   [ Stefano Rivera ]
   * Mention that deleting EXTERNALLY-MANAGED is an option, in README.venv.
   * Update watch file for Python 3.12.
   * Override expat embedded-library lintian false-positives. (See: #1031859)
   * Update lintian overrides for reorganization in lintian 2.100.0.
   * Override depends-on-python-minimal in python3.12-nopie.
   * Override python3-script-but-no-python3-dep in python3.12.
Checksums-Sha1:
 43649860e112f0351f0c25c0053cb2e11a3da041 3627 python3.12_3.12.0~a5-1.dsc
 4b867887577377a8b33f130039f026acc51b2647 19743140 
python3.12_3.12.0~a5.orig.tar.xz
 aa62d5ed9df8c6dffaf2566a187daf1a9c0060a0 206868 
python3.12_3.12.0~a5-1.debian.tar.xz
 5b73fd2a297dd97637e5f8246d4da9fc0c8817ef 432452 
idle-python3.12_3.12.0~a5-1_all.deb
 5953dbda772712ead0f33ed60f3f070ee79018b0 19606308 
libpython3.12-dbg_3.12.0~a5-1_amd64.deb
 1e3a95f4639f50f6995ec2ab7008d61a66a8b8dd 4591060 
libpython3.12-dev_3.12.0~a5-1_amd64.deb
 0244509fe86acd9cfb7cedfc7cb6d86027527f80 817388 
libpython3.12-minimal_3.12.0~a5-1_amd64.deb
 2f1b34abf20effa1e236df4fc78c3768b31e2f79 1784508 
libpython3.12-stdlib_3.12.0~a5-1_amd64.deb
 e743f56342b3c4bffaeb8fbca2770934798cbe2a 3314504 
libpython3.12-testsuite_3.12.0~a5-1_all.deb
 78e0d58270a15b40a439f5ff4d033310470f8462 1972392 
libpython3.12_3.12.0~a5-1_amd64.deb
 2f7988fa4db3ce082a5d4fc529f4e149a0d3bbfa 44117764 
python3.12-dbg_3.12.0~a5-1_amd64.deb
 f84a1a2caf9fbb87f6024c4772cb300abb6c37c7 500652 
python3.12-dev_3.12.0~a5-1_amd64.deb
 90e928dc64402e5e92a47475fa3a684623622117 12613004 
python3.12-doc_3.12.0~a5-1_all.deb
 874d7a1a13c4a3a43f6443f7f1f892cf6d1b1dbf 745644 
python3.12-examples_3.12.0~a5-1_all.deb
 6b579ab4a8fa2bde8e11b56c300ddae1bdc13246 1280 
python3.12-full_3.12.0~a5-1_amd64.deb
 d58120d2dbc2ea39f9431dd22dd91e5ccf75af17 1890512 
python3.12-minimal_3.12.0~a5-1_amd64.deb
 8dcf01c7172987e6f93325d5f8e2d5bb224098e7 1880220 
python3.12-nopie_3.12.0~a5-1_amd64.deb
 82e46f2664059dc8be589c14b378e323aceac2bc 5872 
python3.12-venv_3.12.0~a5-1_amd64.deb
 0693b324e1d569717d8355346918d02c8bad9252 16331 
python3.12_3.12.0~a5-1_amd64.buildinfo
 c87dc1ba82a99d5bdf5435835fdb5bc1bd15f5d0 598740 
python3.12_3.12.0~a5-1_amd64.deb
Checksums-Sha256:
 9eabc0f826f0a7ab7f0489a005b40c348e448ed76b2b262f463bd0669c54c776 3627 
python3.12_3.12.0~a5-1.dsc
 d66ef7a342fe3a356f9cee3bb97adc1e5fb4840f6b6cff7de0ff7dd495f8323b 19743140 
python3.12_3.12.0~a5.orig.tar.xz
 d575fc0c2809bdd77fb4c3b6903cbe023b8a0b4464628e43c6829d39550ec7ee 206868 
python3.12_3.12.0~a5-1.debian.tar.xz
 b08729fb26a6cfa653db01d08dde0e87dc0f73361f48db74c22bb052666a321b 432452 
idle-python3.12_3.12.0~a5-1_all.deb
 5e406d236d73de2b84ac42157fe9cc744dd3d3967e68cdf102e836bb6b354a5f 19606308 
libpython3.12-dbg_3.12.0~a5-1_amd64.deb
 46d4b1b334ee19b92eb7db762a59b141ff06c988d2cc8cf4a2c4617ee6b3b31f 4591060 
libpython3.12-dev_3.12.0~a5-1_amd64.deb
 128874bc1c20bf9e66be2d7041b430b5f799b6ef6348b823fc883e3f87b26400 817388 
libpython3.12-minimal_3.12.0~a5-1_amd64.deb
 7ee9941517f296b4f63322e09d30beedcc1a3bd582afb1812e573c84efe96cae 1784508 
libpython3.12-stdlib_3.12.0~a5-1_amd64.deb
 8a17c97ff6030b0ff0eac450b833f02bba226154cbaf0bf7b161f67711142f36 3314504 
libpython3.12-testsuite_3.12.0~a5-1_all.deb
 aa2fd270b40027a7dc43a6e587bc5c229701a358a6e49e97359bee75e2326660 1972392 
libpython3.12_3.12.0~a5-1_amd64.deb
 f11a2df88b556bf95a6c35e5c5cfad3a2ba295f7beb851e748ef80d1fdd8e3a1 44117764 
python3.12-dbg_3.12.0~a5-1_amd64.deb
 c46848498e0467ba72728d95bbd8a1f76a384c3e3e848749fda2ef5632e8e629 500652 
python3.12-dev_3.12.0~a5-1_amd64.deb
 fe02dd121d76ca59550da806158b185af4eff25dac68839cfe6119126842d7a3 12613004 
python3.12-doc_3.12.0~a5-1_all.deb
 163b35ac47c7e4400539471501f280508c67ed2879b715fe35596d89f9f1f221 745644 
python3.12-examples_3.12.0~a5-1_all.deb
 53bebb2acd62de2536dbc75a5ffa6134d88f1edce21975e3755f53f5c84ab29c 1280 
python3.12-full_3.12.0~a5-1_amd64.deb
 a9a1175bbfbac75be9290d9135a105c90550c5e05628e6cfac11c6197f4a17fa 1890512 
python3.12-minimal_3.12.0~a5-1_amd64.deb
 0ba71cfe8e4eee47037bfd1a9fd1aa0f6d0093fc4a93046f55307ed644c16f95 1880220 
python3.12-nopie_3.12.0~a5-1_amd64.deb
 1ae29a4d65fb66e944fe9fda55cc75ceeccdfe63a305c5a59f62c1ed218c8e56 5872 
python3.12-venv_3.12.0~a5-1_amd64.deb
 34ddbbc0dd99c17c7fa9d039ba85f48d32c2028332e0f564dbb656217059130d 16331 
python3.12_3.12.0~a5-1_amd64.buildinfo
 8ae2e9e9fe23cc6f8c95855e245ae5426265aa6f3b6efa5e9f2d1af8b6969b57 598740 
python3.12_3.12.0~a5-1_amd64.deb
Files:
 b0217a55bd809f401876c7bd2aa790e1 3627 python optional 
python3.12_3.12.0~a5-1.dsc
 9f638d43a5cc186c42f9eccdaa3fee3f 19743140 python optional 
python3.12_3.12.0~a5.orig.tar.xz
 1abfd6a7e96646d95e5c7f099cc8a459 206868 python optional 
python3.12_3.12.0~a5-1.debian.tar.xz
 9282f7a8e4319a63bf91f44da472767d 432452 python optional 
idle-python3.12_3.12.0~a5-1_all.deb
 efa79e041e8a05241f2e26543118173e 19606308 debug optional 
libpython3.12-dbg_3.12.0~a5-1_amd64.deb
 f67dd7b9c41a547700383cbbfde97f98 4591060 libdevel optional 
libpython3.12-dev_3.12.0~a5-1_amd64.deb
 752b8a9a05efc2059185cd2910bfa00d 817388 python optional 
libpython3.12-minimal_3.12.0~a5-1_amd64.deb
 bcf4ff46d2141e9300cd6326737e9c37 1784508 python optional 
libpython3.12-stdlib_3.12.0~a5-1_amd64.deb
 6d2f644adb03efc4468c55ac4330e5b6 3314504 libdevel optional 
libpython3.12-testsuite_3.12.0~a5-1_all.deb
 13780ad35b3f07e7e7ea085771bd0ccd 1972392 libs optional 
libpython3.12_3.12.0~a5-1_amd64.deb
 2691dc792f2957a53d1a245836720e55 44117764 debug optional 
python3.12-dbg_3.12.0~a5-1_amd64.deb
 e8bc1d3791329262ff3017ae06e61e52 500652 python optional 
python3.12-dev_3.12.0~a5-1_amd64.deb
 c33a303d8428e068b03f16f9e9d08ceb 12613004 doc optional 
python3.12-doc_3.12.0~a5-1_all.deb
 000c0a96b3c53e828656241ed2561eda 745644 python optional 
python3.12-examples_3.12.0~a5-1_all.deb
 857d3474830e64e9e5161265725087d2 1280 python optional 
python3.12-full_3.12.0~a5-1_amd64.deb
 6fffc6f35335cfdbe23e08dbfeed1089 1890512 python optional 
python3.12-minimal_3.12.0~a5-1_amd64.deb
 f9b03735d8b928b738bd4f3683b1e410 1880220 python optional 
python3.12-nopie_3.12.0~a5-1_amd64.deb
 668404ee907abab4c6991cf597362a91 5872 python optional 
python3.12-venv_3.12.0~a5-1_amd64.deb
 89024abc9a2fb2a5dc5d854526ab2284 16331 python optional 
python3.12_3.12.0~a5-1_amd64.buildinfo
 b70044392ada6b981798cc48cd886dd2 598740 python optional 
python3.12_3.12.0~a5-1_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAmQBAlMQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9fLREACpV0g43Al7bbcA8vqLP+8wLyTcEKeix0mW
N8a7DUqSo5ZwMz8RFYb5tz4nxSvW8g2Xd8AzhrLTVi/dQF30Qyqaf8Otql1dX/q/
8Asq41MJf1IwW2mQbuAakQZB19xLqPW6o1AWuuDxsJNSkaNHco89yU3escgdyD6j
GbDnR5J+gIz0Z/ky/FsJgu4ISoItPkV6zaikFbDyBw3uFK9rT/Zi4Yz8Kl9D2WPz
HLXRwqDiYQ+qz3ei9tTQpTU2dSA9CwlCIhFAeZRjV+jkAF8wEHJov4XnKXpJj4MO
yjyEOsRyGFPX8Xy74mnufztLzKCQ4ViEhZMtru2aORkBnAF49w7jnDE08C2nhP0m
DS7eu+xsH4QnEPC9L4ybzh1aBhu3p1yK6ESuNf6PuVskirLTtns3z0IYyXLXsX15
o+MWiuM3W9QQ09BxnQPjaD3PugjNFmHSCn9FUYxP69qhWMnTAeUqK+WiTePGYl+D
J78h5UCXwV/xt9mcvPKyhdQAH8mlQe4fDhQvs91/HEtNV0REY6P75kYSqrf7T6/6
eM+1YrWFS64wnFRIMdY88fdRZPBnrYfWOjNzD5Ian07JjzEke56vDu1OrKWfjqP1
G1BHQ92AwJ/Uu1M7JpgTj1D68zHoCSCW1yfoRIFF+lwC1FYXLUQPx87GPqF1g6UX
AwJIln3+Dw==
=aPnE
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to