Opened 3 years ago

Closed 3 years ago

#15114 closed (duplicate)

module_has_submodule can report false positives

Reported by: shields Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Python caches failed relative imports using a None in sys.modules. However, module_has_submodule only checks to see whether a key is present in sys.modules, so it can incorrectly report that a module exists when it doesn't.

Attached is a patch (one line, plus a comment) and a regression test.

The patch is against trunk, but the bug also affects 1.2.

Attachments (1)

sys-modules-none.diff (1.3 KB) - added by shields 3 years ago.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by shields

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #14698

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.