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.

classification
Title: Python 3.7.0b3 fails in pydoc where b2 did not.
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ncoghlan Nosy List: geoffreyspear, miss-islington, ncoghlan, ned.deily, nedbat
Priority: Keywords: 3.7regression, patch

Created on 2018-03-30 15:51 by nedbat, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6419 merged ncoghlan, 2018-04-08 12:56
PR 6476 merged miss-islington, 2018-04-15 11:53
PR 6477 merged ncoghlan, 2018-04-15 12:46
PR 6478 merged miss-islington, 2018-04-15 13:33
Messages (10)
msg314686 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2018-03-30 15:51
"pydoc coverage" worked with 3.7b2, but fails with a surprising ModuleNotFoundError for configparser with b3.  The configparser is importable in the Python interpreter.  I tried with -v to what imports were attempted, and configparser isn't even mentioned until the failure message.

Complete reproduction:

# Using 3.7.0b2
$ mktmpenv -p /usr/local/pythonz/pythons/CPython-3.7.0b2/bin/python3.7 -n -q
/Library/Python/2.7/site-packages/virtualenv.py:1098: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Collecting pip
  Using cached pip-9.0.3-py2.py3-none-any.whl
Collecting setuptools
  Using cached setuptools-39.0.1-py2.py3-none-any.whl
Installing collected packages: pip, setuptools
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
  Found existing installation: setuptools 18.2
    Uninstalling setuptools-18.2:
      Successfully uninstalled setuptools-18.2
Successfully installed pip-9.0.3 setuptools-39.0.1
This is a temporary environment. It will be deleted when you run 'deactivate'.
$ python -V
Python 3.7.0b2
$ pip install -q coverage==4.5.1
$ pydoc coverage
 Help on package coverage:

 NAME
     coverage - Code coverage measurement for Python.

 DESCRIPTION
     Ned Batchelder
     https://nedbatchelder.com/code/coverage

 PACKAGE CONTENTS
     __main__
     annotate
     backunittest
     backward
     bytecode
     cmdline
     collector
     config
     control
     data
     debug
     env
     execfile
     files
     html
     misc
     multiproc
     parser
     phystokens
     pickle2json
     plugin
     plugin_support
     python
     pytracer
     report
     results
     summary
     templite
     tracer
     version
     xmlreport

 DATA
     __url__ = 'https://coverage.readthedocs.io'
     version_info = (4, 5, 1, 'final', 0)

 VERSION
     4.5.1

 FILE
     /usr/local/virtualenvs/tmp-e3c595a6301312d/lib/python3.7/site-packages/coverage/__init__.py


$ deactivate
Removing temporary environment: tmp-e3c595a6301312d
Removing tmp-e3c595a6301312d...

# Using 3.7.0b3
$ mktmpenv -p /usr/local/pythonz/pythons/CPython-3.7.0b3/bin/python3.7 -n -q
/Library/Python/2.7/site-packages/virtualenv.py:1098: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Collecting pip
  Using cached pip-9.0.3-py2.py3-none-any.whl
Collecting setuptools
  Using cached setuptools-39.0.1-py2.py3-none-any.whl
Installing collected packages: pip, setuptools
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
  Found existing installation: setuptools 18.2
    Uninstalling setuptools-18.2:
      Successfully uninstalled setuptools-18.2
Successfully installed pip-9.0.3 setuptools-39.0.1
This is a temporary environment. It will be deleted when you run 'deactivate'.
$ python -V
Python 3.7.0b3
$ pip install -q coverage==4.5.1
$ pydoc coverage
problem in coverage - ModuleNotFoundError: No module named 'configparser'

$ python -c 'import configparser; print(configparser)'
<module 'configparser' from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/configparser.py'>

$ python -v -m pydoc coverage
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/__init__.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__init__.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/__init__.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/codecs.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/codecs.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/codecs.cpython-37.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x1005da438>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/aliases.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/aliases.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/aliases.cpython-37.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x1005e7f60>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x1005cbe80>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/utf_8.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/utf_8.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/utf_8.cpython-37.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x1005fac88>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/latin_1.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/latin_1.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/encodings/__pycache__/latin_1.cpython-37.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x1005fe710>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/io.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/io.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/io.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/abc.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/abc.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/abc.cpython-37.pyc'
import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x1005fecc0>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x1005fe908>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/site.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/site.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/os.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/os.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/os.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/stat.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/stat.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/stat.cpython-37.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x10069d630>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/posixpath.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/posixpath.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/posixpath.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/genericpath.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/genericpath.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/genericpath.cpython-37.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x1006ad0b8>
import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x10069dcf8>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/_collections_abc.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/_collections_abc.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/_collections_abc.cpython-37.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x1006ad6d8>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x1006102b0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/_bootlocale.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/_bootlocale.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/_bootlocale.cpython-37.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x100610278>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x100603828>
Python 3.7.0b3 (default, Mar 29 2018, 23:29:31)
[Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/runpy.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/runpy.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/runpy.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/__init__.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__init__.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/__init__.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/types.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/types.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/types.cpython-37.pyc'
import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x1006f1be0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/warnings.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/warnings.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/warnings.cpython-37.pyc'
import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x1006f1d30>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x1006f17f0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/machinery.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/machinery.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/machinery.cpython-37.pyc'
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x1006fbda0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/util.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/util.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/util.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/abc.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/abc.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/importlib/__pycache__/abc.cpython-37.pyc'
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x100706b38>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/contextlib.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/contextlib.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/contextlib.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/collections/__pycache__/__init__.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/collections/__init__.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/collections/__pycache__/__init__.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/operator.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/operator.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/operator.cpython-37.pyc'
import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x100763940>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/keyword.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/keyword.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/keyword.cpython-37.pyc'
import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x10076bac8>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/heapq.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/heapq.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/heapq.cpython-37.pyc'
# extension module '_heapq' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_heapq.cpython-37m-darwin.so'
# extension module '_heapq' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_heapq.cpython-37m-darwin.so'
import '_heapq' # <_frozen_importlib_external.ExtensionFileLoader object at 0x10076f978>
import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x10076f438>
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/reprlib.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/reprlib.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/reprlib.cpython-37.pyc'
import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x10076fa58>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x100742b00>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/functools.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/functools.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/functools.cpython-37.pyc'
import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x100742ef0>
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x100712470>
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x1007062e8>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/pkgutil.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/pkgutil.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/pkgutil.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/weakref.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/weakref.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/weakref.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/_weakrefset.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/_weakrefset.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/_weakrefset.cpython-37.pyc'
import '_weakrefset' # <_frozen_importlib_external.SourceFileLoader object at 0x1007ad390>
import 'weakref' # <_frozen_importlib_external.SourceFileLoader object at 0x100791160>
import 'pkgutil' # <_frozen_importlib_external.SourceFileLoader object at 0x1007480f0>
import 'runpy' # <_frozen_importlib_external.SourceFileLoader object at 0x1006f1400>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/pydoc.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/pydoc.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/pydoc.cpython-37.pyc'
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/inspect.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/inspect.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/inspect.cpython-37.pyc'
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/dis.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/dis.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/dis.cpython-37.pyc'
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/opcode.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/opcode.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/opcode.cpython-37.pyc'
# extension module '_opcode' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_opcode.cpython-37m-darwin.so'
# extension module '_opcode' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_opcode.cpython-37m-darwin.so'
import '_opcode' # <_frozen_importlib_external.ExtensionFileLoader object at 0x10081ca20>
import 'opcode' # <_frozen_importlib_external.SourceFileLoader object at 0x10081c2e8>
import 'dis' # <_frozen_importlib_external.SourceFileLoader object at 0x10080f0f0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/collections/__pycache__/abc.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/collections/abc.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/collections/__pycache__/abc.cpython-37.pyc'
import 'collections.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x100824a58>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/enum.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/enum.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/enum.cpython-37.pyc'
import 'enum' # <_frozen_importlib_external.SourceFileLoader object at 0x100824a90>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/linecache.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/linecache.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/linecache.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/tokenize.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/tokenize.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/tokenize.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/re.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/re.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/re.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/sre_compile.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/sre_compile.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/sre_compile.cpython-37.pyc'
import '_sre' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/sre_parse.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/sre_parse.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/sre_parse.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/sre_constants.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/sre_constants.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/sre_constants.cpython-37.pyc'
import 'sre_constants' # <_frozen_importlib_external.SourceFileLoader object at 0x10085edd8>
import 'sre_parse' # <_frozen_importlib_external.SourceFileLoader object at 0x1008575f8>
import 'sre_compile' # <_frozen_importlib_external.SourceFileLoader object at 0x100846f98>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/copyreg.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/copyreg.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/copyreg.cpython-37.pyc'
import 'copyreg' # <_frozen_importlib_external.SourceFileLoader object at 0x1008742e8>
import 're' # <_frozen_importlib_external.SourceFileLoader object at 0x1008460f0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/token.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/token.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/token.cpython-37.pyc'
import 'token' # <_frozen_importlib_external.SourceFileLoader object at 0x1008745f8>
import 'tokenize' # <_frozen_importlib_external.SourceFileLoader object at 0x100826ba8>
import 'linecache' # <_frozen_importlib_external.SourceFileLoader object at 0x10081cbe0>
import 'inspect' # <_frozen_importlib_external.SourceFileLoader object at 0x1007e9780>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/platform.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/platform.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/platform.cpython-37.pyc'
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/subprocess.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/subprocess.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/subprocess.cpython-37.pyc'
import 'time' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/signal.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/signal.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/signal.cpython-37.pyc'
import 'signal' # <_frozen_importlib_external.SourceFileLoader object at 0x1008a9080>
import 'errno' # <class '_frozen_importlib.BuiltinImporter'>
# extension module '_posixsubprocess' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-darwin.so'
# extension module '_posixsubprocess' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-darwin.so'
import '_posixsubprocess' # <_frozen_importlib_external.ExtensionFileLoader object at 0x1008b2550>
# extension module 'select' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/select.cpython-37m-darwin.so'
# extension module 'select' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/select.cpython-37m-darwin.so'
import 'select' # <_frozen_importlib_external.ExtensionFileLoader object at 0x1008b25c0>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/selectors.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/selectors.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/selectors.cpython-37.pyc'
# extension module 'math' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/math.cpython-37m-darwin.so'
# extension module 'math' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/math.cpython-37m-darwin.so'
import 'math' # <_frozen_importlib_external.ExtensionFileLoader object at 0x100918160>
import 'selectors' # <_frozen_importlib_external.SourceFileLoader object at 0x1008b2940>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/threading.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/threading.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/threading.cpython-37.pyc'
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/traceback.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/traceback.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/traceback.cpython-37.pyc'
import 'traceback' # <_frozen_importlib_external.SourceFileLoader object at 0x100930240>
import 'threading' # <_frozen_importlib_external.SourceFileLoader object at 0x1008ba940>
import 'subprocess' # <_frozen_importlib_external.SourceFileLoader object at 0x100894e80>
import 'platform' # <_frozen_importlib_external.SourceFileLoader object at 0x100808208>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/urllib/__pycache__/__init__.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/urllib/__init__.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/urllib/__pycache__/__init__.cpython-37.pyc'
import 'urllib' # <_frozen_importlib_external.SourceFileLoader object at 0x1008a02e8>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/urllib/__pycache__/parse.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/urllib/parse.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/urllib/__pycache__/parse.cpython-37.pyc'
import 'urllib.parse' # <_frozen_importlib_external.SourceFileLoader object at 0x1008a0240>
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/getopt.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/getopt.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/getopt.cpython-37.pyc'
# /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/gettext.cpython-37.pyc matches /usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/gettext.py
# code object from '/usr/local/pythonz/pythons/CPython-3.7.0b3/lib/python3.7/__pycache__/gettext.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/locale.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/locale.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/locale.cpython-37.pyc'
import 'locale' # <_frozen_importlib_external.SourceFileLoader object at 0x100971a20>
import 'gettext' # <_frozen_importlib_external.SourceFileLoader object at 0x100952da0>
import 'getopt' # <_frozen_importlib_external.SourceFileLoader object at 0x1009527f0>
# possible namespace for ./coverage
# possible namespace for /Users/ned/coverage
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/__init__.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__init__.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/__init__.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/version.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/version.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/version.cpython-37.pyc'
import 'coverage.version' # <_frozen_importlib_external.SourceFileLoader object at 0x1009a0748>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/control.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/control.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/control.cpython-37.pyc'
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/env.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/env.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/env.cpython-37.pyc'
import 'coverage.env' # <_frozen_importlib_external.SourceFileLoader object at 0x100a6b4a8>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/annotate.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/annotate.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/annotate.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/files.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/files.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/files.cpython-37.pyc'
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/hashlib.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/hashlib.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/hashlib.cpython-37.pyc'
# extension module '_hashlib' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_hashlib.cpython-37m-darwin.so'
# extension module '_hashlib' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_hashlib.cpython-37m-darwin.so'
import '_hashlib' # <_frozen_importlib_external.ExtensionFileLoader object at 0x100a7a6a0>
# extension module '_blake2' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_blake2.cpython-37m-darwin.so'
# extension module '_blake2' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_blake2.cpython-37m-darwin.so'
import '_blake2' # <_frozen_importlib_external.ExtensionFileLoader object at 0x100a7ada0>
# extension module '_sha3' loaded from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_sha3.cpython-37m-darwin.so'
# extension module '_sha3' executed from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/lib-dynload/_sha3.cpython-37m-darwin.so'
import '_sha3' # <_frozen_importlib_external.ExtensionFileLoader object at 0x100a7aeb8>
import 'hashlib' # <_frozen_importlib_external.SourceFileLoader object at 0x100a75b70>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/fnmatch.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/fnmatch.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/fnmatch.cpython-37.pyc'
import 'fnmatch' # <_frozen_importlib_external.SourceFileLoader object at 0x100a7a080>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/ntpath.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/ntpath.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/__pycache__/ntpath.cpython-37.pyc'
import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at 0x100a800f0>
# /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/backward.cpython-37.pyc matches /usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/backward.py
# code object from '/usr/local/virtualenvs/tmp-95cdcd5f6881b25d/lib/python3.7/site-packages/coverage/__pycache__/backward.cpython-37.pyc'
problem in coverage - ModuleNotFoundError: No module named 'configparser'

# destroy coverage.backward
# destroy coverage.files
# destroy coverage.annotate
# destroy coverage.control
# destroy coverage
# clear builtins._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.__interactivehook__
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup[2] removing sys
# cleanup[2] removing builtins
# cleanup[2] removing _frozen_importlib
# cleanup[2] removing _imp
# cleanup[2] removing _thread
# cleanup[2] removing _warnings
# cleanup[2] removing _weakref
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing _io
# cleanup[2] removing marshal
# cleanup[2] removing posix
# cleanup[2] removing zipimport
# cleanup[2] removing encodings
# cleanup[2] removing codecs
# cleanup[2] removing _codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing _signal
# cleanup[2] removing __main__
# destroy __main__
# cleanup[2] removing encodings.latin_1
# cleanup[2] removing io
# cleanup[2] removing abc
# cleanup[2] removing _abc
# cleanup[2] removing site
# destroy site
# cleanup[2] removing os
# cleanup[2] removing stat
# cleanup[2] removing _stat
# cleanup[2] removing posixpath
# cleanup[2] removing genericpath
# cleanup[2] removing os.path
# cleanup[2] removing _collections_abc
# cleanup[2] removing _bootlocale
# destroy _bootlocale
# cleanup[2] removing _locale
# cleanup[2] removing runpy
# destroy runpy
# cleanup[2] removing importlib
# cleanup[2] removing importlib._bootstrap
# cleanup[2] removing importlib._bootstrap_external
# cleanup[2] removing types
# cleanup[2] removing warnings
# cleanup[2] removing importlib.machinery
# cleanup[2] removing importlib.util
# cleanup[2] removing importlib.abc
# cleanup[2] removing contextlib
# destroy contextlib
# cleanup[2] removing collections
# cleanup[2] removing operator
# destroy operator
# cleanup[2] removing _operator
# cleanup[2] removing keyword
# destroy keyword
# cleanup[2] removing heapq
# cleanup[2] removing _heapq
# cleanup[2] removing itertools
# cleanup[2] removing reprlib
# destroy reprlib
# cleanup[2] removing _collections
# cleanup[2] removing functools
# cleanup[2] removing _functools
# cleanup[2] removing pkgutil
# cleanup[2] removing weakref
# destroy weakref
# cleanup[2] removing _weakrefset
# destroy _weakrefset
# cleanup[2] removing inspect
# cleanup[2] removing dis
# cleanup[2] removing opcode
# destroy opcode
# cleanup[2] removing _opcode
# cleanup[2] removing collections.abc
# cleanup[2] removing enum
# cleanup[2] removing linecache
# cleanup[2] removing tokenize
# cleanup[2] removing re
# cleanup[2] removing sre_compile
# cleanup[2] removing _sre
# cleanup[2] removing sre_parse
# cleanup[2] removing sre_constants
# destroy sre_constants
# cleanup[2] removing copyreg
# cleanup[2] removing token
# cleanup[2] removing platform
# cleanup[2] removing subprocess
# cleanup[2] removing time
# cleanup[2] removing signal
# cleanup[2] removing errno
# cleanup[2] removing _posixsubprocess
# cleanup[2] removing select
# cleanup[2] removing selectors
# cleanup[2] removing math
# cleanup[2] removing threading
# cleanup[2] removing traceback
# destroy traceback
# cleanup[2] removing urllib
# cleanup[2] removing urllib.parse
# cleanup[2] removing getopt
# destroy getopt
# cleanup[2] removing gettext
# destroy gettext
# cleanup[2] removing locale
# cleanup[2] removing coverage.version
# destroy coverage.version
# cleanup[2] removing atexit
# cleanup[2] removing coverage.env
# destroy coverage.env
# cleanup[2] removing hashlib
# destroy hashlib
# cleanup[2] removing _hashlib
# cleanup[2] removing _blake2
# cleanup[2] removing _sha3
# cleanup[2] removing fnmatch
# destroy fnmatch
# cleanup[2] removing ntpath
# destroy ntpath
# destroy _sha3
# destroy _blake2
# destroy inspect
# destroy pkgutil
# destroy platform
# destroy urllib
# destroy urllib.parse
# destroy importlib.util
# destroy importlib.abc
# destroy importlib.machinery
# destroy zipimport
# destroy dis
# destroy importlib
# destroy token
# destroy types
# destroy _opcode
# destroy subprocess
# destroy io
# destroy signal
# destroy warnings
# destroy errno
# destroy selectors
# destroy threading
# destroy _signal
# destroy _posixsubprocess
# destroy math
# destroy select
# destroy locale
# destroy encodings
# destroy atexit
# destroy _hashlib
# cleanup[3] wiping _frozen_importlib
# destroy _frozen_importlib_external
# cleanup[3] wiping _imp
# cleanup[3] wiping _thread
# cleanup[3] wiping _warnings
# cleanup[3] wiping _weakref
# cleanup[3] wiping _io
# cleanup[3] wiping marshal
# cleanup[3] wiping posix
# cleanup[3] wiping codecs
# cleanup[3] wiping _codecs
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings.latin_1
# cleanup[3] wiping abc
# cleanup[3] wiping _abc
# cleanup[3] wiping os
# destroy abc
# destroy posixpath
# cleanup[3] wiping stat
# cleanup[3] wiping _stat
# destroy _stat
# cleanup[3] wiping genericpath
# cleanup[3] wiping _collections_abc
# cleanup[3] wiping _locale
# cleanup[3] wiping importlib._bootstrap
# cleanup[3] wiping collections
# destroy _collections_abc
# destroy heapq
# destroy collections.abc
# cleanup[3] wiping _operator
# destroy _operator
# cleanup[3] wiping _heapq
# cleanup[3] wiping itertools
# cleanup[3] wiping _collections
# destroy _collections
# cleanup[3] wiping functools
# destroy _abc
# cleanup[3] wiping _functools
# destroy _functools
# cleanup[3] wiping enum
# cleanup[3] wiping linecache
# destroy tokenize
# cleanup[3] wiping re
# destroy _locale
# destroy enum
# destroy sre_compile
# destroy functools
# destroy copyreg
# cleanup[3] wiping _sre
# cleanup[3] wiping sre_parse
# cleanup[3] wiping time
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
# destroy stat
# destroy genericpath
# destroy _heapq
# destroy re
# destroy _sre
# destroy sre_parse
$
msg314689 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2018-03-30 16:09
Turns out it's even simpler:

$ pydoc itertools
No module named 'ast'

# !!!
msg314690 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2018-03-30 16:12
Oh, sorry, I forgot that import attempts aren't shown until -vv
msg314696 - (view) Author: Geoffrey Spear (geoffreyspear) * Date: 2018-03-30 16:43
This behavior seems to have been introduced in commit ee3784594b33c72c3fdca6a71892d22f14045ab6
msg314759 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-04-01 04:46
I guess this confirms our suspicion from issue 33053 that making "-m" no longer track the current working directory had the potential to pose some non-trivial compatibility risks :(

I can reproduce the issue in a 3.7 checkout without a virtual environment:

```
$ ./python -m pydoc itertools
No module named 'ast'
```

There's an odd discrepancy between the behaviour when running pydoc and the behaviour when running runpy, though:

```
$ ./python -im runpy
No module specified for execution
>>> import sys; print(len(sys.path)); print(sys.path)
5
['/home/ncoghlan/devel/py37', '/usr/local/lib/python37.zip', '/home/ncoghlan/devel/py37/Lib', '/home/ncoghlan/devel/py37/build/lib.linux-x86_64-3.7', '/home/ncoghlan/.local/lib/python3.7/site-packages']
>>>

$ ./python -im pydoc itertools
No module named 'ast'

>>> import sys; print(len(sys.path)); print(sys.path)
5
['.', '/home/ncoghlan/devel/py37', '/usr/local/lib/python37.zip', '/home/ncoghlan/devel/py37/build/lib.linux-x86_64-3.7', '/home/ncoghlan/.local/lib/python3.7/site-packages']
>>>
```

The path in the `runpy` case is correct, while the path in the `pydoc` case is missing the expected `Lib` directory (and hence can't import standard library modules), and has had a `.` inserted at the start of `sys.path`.
msg314760 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-04-01 05:25
It turns out pydoc's CLI is looking specifically for '' in sys.path, but *not* looking for "os.getcwd()".

The resulting sys.path manipulation then goes completely wrong for "python -m pydoc", since it ends up removing "scriptdir" from sys.path, and that's the directory containing "pydoc" and the rest of the standard library.

It surprised me that you were getting the misbehaviour for the direct pydoc command though, as for me, that's a separate script living in `*/bin`, so the misbehaviour doesn't happen (only the bin directory gets removed from sys.path, which is the desired behaviour).

It turns out that behaviour is due to a difference between venv and virtualenv, where the latter defines a shell alias to hide the filesystem level pydoc scripts installed system wide:

```
$ which pydoc                                                                                                                                       
pydoc ()                                                                                                                                                                                                
{                                                                                                                                                                                                       
    python -m pydoc "$@"                                                                                                                                                                                
}
```

and hence will encounter the problem.

So I think there are two changes needed here:

1. Update pydoc.cli() to search sys.path for "os.getcwd()" in addition to searching for the empty string.
2. Rewording the note in the porting guide to explicitly call out checks for "'' in sys.path" in start-up code as potentially requiring updates
msg315318 - (view) Author: miss-islington (miss-islington) Date: 2018-04-15 12:17
New changeset d7ffa5820733a528d9ab87ee567738e2d3fd7126 by Miss Islington (bot) in branch '3.7':
bpo-33185: Fix regression in pydoc CLI sys.path handling (GH-6419)
https://github.com/python/cpython/commit/d7ffa5820733a528d9ab87ee567738e2d3fd7126
msg315320 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-04-15 13:32
New changeset 1a5c4bdb6ecc6a8b19ff33bde323ab188ed60977 by Nick Coghlan in branch 'master':
bpo-33185: Improve wording and markup (GH-6477)
https://github.com/python/cpython/commit/1a5c4bdb6ecc6a8b19ff33bde323ab188ed60977
msg315322 - (view) Author: miss-islington (miss-islington) Date: 2018-04-15 13:55
New changeset 986eaa86da7ebac4c71a09db88706eea6d89664c by Miss Islington (bot) in branch '3.7':
bpo-33185: Improve wording and markup (GH-6477)
https://github.com/python/cpython/commit/986eaa86da7ebac4c71a09db88706eea6d89664c
msg315323 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-04-15 14:01
Thanks, Nick!
History
Date User Action Args
2022-04-11 14:58:59adminsetgithub: 77366
2018-04-15 14:01:44ned.deilysetpriority: release blocker ->

messages: + msg315323
2018-04-15 13:58:10ncoghlansetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-04-15 13:55:12miss-islingtonsetmessages: + msg315322
2018-04-15 13:33:24miss-islingtonsetpull_requests: + pull_request6178
2018-04-15 13:32:12ncoghlansetmessages: + msg315320
2018-04-15 12:46:35ncoghlansetpull_requests: + pull_request6177
2018-04-15 12:17:18miss-islingtonsetnosy: + miss-islington
messages: + msg315318
2018-04-15 11:53:27miss-islingtonsetstage: commit review -> patch review
pull_requests: + pull_request6176
2018-04-08 13:02:04ncoghlansetstage: patch review -> commit review
2018-04-08 12:56:26ncoghlansetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request6122
2018-04-06 23:34:35ned.deilysetpriority: critical -> release blocker
stage: needs patch
2018-04-01 05:25:14ncoghlansetassignee: ncoghlan
messages: + msg314760
2018-04-01 04:46:01ncoghlansetmessages: + msg314759
2018-03-30 16:54:41ned.deilysetpriority: normal -> critical
nosy: + ned.deily
2018-03-30 16:43:24geoffreyspearsetnosy: + ncoghlan, geoffreyspear
messages: + msg314696
2018-03-30 16:12:36nedbatsetmessages: + msg314690
2018-03-30 16:09:12nedbatsetmessages: + msg314689
2018-03-30 15:51:57nedbatcreate