Issue2535

classification
Title: Building jython standalone manually results in local filesystem paths showing up in Jython stacktraces
Type: behaviour Severity: minor
Components: None Versions: Jython 2.7
Milestone: Jython 2.7.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: stefan.richthofer Nosy List: stefan.richthofer, teeohhem
Priority: low Keywords:

Created on 2016-11-30.18:48:52 by teeohhem, last changed 2017-02-27.04:47:25 by zyasoft.

Messages
msg10993 (view) Author: Tom Alexander (teeohhem) Date: 2016-11-30.18:48:51
This is probably an improvement, but definitely an annoyance.
msg10994 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2016-12-01.00:17:35
Tom, as preparation to work on #527524 I recently looked into the part of Jython responsible to generate class-files. However I suppose I could fix this one too. The question is, how should the files in the stacktrace be named?

- The JVM usually prints filenames without path, e.g. plainly 'PyObject.java'.

- CPython usually prints full, absolute path, e.g. '/usr/lib/python2.7/platform.py'.

So in a sense Java and Python conventions clash here.

Maybe the best compromise is to store paths relatively to Jython's build-directory (i.e. dist) and display them somehow like '<jython-home>/Lib/platform.py'.
Files not in a Jython-subfolder can continue to use CPython-style, since they are likely just compiled locally.

Also, we should have a flag or something in compileall.py to specify a format, e.g. a base-path relatively from which filenames should be stored in generated classfiles.
msg10995 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2016-12-01.14:05:26
Fixed as of https://github.com/jythontools/jython/commit/2ce0a4e51c6c020f11adcd0e59bfb901e4fea8ba

See commit-message for choosen format.

Tom, does this fix stacktraces properly for you?
History
Date User Action Args
2017-02-27 04:47:25zyasoftsetstatus: pending -> closed
2016-12-01 14:05:27stefan.richthofersetstatus: open -> pending
resolution: fixed
messages: + msg10995
milestone: Jython 2.7.1
2016-12-01 00:17:35stefan.richthofersetpriority: low
assignee: stefan.richthofer
messages: + msg10994
nosy: + stefan.richthofer
2016-11-30 18:48:52teeohhemcreate