[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Brett: "Semantics are fine (I initially misread what you wanted to do; sorry)." Ok, I pushed my change. Brett: "And I wouldn't backport since it's an enhancement and not a bugfix." Ok, fine. -- resolution: -> fixed status: open -> closed versions: -

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset c873a479a6a3 by Victor Stinner in branch 'default': site: error on sitecustomize import error https://hg.python.org/cpython/rev/c873a479a6a3 -- nosy: +python-dev ___ Python tracker

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-21 Thread Brett Cannon
Brett Cannon added the comment: Semantics are fine (I initially misread what you wanted to do; sorry). And I wouldn't backport since it's an enhancement and not a bugfix. -- ___ Python tracker

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-21 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-21 Thread STINNER Victor
STINNER Victor added the comment: @Brett: Ping? I'm going to push the fix to Python 3.6. Tell me if you are ok to backport the change to Python 2.7 and 3.5 too. -- ___ Python tracker __

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-18 Thread STINNER Victor
STINNER Victor added the comment: Example of the bug: $ cat Lib/sitecustomize.py print("before") import xxx print("after") haypo@smithers$ ./python -q -c pass before The line "after" is not executed and *no* error nor warning is raised. With the patch: $ ./python -q -c pass be

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: This is a change in semantics. It might be better to log an ImportWarning when the import fails and keep the current semantics (and be careful about importing warnings). -- ___ Python tracker

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor
New submission from STINNER Victor: If the code of sitecustomize raises an ImportError because the requested module doesn't exist, sitecustomize exception is silently ignored because site.py uses "try: import sitecustomize except ImportError: pass". It's possible to log a warning since ImportE