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-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore by zooba · Pull Request #110108 · python/cpython

Conversation

@zooba

@zooba zooba commented Sep 29, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: test_tools: test_freeze_simple_script() fails on s390x SLES 3.x: [Errno 2] No such file or directory: (...) #109615

Sorry, something went wrong.

Uh oh!

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

All reactions
@zooba
pythongh-109615: Look for 'Modules' as landmark for test_copy_python_…
ee811e5
…src_ignore
@zooba zooba added tests Tests in the Lib/test dir skip news labels Sep 29, 2023
@bedevere-app bedevere-app Bot added the awaiting review label Sep 29, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 29, 2023
test_tools: test_freeze_simple_script() fails on s390x SLES 3.x: [Errno 2] No such file or directory: (...) #109615
Closed
@zooba zooba added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 29, 2023
vstinner
vstinner reviewed Sep 29, 2023
View reviewed changes
Comment thread Lib/test/test_support.py Resolved

Uh oh!

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

@vstinner

vstinner commented Sep 29, 2023

Copy link
Copy Markdown
Member

I didn't expect that finding the location of the Python source code and checking if it's actually available or not would be so complicated!

At least, it's good, we are finding and fixing issues :-)

For now, I'm ok to keep the code in test_support.py, but later we might share more code in support\__init__.py.

test_freeze and test_venv copy the stdlib. test_venv only cares about Python code, whereas test_freeze wants the C code.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Sep 29, 2023

Copy link
Copy Markdown
Member

The last change makes test_copy_python_src_ignore fail rather than skip on Windows installs,

Oh. How did you notice that? Is Azure Pipelines running tests which such use cases, or did you discover the issue manually?

All reactions

Sorry, something went wrong.

Uh oh!

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

@zooba
Add comment
3bf0d92
@zooba
zooba requested a review from a team as a code owner September 29, 2023 14:13
vstinner
vstinner reviewed Sep 29, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR now includes unrelated change. Is it on purpose?

Sorry, something went wrong.

Uh oh!

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

All reactions
@zooba

zooba commented Sep 29, 2023

Copy link
Copy Markdown
Member Author

I didn't expect that finding the location of the Python source code and checking if it's actually available or not would be so complicated!

Yeah, there's a reason I listed this on my wishlist for a new build system. Would be great if we just always built an install-like layout, rather than trying to intermingle it with the source tree.

The pybuilddir.txt file should always be there in a build, even on Windows, adjacent to the main executable (approximately, os.path.realpath(sys.orig_argv[0])). The official check is in getpath.py, and it sets the _is_python_build config value. I forget where that ends up precisely.

All reactions

Sorry, something went wrong.

Uh oh!

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

@zooba
Revert unrelated changes
8deec70
@zooba

zooba commented Sep 29, 2023

Copy link
Copy Markdown
Member Author

Your PR now includes unrelated change.

Nope. That's what I get for trying to fix OpenSSL stuff 😆

vstinner reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

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

@zooba

zooba commented Sep 29, 2023

Copy link
Copy Markdown
Member Author

Oh. How did you notice that? Is Azure Pipelines running tests which such use cases, or did you discover the issue manually?

It should, but they seem to have been passing for some reason. I haven't looked closely, but possibly they got disabled recently because people want to move to GHA.

I also run my own daily tests at work, and it was found in the "layout test", which generates an install layout (python PC/layout --preset-default --copy <DIR>), copies it to a brand new machine, and then runs the test suite. That was where I noticed it first.

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner approved these changes Sep 29, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Sep 29, 2023
@zooba
zooba merged commit 20bc5f7 into python:main Sep 29, 2023
@miss-islington

miss-islington commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 29, 2023
@zooba
zooba deleted the gh-109615 branch September 29, 2023 15:24
@miss-islington

miss-islington commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Sorry, @zooba, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 20bc5f7c28a6f8a2e156c4a748ffabb5efc7c761 3.12

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned zooba Sep 29, 2023
@bedevere-app

bedevere-app Bot commented Sep 29, 2023

Copy link
Copy Markdown

GH-110110 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.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Sep 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 29, 2023
@zooba @miss-islington
pythongh-109615: Look for 'Modules' as landmark for test_copy_python_…
1ea43c9
…src_ignore (pythonGH-110108)

(cherry picked from commit 20bc5f7)

Co-authored-by: Steve Dower <[email protected]>
@zooba

zooba commented Sep 29, 2023

Copy link
Copy Markdown
Member Author

I'm guessing 3.12 has conflicts because the earlier PRs haven't been merged yet? I'll wait until that's done and then trigger it again

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Sep 29, 2023

Copy link
Copy Markdown
Member

Sorry, @zooba, I could not cleanly backport this to 3.12 due to a conflict.

Last days, I gave up on backports since 3.12 is blocked. I plan to try to backport my Tests and Docs changes once 3.12 will be reopened again next week. Until that, it's a backport nightmare :-(

zooba reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

zooba added a commit that referenced this pull request Sep 29, 2023
@miss-islington @zooba
gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ig…
a95e8cf
…nore (GH-110108)

(cherry picked from commit 20bc5f7)

Co-authored-by: Steve Dower <[email protected]>
vstinner pushed a commit to vstinner/cpython that referenced this pull request Oct 4, 2023
@zooba @vstinner
pythongh-109615: Look for 'Modules' as landmark for test_copy_python_…
4f4c799
…src_ignore (pythonGH-110108)

(cherry picked from commit 20bc5f7)
vstinner added a commit that referenced this pull request Oct 4, 2023
@vstinner @zooba
[3.12] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (…
8939221
…#110340)

* gh-109615: Fix support test_copy_python_src_ignore() (#109958)

Fix the test when run on an installed Python: use "abs_srcdir" of
sysconfig, and skip the test if the Python source code cannot be
found.

* Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and
  Lib/test/libregrtest/utils.py now first try to get "abs_srcdir"
  from sysconfig, before getting "srcdir" from sysconfig.
* test.pythoninfo logs sysconfig "abs_srcdir".

(cherry picked from commit b89ed9d)

* gh-109615: Fix support test_copy_python_src_ignore() on WASM (#109970)

Not only check if src_dir exists, but look also for Lib/os.py
landmark.

(cherry picked from commit cc54bcf)

* gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108)

(cherry picked from commit 20bc5f7)

* gh-109748: Fix again venv test_zippath_from_non_installed_posix() (#110149)

Call also copy_python_src_ignore() on listdir() names.

shutil.copytree(): replace set() with an empty tuple. An empty tuple
becomes a constant in the compiler and checking if an item is in an
empty tuple is cheap.

(cherry picked from commit 0def8c7)

---------

Co-authored-by: Steve Dower <[email protected]>
@vstinner vstinner added needs backport to 3.12 only security fixes and removed needs backport to 3.12 only security fixes labels Oct 17, 2023
@miss-islington-app

miss-islington-app Bot commented Oct 17, 2023

Copy link
Copy Markdown

Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Oct 17, 2023

Copy link
Copy Markdown

Sorry, @zooba, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 20bc5f7c28a6f8a2e156c4a748ffabb5efc7c761 3.12
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Oct 17, 2023

Copy link
Copy Markdown
Member

Ah, this fix was backported to 3.12 as part of larger backport: commit 80f9585.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner removed the needs backport to 3.12 only security fixes label Oct 18, 2023
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@zooba @Glyphack
pythongh-109615: Look for 'Modules' as landmark for test_copy_python_…
4e5e6f3
…src_ignore (pythonGH-110108)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

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

Assignees

@zooba zooba

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.

3 participants

@zooba @vstinner @miss-islington
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 01402520 — 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.