Skip to content

add sed pattern for truncated module paths - #163

Merged
Qix- merged 1 commit into
Qix-:masterfrom
Hasanhasan323:fix_test_script
Jul 10, 2026
Merged

add sed pattern for truncated module paths#163
Qix- merged 1 commit into
Qix-:masterfrom
Hasanhasan323:fix_test_script

Conversation

@Hasanhasan323

@Hasanhasan323 Hasanhasan323 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

On systems with a long build path, better-exceptions truncates the path in its output (appending "..."). The existing normalization script uses sed to replace such paths with a dummy value, but it only matched non-truncated paths(Those ending with >'). As a result, tests failed because the truncated path was not being normalized.

Add an extra sed command to match module paths ending with "..." and replace them with the same dummy string, so that the diff comparison works correctly regardless of whether the path is truncated.

See:

The Debian bug page: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1129141
The Ubuntu build log: https://launchpadlibrarian.net/866856463/buildlog_ubuntu-stonking-amd64.python-better-exceptions_0.4.0-2_BUILDING.txt.gz

On systems with a very long build path, better-exceptions truncates
the path in its output (appending "..."). The existing normalization
script uses sed to replace such paths with a dummy value, but it only
matched non-truncated paths(Those ending with >'). As a result, tests failed because the
truncated path was not being normalized.

Add an extra sed command to match module paths ending with "..." and
replace them with the same dummy string, so that the diff comparison
works correctly regardless of whether the path is truncated.
@Qix- Qix- closed this Jul 10, 2026
@Qix- Qix- reopened this Jul 10, 2026
@Qix-

Qix- commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Sorry, GitHub loves changing the layout of the page on mobile. Didn't mean to close.

TIL this package is on Debian's registry! Thanks for the PR. I'm currently in the midst of regaining access to my pypi accounts - is a merge sufficient or is a new version mandatory to help out on the Debian side of things?

@Hasanhasan323

Copy link
Copy Markdown
Contributor Author

TIL this package is on Debian's registry! Thanks for the PR. I'm currently in the midst of regaining access to my pypi accounts - is a merge sufficient or is a new version mandatory to help out on the Debian side of things?

Hello,

Yes, better-exceptions is available in Debian, but due to a very small difference in how packages are built between Debian and Ubuntu (the build path is longer in Ubuntu), building better-exceptions in Ubuntu was failing. I fixed this issue with a patch. Just merging is enough.
Of course, feel free to release a new version if you want; it won't affect Debian or Ubuntu in any way.

Thanks.

@Qix-
Qix- merged commit cc935c0 into Qix-:master Jul 10, 2026
12 checks passed
@Qix-

Qix- commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Thank you again! Let me know if there's anything else :)

@Hasanhasan323

Copy link
Copy Markdown
Contributor Author

Thank you again! Let me know if there's anything else :)

Thank you, nothing else is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants