
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2013-10-25 19:43 bypitrou, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| emergency_patch_for_test_trace.patch | vajrasky,2013-10-26 04:52 | review | ||
| remove_extra_slash_from_sys_path.patch | vajrasky,2013-10-26 06:05 | review | ||
| remove_extra_slash_from_sys_path_v2.patch | vajrasky,2013-11-02 04:35 | review | ||
| remove_extra_slash_from_sys_path_v3.patch | serhiy.storchaka,2016-11-10 10:16 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft,2017-03-31 16:36 | |
| Messages (7) | |||
|---|---|---|---|
| msg201286 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2013-10-25 19:43 | |
$ ./python -S -m test test_trace[1/1] test_tracetest test_trace failed -- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_trace.py", line 313, in test_coverage self.assertTrue("pprint.cover" in files)AssertionError: False is not true | |||
| msg201313 -(view) | Author: Vajrasky Kok (vajrasky)* | Date: 2013-10-26 04:52 | |
This is the "emergency" patch to solve this issue.The main issue is,[sky@localhost cpython]$ ./python -Sc "import sys; print(sys.path)"['', '/usr/local/lib/python34.zip', '/home/sky/Code/python/programming_language/cpython/Lib/', '/home/sky/Code/python/programming_language/cpython/Lib/plat-linux', '/home/sky/Code/python/programming_language/cpython/build/lib.linux-x86_64-3.4-pydebug'][sky@localhost cpython]$ ./python -c "import sys; print(sys.path)"['', '/usr/local/lib/python34.zip', '/home/sky/Code/python/programming_language/cpython/Lib', '/home/sky/Code/python/programming_language/cpython/Lib/plat-linux', '/home/sky/Code/python/programming_language/cpython/build/lib.linux-x86_64-3.4-pydebug', '/home/sky/.local/lib/python3.4/site-packages']Let me "zoom" it for you.[sky@localhost cpython]$ ./python -Sc "import sys; print(sys.path[2])"/home/sky/Code/python/programming_language/cpython/Lib/[sky@localhost cpython]$ ./python -c "import sys; print(sys.path[2])"/home/sky/Code/python/programming_language/cpython/LibThe "extra" slash is the culprit. I need to investigate whether this is deliberate or not. | |||
| msg201314 -(view) | Author: Vajrasky Kok (vajrasky)* | Date: 2013-10-26 06:05 | |
I finally found the main culprit which puts extra '/' in my sys.path. The patch removed the extra '/' and also fixed this test automatically. | |||
| msg201947 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2013-11-01 22:39 | |
The test should use the more specific assertXyz method:self.assertIn("pprint.cover", files)The error message would then be the more informativeAssertionError: 'pprint.cover' not found in <files listed> | |||
| msg201962 -(view) | Author: Vajrasky Kok (vajrasky)* | Date: 2013-11-02 04:35 | |
Attached the patch to accommodate Terry J. Reedy's request. | |||
| msg280500 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-11-10 10:16 | |
The separator is needed if the relative path is not empty and the prefix doesn't end with the separator.This patch seems also fixes most problems ofissue28655. | |||
| msg280572 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-11-11 10:12 | |
New changesetdb220f2df5a9 by Serhiy Storchaka in branch '3.5':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/db220f2df5a9New changeset1a88baaed7a0 by Serhiy Storchaka in branch '3.6':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/1a88baaed7a0New changeset82607e7c24c7 by Serhiy Storchaka in branch 'default':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/82607e7c24c7New changeset237ef36fb1bb by Serhiy Storchaka in branch '2.7':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/237ef36fb1bb | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:52 | admin | set | github: 63597 |
| 2017-03-31 16:36:09 | dstufft | set | pull_requests: +pull_request846 |
| 2016-11-11 12:02:17 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: resolved |
| 2016-11-11 10:12:27 | python-dev | set | nosy: +python-dev messages: +msg280572 |
| 2016-11-10 10:16:27 | serhiy.storchaka | set | files: +remove_extra_slash_from_sys_path_v3.patch nosy: +serhiy.storchaka versions: + Python 3.5, Python 3.6, Python 3.7, - Python 3.4 messages: +msg280500 assignee:serhiy.storchaka |
| 2016-10-04 02:51:52 | tdsmith | set | nosy: +tdsmith versions: + Python 2.7 |
| 2013-11-02 04:35:56 | vajrasky | set | files: +remove_extra_slash_from_sys_path_v2.patch messages: +msg201962 |
| 2013-11-01 22:39:42 | terry.reedy | set | nosy: +terry.reedy messages: +msg201947 |
| 2013-10-26 06:05:34 | vajrasky | set | files: +remove_extra_slash_from_sys_path.patch messages: +msg201314 |
| 2013-10-26 04:52:42 | vajrasky | set | files: +emergency_patch_for_test_trace.patch nosy: +vajrasky messages: +msg201313 keywords: +patch |
| 2013-10-25 19:43:53 | pitrou | create | |