Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683962 - x11-terms/kitty not using __pycache__
Summary: x11-terms/kitty not using __pycache__
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pablo Orduna
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-21 12:44 UTC by Jan Ziak (atomsymbol)
Modified: 2021-10-27 05:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2019-04-21 12:44:28 UTC
Hello.

Kitty's __pycache__ files are being compiled with Python optimizations enabled. This generates for example "/usr/lib64/kitty/__pycache__/__main__.cpython-36.opt-1.pyc".

However, the opt-1 files aren't being used by kitty, instead kitty is searching for "/usr/lib64/kitty/__pycache__/__main__.cpython-36.pyc".

$ qlist kitty | grep __pycache__.*__main__
/usr/lib64/kitty/__pycache__/__main__.cpython-36.opt-1.pyc

$ strace kitty true |& grep __pycache__.*__main__
openat(AT_FDCWD, "/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-36.pyc", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

----

This may be an indication of a larger problem:

$ find /usr/lib64 | grep __pycache__.*opt-1.pyc | wc -l
17214

$ find /usr/lib64 | grep __pycache__.*pyc | grep -v opt-1 | wc -l
34181

Is there a way to verify in an automated way whether Python packages are actually using installed __pycache__ files?
Comment 1 Ionen Wolkens gentoo-dev 2021-10-27 05:45:47 UTC
kitty currently generates bytecode for all optimization levels

I think this is obsolete