[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Brett Cannon
Brett Cannon added the comment: Yeah, there's actually a specific 'warning' directive which puts text in the docs in a red box to make it a full-blown warning which is what I thought you wanted, having it say "this is different than Python 2!". Having a sentence that just states how things

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Eric Snow
Changes by Eric Snow : -- keywords: +easy ___ Python tracker ___ ___

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Xavier Morel
Xavier Morel added the comment: > Fair enough. So we can just add a sentence informing readers that `meta_path`, by default, holds entries to handle the standard kinds of modules (.py files, extension modules…). Yeah that's basically what I meant, talking about a "warning" in python 3 may have

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 02/06/2017 à 13:21, Xavier Morel a écrit : > > I spent a few hours trying to understand why our import hooks did not work > correctly anymore in 3.5, and I never even considered printing sys.meta_path > in an open interpreter, I realised the behavioural

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Xavier Morel
Xavier Morel added the comment: > A warning is probably too strong. Also, it's easy to check sys.meta_path at > the interpreter prompt, so I'm not sure it's worth mentioning at all. It's easy if you think of it and did not miss a small bit of the Python 3.3 release note indicating that the

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Xavier Morel
Xavier Morel added the comment: > I'm fine with adding a note to the Python 2 docs, but putting it in Python 3 > seems to be going in the wrong direction as having sys.meta_path not be empty > is how Python will be going forward. I don't think putting a note is any hint that the Python 3

[issue30535] Warn that meta_path is not empty

2017-06-01 Thread Brett Cannon
Brett Cannon added the comment: I'm fine with adding a note to the Python 2 docs, but putting it in Python 3 seems to be going in the wrong direction as having sys.meta_path not be empty is how Python will be going forward. -- ___ Python tracker

[issue30535] Warn that meta_path is not empty

2017-06-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: A warning is probably too strong. Also, it's easy to check sys.meta_path at the interpreter prompt, so I'm not sure it's worth mentioning at all. -- nosy: +brett.cannon, eric.snow, ncoghlan, pitrou ___ Python

[issue30535] Warn that meta_path is not empty

2017-06-01 Thread Xavier Morel
Xavier Morel added the comment: And it turns out the change was noted in the Python 3.3 release notes[0] though not all the consequences were spelled out (and the meta_path and path_hooks documentations were not changed) [0] https://docs.python.org/3/whatsnew/3.3.html#visible-changes

[issue30535] Warn that meta_path is not empty

2017-06-01 Thread Xavier Morel
Xavier Morel added the comment: Addendum: the warning was present (in the documentation) until Python 3.5, even though Python 3.3 is apparently where the "default finders" were moved to meta_path: > python3.2 -c 'import sys;print(sys.meta_path)' [] > python3.3 -c 'import

[issue30535] Warn that meta_path is not empty

2017-06-01 Thread Xavier Morel
New submission from Xavier Morel: Encountered this issue porting Python 2 code manipulating meta_path to Python 3. In Python 2, meta_path is empty by default and its documentation specifically notes that: > sys.meta_path is searched before any implicit default finders or sys.path. As a