Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 683962

Summary: x11-terms/kitty not using __pycache__
Product: Gentoo Linux Reporter: Jan Ziak (atomsymbol) <0xe2.0x9a.0x9b>
Component: Current packagesAssignee: Pablo Orduna <pabloorduna98>
Status: RESOLVED OBSOLETE    
Severity: normal CC: ionen, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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