Re: python: dropping the .py files [was Re: Fedora 23 cloud image (and, for that matter, minimal anything)] bloat

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

 



* Matthew Miller:

> On Thu, Sep 24, 2015 at 10:10:40AM +0200, Vít Ondruch wrote:
>> Also, you might consider to ship the precompiled bytecode just
>> optionally, using recommends.
>> 
>> On contrary, if you insist on shipping the bytecode, why you don't drop
>> the .py files? I see a lot of duplication all around python packages ....
>
> Wait, we can do that? Why don't we?

It alters backtraces:

Here's a silly example:

Traceback (most recent call last):
  File "u.py", line 2, in <module>
    t.t()
  File "/tmp/t.py", line 2, in t
    a()
  File "/tmp/t.py", line 5, in a
    b()
  File "/tmp/t.py", line 8, in b
    c()
NameError: global name 'c' is not defined

This turns into:

Traceback (most recent call last):
  File "u.py", line 2, in <module>
    t.t()
  File "/tmp/t.py", line 2, in t
  File "/tmp/t.py", line 5, in a
  File "/tmp/t.py", line 8, in b
NameError: global name 'c' is not defined

Such a change will not be universally well-received.

In any case, source code (with comments stripped and whitespace
normalized) is often smaller than bytecode (or most other forms of
serializing syntax), and compresses better.
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [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