python / python/cpython

Syntax warnings are duplicated in zipimport

Open
#141,276 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.13 3.14 3.15 stdlib topic-importlib
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

When importing a not precompiled module from a ZIP archive, syntax warnings are emitted twice.

Discovered during adding tests for #139652.

Linked PRs
  • gh-153799

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the zipimport path for importing non-precompiled modules and review the tests being added for #139652. Reproduce the duplicate syntax-warning behavior, then compare gh-153799 to confirm the intended fix and regression coverage; done means one warning per occurrence and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.