classification
Title: pstats.Stats: strip_dirs() method cannot handle file paths from different OS
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Jaroslav, docs@python, inada.naoki, miss-islington, paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: easy, patch

Created on 2016-08-30 20:49 by Jaroslav, last changed 2018-06-05 06:55 by inada.naoki. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7295 merged rixx, 2018-06-01 07:22
PR 7390 merged miss-islington, 2018-06-04 10:08
PR 7391 merged miss-islington, 2018-06-04 10:09
PR 7392 merged miss-islington, 2018-06-04 10:10
Messages (7)
msg273964 - (view) Author: Jaroslav Kames (Jaroslav) Date: 2016-08-30 20:49
Setup
=====

profile data from machine
-------------------------
- Win 7 (64bit)
- Python 3.5.2 (32bit)

data analyzed on
----------------
- Lubuntu 16.04 (64bit) incl. Python 3

issue
-----
method strip_dirs() cannot extract the base name since it assumes the Unix-style file paths. not tested for opposite direction. no exception emitted.

comment
-------
1. optional argument controlling the used 'path' module can definitely help
2. documentation update will be welcome
msg273973 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-08-30 21:47
We could add to the compatibility paragraph that compatibility with files produced by the same program on a different platform is not guaranteed.

For the option, that would be an enhancement, and you should open a new issue for that.
msg274272 - (view) Author: Jaroslav Kames (Jaroslav) Date: 2016-09-02 21:09
The paragraph is ok.

I'll open. Thanks a lot.
msg318640 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2018-06-04 10:07
New changeset f7745e1dcb8e8473cc86112a0213b3f244a07230 by INADA Naoki (Tobias Kunze) in branch 'master':
bpo-27902: Add compatibility note to Profile docs (GH-7295)
https://github.com/python/cpython/commit/f7745e1dcb8e8473cc86112a0213b3f244a07230
msg318684 - (view) Author: miss-islington (miss-islington) Date: 2018-06-04 17:25
New changeset 7548a9327409df787eef5f8c2780b53b5788012f by Miss Islington (bot) in branch '3.7':
bpo-27902: Add compatibility note to Profile docs (GH-7295)
https://github.com/python/cpython/commit/7548a9327409df787eef5f8c2780b53b5788012f
msg318685 - (view) Author: miss-islington (miss-islington) Date: 2018-06-04 17:29
New changeset 134bb46db706416d76d03c0af6018372f35be06f by Miss Islington (bot) in branch '2.7':
bpo-27902: Add compatibility note to Profile docs (GH-7295)
https://github.com/python/cpython/commit/134bb46db706416d76d03c0af6018372f35be06f
msg318686 - (view) Author: miss-islington (miss-islington) Date: 2018-06-04 17:30
New changeset 889a1ef6833d47cc732c291852602b5fc8d5fde7 by Miss Islington (bot) in branch '3.6':
bpo-27902: Add compatibility note to Profile docs (GH-7295)
https://github.com/python/cpython/commit/889a1ef6833d47cc732c291852602b5fc8d5fde7
History
Date User Action Args
2018-06-05 06:55:04inada.naokisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-06-04 17:30:36miss-islingtonsetmessages: + msg318686
2018-06-04 17:29:57miss-islingtonsetmessages: + msg318685
2018-06-04 17:25:39miss-islingtonsetnosy: + miss-islington
messages: + msg318684
2018-06-04 10:10:26miss-islingtonsetpull_requests: + pull_request7018
2018-06-04 10:09:27miss-islingtonsetpull_requests: + pull_request7017
2018-06-04 10:08:28miss-islingtonsetpull_requests: + pull_request7016
2018-06-04 10:07:26inada.naokisetnosy: + inada.naoki
messages: + msg318640
2018-06-01 07:22:30rixxsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request6924
2018-03-13 23:09:41cheryl.sabellasetkeywords: + easy
versions: + Python 3.7, Python 3.8, - Python 3.5, Python 3.6
2016-09-02 21:09:51Jaroslavsetmessages: + msg274272
2016-08-30 21:47:35r.david.murraysetassignee: docs@python
type: behavior -> enhancement
components: + Documentation, - Windows
versions: + Python 2.7, Python 3.6
nosy: + r.david.murray, docs@python

messages: + msg273973
stage: needs patch
2016-08-30 20:49:35Jaroslavcreate