GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-99370: fix test_zippath_from_non_installed_posix by kkpattern · Pull Request #99483 · python/cpython

Conversation

@kkpattern

@kkpattern kkpattern commented Nov 14, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

When build with shared enabled, we need to set LD_LIBRARY_PATH for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary and find and link the libpython.so.

  • Issue: In python3.11 getpath.py calculates zip path with default prefix in a venv which breaks venv created fron non-installed python #99370

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kkpattern
Fix test_zippath_from_non_installed_posix
7082899
When build with shared enabled, we need to set `LD_LIBRARY_PATH`
for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary
and find and link the libpython.so.
@kkpattern
kkpattern requested a review from vsajip as a code owner November 14, 2022 16:57
@bedevere-bot bedevere-bot added awaiting review tests Tests in the Lib/test dir labels Nov 14, 2022
@bedevere-bot bedevere-bot mentioned this pull request Nov 14, 2022
In python3.11 getpath.py calculates zip path with default prefix in a venv which breaks venv created fron non-installed python #99370
Closed
@kkpattern kkpattern mentioned this pull request Nov 14, 2022
gh-99370: calculate zip path from prefix when in a venv #99371
Merged
@zware zware added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 14, 2022
@bedevere-bot

bedevere-bot commented Nov 14, 2022

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @zware for commit 7082899 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 14, 2022
@zware zware added the skip news label Nov 14, 2022
@zware

zware commented Nov 14, 2022

Copy link
Copy Markdown
Member

Looks like we still have a failure: https://buildbot.python.org/all/#builders/713/builds/829. There may be others yet to be reported.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kkpattern

kkpattern commented Nov 14, 2022

Copy link
Copy Markdown
Contributor Author

Yeah. Looks like the stdlib files are not copied into the non-installed python so it can't be correctly initialized. I'm trying to figure out why. In test_zippath_from_non_installed_posix, I try to create a non-installed python environment to test venv created from it. In order for the non-installed python to find stdlib, I iterate through the sys.path and check the zip landmark and the os.py landmark to copy the stdlib files.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kkpattern

kkpattern commented Nov 14, 2022

Copy link
Copy Markdown
Contributor Author

Seem AMD64 RHEL8 FIPS Only Blake2 Builtin Hash PR829 build cpython out of source tree. I will try to replicate the build locally.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kkpattern

kkpattern commented Nov 14, 2022

Copy link
Copy Markdown
Contributor Author

So it's because the platlibdir is configured to lib64. I will change the lib directory name according to sys.platlibdir.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kkpattern added 2 commits November 14, 2022 17:52
@kkpattern
Use sys.platlibdir to create lib directory
3266ff9
Python can be built with platlibdir configured to "lib64". Use
sys.platlibdir instead of "lib" in
test_zippath_from_non_installed_posix.
@kkpattern
Replace enormous try block with self.addCleanup
de73f73
@zware zware added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 14, 2022
@bedevere-bot

bedevere-bot commented Nov 14, 2022

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @zware for commit de73f73 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 14, 2022
@zooba
zooba merged commit 1df0752 into python:main Nov 15, 2022
@bedevere-bot bedevere-bot removed the awaiting review label Nov 15, 2022
@zooba zooba added the needs backport to 3.11 only security fixes label Nov 15, 2022
@miss-islington

miss-islington commented Nov 15, 2022

Copy link
Copy Markdown
Contributor

Thanks @kkpattern for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Nov 15, 2022

Copy link
Copy Markdown

GH-99498 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 15, 2022
@kkpattern @miss-islington
pythongh-99370: fix test_zippath_from_non_installed_posix (pythonGH-9…
ed733fa
…9483)

When build with shared enabled, we need to set `LD_LIBRARY_PATH`
for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary
and find and link the libpython.so.
(cherry picked from commit 1df0752)

Co-authored-by: Kai Zhang <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Nov 15, 2022
miss-islington added a commit that referenced this pull request Nov 15, 2022
@miss-islington @kkpattern
gh-99370: fix test_zippath_from_non_installed_posix (GH-99483)
b189f42
When build with shared enabled, we need to set `LD_LIBRARY_PATH`
for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary
and find and link the libpython.so.
(cherry picked from commit 1df0752)

Co-authored-by: Kai Zhang <[email protected]>
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Nov 16, 2022
@CuriousLearner
Merge branch 'main' into fix-issue21914
abd206e
* main: (8272 commits)
  Update Windows readme.txt to clarify Visual Studio required versions (pythonGH-99522)
  pythongh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (python#99461)
  pythongh-92647: [Enum] use final status to determine lookup or create (pythonGH-99500)
  pythongh-81057: Move Globals in Core Code to _PyRuntimeState (pythongh-99496)
  Post 3.12.0a2
  pythongh-99300: Use Py_NewRef() in Python/Python-ast.c (python#99499)
  pythongh-93649: Split pytime and datetime tests from _testcapimodule.c (python#99494)
  pythongh-99370: fix test_zippath_from_non_installed_posix (pythonGH-99483)
  pythonGH-99205: remove `_static` field from `PyThreadState` and `PyInterpreterState` (pythonGH-99385)
  pythongh-81057: Move the Remaining Import State Globals to _PyRuntimeState (pythongh-99488)
  pythongh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc module (pythonGH-99373)
  pythongh-93649: Split getargs tests from _testcapimodule.c (python#99346)
  pythongh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (pythongh-99487)
  pythonGH-98219: reduce sleep time in `asyncio` subprocess test (python#99464)
  pythonGH-99388: add `loop_factory` parameter to `asyncio.run` (python#99462)
  pythongh-99300: Use Py_NewRef() in PC/ directory (python#99479)
  pythongh-99300: Use Py_NewRef() in Doc/ directory  (python#99480)
  pythongh-99300: Use Py_NewRef() in Modules/ directory (python#99473)
  pythongh-99300: Use Py_NewRef() in Modules/ directory (python#99469)
  pythongh-99370: Calculate zip path from prefix when in a venv (pythonGH-99371)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vsajip vsajip Awaiting requested review from vsajip vsajip is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@kkpattern @bedevere-bot @zware @miss-islington @zooba
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.