<#2183 The deprecated `pex.pex_bootstrapper.bootst...
# github-notifications
c
#2183 The deprecated `pex.pex_bootstrapper.bootstrap_pex_env` API does not scrub `pex.third_party`. Issue created by jsirois The
pex.pex_bootstrapper.bootstrap_pex_env
is maintained for legacy consumers, including https://github.com/pantsbuild/lambdex and https://github.com/kwlzn/pyuwsgi_pex. As such, despite the
__pex__
magic import package prefix which obviates the need for the entrypoint generally and the
pex3 venv create --prefix
tool for the Lambdex use case in particular, the API should be fixed to scrub
pex.third_party
vendored imports and the Pex bootstrap from the
sys.path
like the
pex.pex.PEX.execute
standard entry point does. Without this, errors like the following are seen for user-code that depends on the latest versions of attrs - which Pex vendors at ~21.5.0 (this is from the Lambdex use case with a user code dependency on attrs 23.1.0 and using Pex 2.1.134):
Copy code
Unable to import module 'lambdex_handler': cannot import name 'AttrsInstance' from 'pex.vendor._vendored.attrs.attr' (/var/task/.bootstrap/pex/vendor/_vendored/attrs/attr/__init__.py)
pantsbuild/pex