Re: RFC: Python minimization in Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16. 01. 20 21:55, David Malcolm wrote:
If a traceback for an exception includes files from the .zip, can the
traceback-printing machinery still print the pertinent lines of source?

Apparently no:

$ echo 0/0 > t.py
$ zip t.zip t.py
  adding: t.py (stored 0%)
$ python -c 'import t'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/churchyard/tmp/test/t.py", line 1, in <module>
    0/0
ZeroDivisionError: division by zero
$ rm t.py
$ python -c 'import sys; sys.path.insert(0, "t.zip"); import t'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "t.zip/t.py", line 1, in <module>
ZeroDivisionError: division by zero

That's bad UX. But maybe something that can be fixed in Python?

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux