Message336882
| Author |
steve.dower |
| Recipients |
Anthony Sottile, Chris Billington, Ivan.Pozdeev, Peter L3, SilentGhost, __Vano, barry, brett.cannon, cheryl.sabella, christian.heimes, eric.smith, eric.snow, ethan smith, ionelmc, jaraco, mhammond, ncoghlan, pitrou, steve.dower, takluyver, terry.reedy, veky |
| Date |
2019年03月01日.00:58:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1551401915.86.0.220245357362.issue33944@roundup.psfhosted.org> |
| In-reply-to |
| Content |
The sitecustomize.py file is totally available, and the only limitation there is packages can't inject themselves into it on installation. And if you want to trigger it on a package import then you totally can (though there's *another* discussion about that being a bad idea).
.pth files really only satisfy the "run at startup because I'm a dependency of something that my user wants and don't make them opt-in to my changed behaviour", which I don't like :)
If encodings need to be available without an explicit import, sure, we can add a point for those. Import hooks can always be injected by a package __init__.py before the importer will try and resolve the module, so nothing is needed there. But having a PEP with specific use cases to argue about is the way to create new mechanisms here. I don't agree we need a solution before declaring that the old way should be avoided and will eventually be removed, provided we don't add noisy warnings until there's an alternative. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2019年03月01日 00:58:35 | steve.dower | set | recipients:
+ steve.dower, mhammond, barry, brett.cannon, terry.reedy, jaraco, ncoghlan, pitrou, eric.smith, christian.heimes, ionelmc, SilentGhost, __Vano, eric.snow, takluyver, veky, Ivan.Pozdeev, Anthony Sottile, ethan smith, cheryl.sabella, Chris Billington, Peter L3 |
| 2019年03月01日 00:58:35 | steve.dower | set | messageid: <1551401915.86.0.220245357362.issue33944@roundup.psfhosted.org> |
| 2019年03月01日 00:58:35 | steve.dower | link | issue33944 messages |
| 2019年03月01日 00:58:35 | steve.dower | create |
|