python / python/cpython

inspect.getsource gets source copy on disk even when module has not been reloaded

Open
#71,077 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 26890
Nosy @1st1, @emilyemorehouse

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2016-04-30.03:33:07.191>
labels = ['library']
title = 'inspect.getsource gets source copy on disk even when module has not been reloaded'
updated_at = <Date 2017-02-21.16:37:00.426>
user = 'https://bugs.python.org/sebastienbourdeauducq'

bugs.python.org fields:

activity = <Date 2017-02-21.16:37:00.426>
actor = 'emilyemorehouse'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2016-04-30.03:33:07.191>
creator = 'sebastien.bourdeauducq'
dependencies = []
files = []
hgrepos = []
issue_num = 26890
keywords = []
message_count = 2.0
messages = ['264538', '264539']
nosy_count = 3.0
nosy_names = ['yselivanov', 'sebastien.bourdeauducq', 'emilyemorehouse']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue26890'
versions = ['Python 3.5']

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

The issue names inspect.getsource but provides no reproduction, source file, or test. Start by reproducing the behavior with a module changed on disk without reloading it, then trace the inspect library entry point and identify the expected source-selection behavior before defining a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.