venvの--upgrade-depsオプション
バージョン 3.9 で変更: pip と setuptools を PyPI での最新版に更新するには、--upgrade-deps オプションを追加してください。
『Python実践レシピ』で知った
どんな経緯で入ったのだろう?
I'd like to propose add a --upgrade to venv module to automatically update pip and potentially setuptools if supplied. This will allow ensuring you have the latest and greatest of these core components. (2018/08)
This will allow me to skip my next command that I usually always do
Rather than importing or forking, I would expect this could just be done by invoking the venv's pip as a subprocess.
なお公式ドキュメントによると
バージョン 3.12 で変更: setuptools is no longer a core venv dependency.
This PR removes the bundled setuptools wheel from ensurepip, and stops installing setuptools in environments created by venv.