I have installed poezio, when executing it (with Python 3.6) the following error occurs: % poezio Traceback (most recent call last): File "/usr/lib/python-exec/python3.6/poezio", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module> @_call_aside File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside f(*args, **kwargs) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master ws.require(__requires__) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by aiodns dev-python/typing-extensions is installed with python_targets_python3_6.
Hi gerion, is this poezio 9999 or 0.12?
poezio-0.12
Sorry, could you please double check that you surely are using Python 3.6? "Typing" should just be there in 3.6. I read in Poezio changelog that 0.12 had an issue under Python 3.5.
Thanks that you try to solve the problem. I have double checked. Below is some log output that shows that this is definitely Python 3.6: ``` % poezio Traceback (most recent call last): File "/usr/lib/python-exec/python3.6/poezio", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module> @_call_aside File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside f(*args, **kwargs) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master ws.require(__requires__) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by aiodns % python Python 3.6.5 (default, May 16 2018, 11:13:27) [GCC 6.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> exit() % python3.6 /usr/lib/python-exec/python3.6/poezio Traceback (most recent call last): File "/usr/lib/python-exec/python3.6/poezio", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module> @_call_aside File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside f(*args, **kwargs) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master ws.require(__requires__) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by aiodns % eselect python list Available Python interpreters, in order of preference: [1] python3.6 [2] python2.7 (fallback) ``` A strange thing is that I can import typing and aiodns without problems from Python directly. ``` % python3.6 Python 3.6.5 (default, May 16 2018, 11:13:27) [GCC 6.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import aiodns >>> import typing >>> exit() ``` I can make some debugging if you have an idea where this behavior comes from. I'm not really sure how the python-exec wrapper works and how to reproduce the error directly (without python-exec). In the Python console the error is reproducible (with python-exec): ``` % python Python 3.6.5 (default, May 16 2018, 11:13:27) [GCC 6.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> __requires__ = 'poezio==0.12' >>> from pkg_resources import load_entry_point Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module> @_call_aside File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside f(*args, **kwargs) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master ws.require(__requires__) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by aiodns ```
Ok, after some debugging, this seems to be a problem of aiodns packaging aiodns installs an egg-info/requires.txt with this content: ``` pycares>=3.0.0 [:python_version < "3.7"] typing ``` Therefore the pkg_resources seems to search a distribution (aka third party package) of typing for Python3.6. Since typing is build-in there, the distribution is not found. I have no idea, however, how the requires egg-info is created, so why the 3.7 is mentioned there.
Ok, this results from the upstream setup.py: https://github.com/saghul/aiodns/blob/master/setup.py#L22
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ba2f99e7ba7298091d0cf557bed7d3115535ffd commit 5ba2f99e7ba7298091d0cf557bed7d3115535ffd Author: Gerion Entrup <gerion.entrup@flump.de> AuthorDate: 2019-10-17 12:09:24 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-10-18 06:40:31 +0000 dev-python/aiodns: use correct typing distribution With the Gentoo startfiles for Python the typing distribution for Python 3.6 and Python 3.7 is searched as external library and not as part of the standard library. Backport fix from https://github.com/saghul/aiodns/commit/281112107c742a3e24e8bce2cb09c3c4d9d01b6d Closes: https://github.com/gentoo/gentoo/pull/13324 Closes: https://bugs.gentoo.org/692720 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Gerion Entrup <gerion.entrup@flump.de> Signed-off-by: Zac Medico <zmedico@gentoo.org> dev-python/aiodns/{aiodns-2.0.0.ebuild => aiodns-2.0.0-r1.ebuild} | 7 +++++++ 1 file changed, 7 insertions(+)
*** Bug 691068 has been marked as a duplicate of this bug. ***