Message268188
My guess is the file.startswith(basedir) in the getdocloc() method is getting tricked by non-canonical paths (e.g. lowercase vs uppercase C: drive?). Would it help to use something like os.path.normcase(), or maybe os.path.commonpath(), pathlib.PurePath.parts or PurePath.relative_to()?
file = inspect.getabsfile(object)
...
basedir = os.path.normcase(basedir)
if (...
(file.startswith(basedir) and ...
Also, in the new get_pydoc_link() function, is that os.path.join() call meant to be there?
basedir = os.path.join(dirname(dirname(__file__))) |
|
Date |
User |
Action |
Args |
2016-06-11 06:03:21 | martin.panter | set | recipients:
+ martin.panter, brett.cannon, georg.brandl, terry.reedy, mgedmin, eric.araujo, r.david.murray, python-dev, eric.snow, sean.rodman, kau8hik |
2016-06-11 06:03:21 | martin.panter | set | messageid: <1465625001.29.0.619262207219.issue16484@psf.upfronthosting.co.za> |
2016-06-11 06:03:21 | martin.panter | link | issue16484 messages |
2016-06-11 06:03:20 | martin.panter | create | |
|