[issue33128] PathFinder is twice on sys.meta_path

2018-04-24 Thread Nick Coghlan

Nick Coghlan  added the comment:

Hartmut, thanks for the issue report, and Pablo, thanks for the PR to resolve 
it!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-04-24 Thread miss-islington

miss-islington  added the comment:


New changeset 52a5a17338dfa7fed259027e1ecceba9c8491189 by Miss Islington (bot) 
in branch '3.7':
bpo-33128 Fix duplicated call to importlib._install_external_importers  
(GH-6273)
https://github.com/python/cpython/commit/52a5a17338dfa7fed259027e1ecceba9c8491189


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-04-24 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6290

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-04-24 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 0977091dca59709864b14cfc129388f1f0de7bf7 by Nick Coghlan (Pablo 
Galindo) in branch 'master':
bpo-33128 Fix duplicated call to importlib._install_external_importers  
(GH-6273)
https://github.com/python/cpython/commit/0977091dca59709864b14cfc129388f1f0de7bf7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Calling initexternalimports InitalizeMainInterpreter and from new_interpreter 
is right, since we only want these importers on the metapath after we know 
sys.path has been configured appropriately.

It's the call from InitializeCore that's questionable, since we haven't 
finished setting up sys.path at that point.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-27 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +6001
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

The same problem happens in `new_interpreter` as far as I understand.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

It seems that the problem is that `_Py_InitializeEx_Private` calls  
`_Py_InitializeCore` and `_Py_InitializeMainInterpreter`. The first one calls 
at the end `initimport` that in turns calls 
`importlib._install_external_importers` that sets the PathFinder. Then, 
`_Py_InitializeMainInterpreter` calls  `initexternalimport` that in turns calls 
again `importlib._install_external_importers` and therefore we end with two 
PathFinders in sys.meta_path.

I think the solution is removing the call to initexternalimport in 
`_Py_InitializeMainInterpreter` as it has been alreade initialized by 
`_Py_InitializeCore`.

--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-26 Thread Brett Cannon

Change by Brett Cannon :


--
keywords: +3.7regression
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-23 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the report.  git bisect result:

1abcf6700b4da6207fe859de40c6c1bada6b4fec is the first bad commit
commit 1abcf6700b4da6207fe859de40c6c1bada6b4fec
Author: Eric Snow 
Date:   Tue May 23 21:46:51 2017 -0700

bpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772)

(patch by Nick Coghlan)

--
nosy: +eric.snow, ncoghlan, ned.deily
stage:  -> needs patch
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33128] PathFinder is twice on sys.meta_path

2018-03-23 Thread Hartmut Goebel

New submission from Hartmut Goebel :

As of Python 3.7.0b2 _frozen_importlib_external.PathFinder exists twice on 
sys.meta_path, and it is the same object:

$ python -S
Python 3.7.0b2 (default, Mar 22 2018, 20:09:00) 
[GCC 5.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.meta_path)
[,
,
,
]
>>> print([id(p) for p in sys.meta_path])
[24427944, 24430216, 24517416, 24517416]
>>>

--
components: Interpreter Core
messages: 314340
nosy: htgoebel
priority: normal
severity: normal
status: open
title: PathFinder is twice on sys.meta_path
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com