File name pattern of byte-code files

I just stumbled over a byte-code file that is named __init__.cpython-38.pyc.139970453822000, i.e. with something like what seems a timestamp after the original file extension .pyc. What is this?

.
├── foo
│   ├── __pycache__
│   │   └── __init__.cpython-38.pyc.139970453822000
...

I had hoped to find information on additional file extensions in the Python docs at py_compile — Compile Python source files — Python 3.11.2 documentation, but this seems no to be explained.

Does anybody happen to know where this file may come from and what the complete, general file name pattern is of Python byte-code files?

EDIT: I’m running Python with Tox on an Ubuntu 18.04.6 LTS box.

I do not seen that big number on any in pycache on linux or macOS.
I don’t think the number is time stamp. unix epoch time is 1676906625 at the moment.

What OS are you seeing this on?
Does the file get recreated if you delete it?
Are all the __pycache__ containing files with big numbers added?

I cannot confirm the existence of such numeric tags in the __pycache__ directory. None of my pycache dirs have them.

There is nothing about it in the pycache PEP.

My guess is that some unrelated program is creating it. It might help if you were to tell us your operating system. If you are running Linux, you could also try running this command from the shell:


file foo/__pycache__/__init__.cpython-38.pyc.139970453822000

If file is unable to determing the file type, try this just in case it is confused by the file extensions:


cp foo/__pycache__/__init__.cpython-38.pyc.139970453822000 /tmp/junk123

file /tmp/junk123

No. It’s a single file only. It might be there as a side-effect of aborting a Tox run in the terminal with Ctrl+C.

Note that I’m developing with Tox on Ubuntu 18.04.6 LTS.

I’m particularly interested in the topic, even though this might be just an edge case, because I maintain the pyclean CLI tool. Instead of guessing I’d love to know the specific details of files potentially lying around, in detail.

Nice catch! The file is empty. It’s certainly a leftover of an aborted Pytest execution running under Tox.