On 2019-08-10, Serhiy Storchaka wrote: > Actually we need to distinguish the the author and the user of the code and > show warnings only to the author. Using .pyc files was just an heuristic: > the author compiles the Python code, and the user uses compiled .pyc files. > Would be nice to have more reliable way to determine the owning of the code. > It is related not only to SyntaxWarnings, but to runtime > DeprecationWarnings. Maybe silence warnings only for readonly files and make > files installed by PIP readonly?
Identifying the author vs the user seems like a good idea. Relying on the OS filesystem seems like a solution that would cause some challenges. Can we embed that information in the .pyc file instead? That way, Python knows that it is module/package that has been installed with pip or similar and the end user is likely not the author. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/OVUKO7BJHG3JBKKGOWYWK4HTJ4SICCSK/