bpo-37641 preserve relative file location in embeddable zip - #14884
Conversation
Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative.
|
@mrginglymus the build error which occured: If the tests are ran again, this issue should no longer occur, based on Ned's response in the python-dev mailing list. In order to restart the tests, you can make a commit to your PR branch that adds trivial whitespace, such an empty comment. |
|
Thanks @aeros167, I’ll wait for the CLA to come through before pushing. |
|
Looks great, thanks for this! Anyone who sees this can merge once the CLA is cleared, or else ping the bug again and I'll finish it up. |
|
@mrginglymus If you signed the CLA over 24 hours ago and it's still not updating on GitHub, try using the check yourself link from @the-knights-who-say-ni. Sometimes you have to manually check the status for it to properly update, I remember having to do that for mine. |
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
|
Thanks @mrginglymus for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
…-14884) Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative. Co-Authored-By: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit c4cda43) Co-authored-by: Bill Collins <bilbocollins@gmail.com>
Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative. Co-Authored-By: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit c4cda43) Co-authored-by: Bill Collins <bilbocollins@gmail.com>
…-14884) Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative. Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
…-14884) Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative. Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
…-14884) Previously, pyc files in the embeddable distribution reported their location as <build path>/<file stem>.py. This causes a little confusion when interpreting stack traces as the file is in a (almost certainly) incorrect location, and lacks the full relative path to Lib (e.g. email/mime/image.py will only show image.py). This change preserves the Lib relative location of the source file as a path so that stack traces are (hopefully) less misleading and more informative. Co-Authored-By: Kyle Stanley <aeros167@gmail.com>

Previously, pyc files in the embeddable distribution reported their
location as /.py. This causes a little confusion
when interpreting stack traces as the file is in a (almost certainly)
incorrect location, and lacks the full relative path to Lib (e.g.
email/mime/image.py will only show image.py).
This change preserves the Lib relative location of the source file as a
path so that stack traces are (hopefully) less misleading and more
informative.
https://bugs.python.org/issue37641