Issue18010
Created on 2013-05-18 17:05 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pydoc_search_onerror.patch | pitrou, 2013-05-18 20:03 | review | ||
| pydoc_search_onerror.v2.patch | martin.panter, 2015-11-02 03:36 | review | ||
| gui-search.patch | martin.panter, 2015-11-06 02:01 | For 2.7 | review | |
| Messages (12) | |||
|---|---|---|---|
| msg189536 - (view) | Author: Antoine Pitrou (pitrou) * | Date: 2013-05-18 17:05 | |
After installing Django, I get the following error in test_pydoc: ====================================================================== FAIL: test_url_requests (test.test_pydoc.PydocUrlHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/finalize/Lib/test/test_pydoc.py", line 581, in test_url_requests self.assertEqual(result, title, text) AssertionError: 'Pydoc: Error - search?key=pydoc' != 'Pydoc: Search Results' - Pydoc: Error - search?key=pydoc + Pydoc: Search Results The reason is attempting to import a django.something module raises the following error: django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings ... which isn't silenced by pydoc. Now I agree this is fundamentally obnoxious on Django's part, but unfortunately it isn't the only package (IIRC) to behave in this way, meaning it would be nice from pydoc to silence all such errors when an import is attempted. |
|||
| msg189541 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2013-05-18 18:53 | |
Isn't issue10060 related? |
|||
| msg189543 - (view) | Author: Antoine Pitrou (pitrou) * | Date: 2013-05-18 19:47 | |
Not exactly. issue10060 is about a crash when loading an extension module, not an exception being raised and propagated through pydoc. |
|||
| msg189545 - (view) | Author: Antoine Pitrou (pitrou) * | Date: 2013-05-18 20:03 | |
Patch attached. |
|||
| msg253411 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2015-10-24 16:47 | |
The patch looks good. |
|||
| msg253412 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-10-24 17:09 | |
Would be nice to have a test. |
|||
| msg253892 - (view) | Author: Martin Panter (martin.panter) * | Date: 2015-11-02 03:36 | |
Here is a test case. I had to insert a temporary directory into sys.path, based off my patch in Issue 25184. Let me know if it doesn’t look too evil :) |
|||
| msg254139 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-11-05 20:24 | |
Oh, I were not expected that the test will be so complex, and now I'm not sure that want it. :-( But looks it can't be written simpler. The patch LGTM in any case. |
|||
| msg254156 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-11-06 01:10 | |
New changeset 9098731de840 by Martin Panter in branch '3.4': Issue #18010: Fix pydoc web server search to handle package exceptions https://hg.python.org/cpython/rev/9098731de840 New changeset 8702efa1feb4 by Martin Panter in branch '3.5': Issue #18010: Merge pydoc web search fix from 3.4 into 3.5 https://hg.python.org/cpython/rev/8702efa1feb4 New changeset d86ff708f545 by Martin Panter in branch 'default': Issue #18010: Merge pydoc web search fix from 3.5 https://hg.python.org/cpython/rev/d86ff708f545 |
|||
| msg254162 - (view) | Author: Martin Panter (martin.panter) * | Date: 2015-11-06 02:01 | |
In Python 2, it looks like instead of the web server search function there is a GUI search function. Here is a patch to fix the equivalent problem there. However I am not volunteering to make a test case; there does not seem to be any GUI tests to start with. |
|||
| msg254171 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-11-06 07:32 | |
gui-search.patch LGTM. |
|||
| msg254257 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-11-07 06:00 | |
New changeset 1ab20d3c9dc6 by Martin Panter in branch '2.7': Issue #18010: Fix pydoc GUI search to handle package exceptions https://hg.python.org/cpython/rev/1ab20d3c9dc6 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:45 | admin | set | github: 62210 |
| 2015-11-07 06:06:43 | martin.panter | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2015-11-07 06:01:00 | python-dev | set | messages: + msg254257 |
| 2015-11-06 07:32:02 | serhiy.storchaka | set | messages: + msg254171 |
| 2015-11-06 02:01:18 | martin.panter | set | files:
+ gui-search.patch messages:
+ msg254162 |
| 2015-11-06 01:10:00 | python-dev | set | nosy:
+ python-dev messages: + msg254156 |
| 2015-11-05 20:24:32 | serhiy.storchaka | set | stage: patch review -> commit review |
| 2015-11-05 20:24:23 | serhiy.storchaka | set | messages: + msg254139 |
| 2015-11-02 03:36:18 | martin.panter | set | files:
+ pydoc_search_onerror.v2.patch nosy:
+ martin.panter stage: test needed -> patch review |
| 2015-10-24 17:09:30 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg253412 |
| 2015-10-24 16:47:29 | rhettinger | set | nosy:
+ rhettinger messages: + msg253411 |
| 2015-10-24 14:56:35 | serhiy.storchaka | set | stage: needs patch -> test needed versions: + Python 3.5, Python 3.6, - Python 3.3 |
| 2013-12-09 19:24:33 | serhiy.storchaka | set | nosy:
- serhiy.storchaka |
| 2013-05-18 20:03:03 | pitrou | set | files:
+ pydoc_search_onerror.patch keywords: + patch messages: + msg189545 |
| 2013-05-18 19:47:42 | pitrou | set | messages: + msg189543 |
| 2013-05-18 18:53:12 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg189541 |
| 2013-05-18 17:05:19 | pitrou | create | |