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 — Warnings and errors specific to the C implementation of the warnings module · Issue #122255 · python/cpython

Warnings and errors specific to the C implementation of the warnings module #122255

New issue
Copy link
New issue
Copy link
Closed
Closed
Warnings and errors specific to the C implementation of the warnings module#122255
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-importlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@serhiy-storchaka
serhiy-storchaka
opened on Jul 25, 2024
Issue body actions

New deprecation warnings about missing or inconsistent __spec__.loader and __loader__ introduced in #86298 are emitted only for the C implementation of the warnings module. Existing errors (AttributeError or ValueError) are also only raised for the C implementation of the warnings module. See tests added in #122227.

I believe that before turning the deprecation warnings into errors, we should add warnings for the Python implementation.

cc @brettcannon, @warsaw

Linked PRs

  • gh-122255: Add black box tests in test_warnings #122227
  • [3.13] gh-122255: Add black box tests in test_warnings (GH-122227) #122818
  • [3.12] gh-122255: Add black box tests in test_warnings (GH-122227) #122819
  • gh-122255: Synchronize warnings in C and Python implementations of the warnings module #122824
Reacted by Brett Cannon

Activity

  1. serhiy-storchaka
    added
    topic-importlib
    on Jul 25, 2024
  2. serhiy-storchaka
    added a commit that references this issue on Aug 8, 2024

    gh-122255: Add black box tests in test_warnings (GH-122227)

    fe13c9b
  3. miss-islington
    added 2 commits that reference this issue on Aug 8, 2024

    pythongh-122255: Add black box tests in test_warnings (pythonGH-122227)

    6126b60

    pythongh-122255: Add black box tests in test_warnings (pythonGH-122227)

    2ed027a
  4. serhiy-storchaka
    added a commit that references this issue on Aug 8, 2024

    pythongh-122255: Synchronize warnings in C and Python implementations…

    ad53fe3
  5. gpshead
    added a commit that references this issue on Aug 9, 2024

    [3.13] gh-122255: Add black box tests in test_warnings (GH-122227) (G…

    46f973f
  6. serhiy-storchaka commented on Aug 14, 2024

    @serhiy-storchaka
    serhiy-storchaka
    on Aug 14, 2024
    MemberAuthor
    More actions

    Tests are failed for this change, and I think this is because it exposes a flaw in the current code. Opened #123011.

  7. serhiy-storchaka
    added a commit that references this issue on Aug 14, 2024

    [3.12] gh-122255: Add black box tests in test_warnings (GH-122227) (G…

    c3ee1a7
  8. blhsing
    added a commit that references this issue on Aug 22, 2024

    pythongh-122255: Add black box tests in test_warnings (pythonGH-122227)

    d591fcd
  9. serhiy-storchaka commented on Nov 9, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Nov 9, 2025
    MemberAuthor
    More actions

    Note also that __spec__ is set to None for the __main__ module. If __loader__ is deprecated, what should be used for the __main__ module?

  10. picnixz
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Nov 9, 2025
  11. serhiy-storchaka
    added a commit that references this issue on Nov 14, 2025

    gh-122255: Synchronize warnings in C and Python implementations of th…

    8deaa93
  12. serhiy-storchaka
    closed this as completedon Nov 14, 2025
  13. StanFromIreland
    added a commit that references this issue on Dec 6, 2025

    pythongh-122255: Synchronize warnings in C and Python implementations…

    a3a3bb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-importlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.