Issue 16972: Useless function call in site.py
Created on 2013-01-15 15:19 by x746e, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| patch.diff | x746e, 2013-01-15 15:19 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg180022 - (view) | Author: Kirill (x746e) | Date: 2013-01-15 15:19 | |
In Lib/site.py:149 [1] _init_pathinfo call has no effect. Looks like it's here because in the past _init_pathinfo was changing a global variable [2]. I believe that it should be changed to `known_paths = _init_pathinfo()`, in the same way as it's done in addsitedir function [3]. [1] http://hg.python.org/cpython/file/fb17969ace93/Lib/site.py#l149 [2] http://hg.python.org/cpython/annotate/ac13a6ce13e2/Lib/site.py#l102 [3] http://hg.python.org/cpython/file/fb17969ace93/Lib/site.py#l189 |
|||
| msg180209 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2013-01-18 18:37 | |
I suspect Kirill is right, although the function that calls addpackage() in site.py always passes in a value, so it won't change anything for Python itself, only third-party code. And addpackage() has been that way since 2004. But, in looking at the function itself, the function seems wrong without the change, so I say fix it in 3.4 but leave it out of 3.3. And honestly that whole module needs to be cleaned up (again). |
|||
| msg180606 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2013-01-25 18:57 | |
New changeset 2c0197c95ec6 by Brett Cannon in branch 'default': Issue #16972: Have site.addpackage() consider known paths even when http://hg.python.org/cpython/rev/2c0197c95ec6 |
|||
| msg180607 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2013-01-25 18:57 | |
Thanks for the bug report, Kirill! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:40 | admin | set | github: 61176 |
| 2013-01-25 18:57:59 | brett.cannon | set | status: open -> closed resolution: fixed messages: + msg180607 |
| 2013-01-25 18:57:23 | python-dev | set | nosy:
+ python-dev messages: + msg180606 |
| 2013-01-18 18:37:53 | brett.cannon | set | assignee: brett.cannon messages: + msg180209 stage: patch review -> commit review |
| 2013-01-18 18:20:29 | ezio.melotti | set | nosy:
+ brett.cannon stage: patch review |
| 2013-01-16 04:37:40 | eric.araujo | set | nosy:
+ eric.araujo versions: + Python 3.4 |
| 2013-01-15 15:19:18 | x746e | create | |

