This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Anthony Sottile, Chris Billington, Ivan.Pozdeev, __Vano, barry, brett.cannon, christian.heimes, eric.smith, eric.snow, ethan smith, jaraco, mhammond, ncoghlan, pitrou, takluyver, terry.reedy, vstinner
Date 2019-01-14.09:01:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I really hate .pth files because the slow down Python startup time for *all* applications whereas .pth files are usually specific to a very few applications using one or two specific modules.

They can also modify the behavior of Python for all applications, with no way to opt-out.

I would prefer to have an opt-in option, disabled by default.

I'm in favor of deprecating the feature in Python 3.8 and remove it from Python 3.9.

Python 3 already support namespaces which covers the most common use case of .pth files, no?

Another use case is to run code if a specific command line option is used or if an environment variable is set. For example, my faulthandler backport uses a .pth file to enable faulthandler if PYTHONFAULTHANDLER environment variable is set. I dislike this .pth file (I didn't write it ;-)). I'm fine with dropping this feature as a whole.

We can add a pending deprecation warning in Python 3.7 right now.
Date User Action Args
2019-01-14 09:01:59vstinnersetrecipients: + vstinner, mhammond, barry, brett.cannon, terry.reedy, jaraco, ncoghlan, pitrou, eric.smith, christian.heimes, __Vano, eric.snow, takluyver, Ivan.Pozdeev, Anthony Sottile, ethan smith, Chris Billington
2019-01-14 09:01:58vstinnersetmessageid: <>
2019-01-14 09:01:58vstinnerlinkissue33944 messages
2019-01-14 09:01:58vstinnercreate