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-111201: Skip pyrepl Windows tests earlier by vstinner · Pull Request #119848 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 31, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Don't attempt to load pyrepl Windows console if platforms others than Windows. For example, the import can fail if ctypes is missing.

  • Issue: A new Python REPL #111201

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner vstinner added the skip news label May 31, 2024
@vstinner
vstinner requested review from ambv, lysnikolaou and pablogsal as code owners May 31, 2024 12:36
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels May 31, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 31, 2024
A new Python REPL #111201
Closed
7 tasks done
@vstinner
vstinner force-pushed the pyrepl_testwin branch from 90f31b3 to 5649aa9 Compare May 31, 2024 12:36
@vstinner vstinner changed the title gh-111201: Skip pyperl Windows tests earlier gh-111201: Skip pyrepl Windows tests earlier May 31, 2024
@vstinner
vstinner force-pushed the pyrepl_testwin branch from 5649aa9 to cb992e7 Compare May 31, 2024 12:37
@vstinner

vstinner commented May 31, 2024

Copy link
Copy Markdown
Member Author

Example of failiure on FreeBSD where _ctypes extension is missing: https://buildbot.python.org/all/#/builders/1232/builds/2462

0:10:59 load avg: 3.41 [403/478/1] test_pyrepl failed (uncaught exception)
Failed to import test module: test.test_pyrepl.test_windows_console
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/unittest/loader.py", line 396, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/unittest/loader.py", line 339, in _get_module_from_name
    __import__(name)
    ~~~~~~~~~~^^^^^^
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/test_pyrepl/test_windows_console.py", line 5, in <module>
    from _pyrepl.windows_console import (
    ...<5 lines>...
    )
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/_pyrepl/windows_console.py", line 30, in <module>
    import ctypes
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/ctypes/__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

test test_pyrepl crashed -- Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/single.py", line 181, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/single.py", line 138, in _load_run_test
    regrtest_runner(result, test_func, runtests)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/single.py", line 91, in regrtest_runner
    test_result = test_func()
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/single.py", line 135, in test_func
    return run_unittest(test_mod)
  File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/single.py", line 35, in run_unittest
    raise Exception("errors while loading tests")
Exception: errors while loading tests
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
pythongh-111201: Skip pyrepl Windows tests earlier
b3a16bc
Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.
@vstinner
vstinner force-pushed the pyrepl_testwin branch from cb992e7 to b3a16bc Compare May 31, 2024 13:37
pablogsal
pablogsal approved these changes May 31, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 31, 2024
@vstinner
vstinner enabled auto-merge (squash) May 31, 2024 13:50
@vstinner
vstinner merged commit 91601a5 into python:main May 31, 2024
@vstinner
vstinner deleted the pyrepl_testwin branch May 31, 2024 14:06
@bedevere-app bedevere-app Bot removed the awaiting merge label May 31, 2024
@AlexWaygood

AlexWaygood commented May 31, 2024

Copy link
Copy Markdown
Member

FYI, I think that that buildbot failure was already fixed an hour ago, in #119834

vstinner reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner mentioned this pull request May 31, 2024
gh-111201: [pyrepl] Ensure optional platform-specific imports are optional #119834
Merged
vstinner added a commit to vstinner/cpython that referenced this pull request Jun 1, 2024
@vstinner
pythongh-111201: Skip pyrepl Windows tests earlier (python#119848)
8806c0c
Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.

(cherry picked from commit 91601a5)
@bedevere-app

bedevere-app Bot commented Jun 1, 2024

Copy link
Copy Markdown

GH-119924 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner added a commit that referenced this pull request Jun 1, 2024
@vstinner
[3.13] gh-111201: Skip pyrepl Windows tests earlier (#119848) (#119924)
ac35d96
gh-111201: Skip pyrepl Windows tests earlier (#119848)

Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.

(cherry picked from commit 91601a5)
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@vstinner @estyxx
pythongh-111201: Skip pyrepl Windows tests earlier (python#119848)
bb58e4a
Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pablogsal pablogsal pablogsal approved these changes
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ambv ambv Awaiting requested review from ambv ambv 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.

3 participants

@vstinner @AlexWaygood @pablogsal
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.