<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>36270</bug_id>
          
          <creation_ts>2019-03-13 04:24:57 +0300</creation_ts>
          <short_desc>aiohttp.* are not importable</short_desc>
          <delta_ts>2019-03-13 22:12:11 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>python3-module-aiohttp</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Stanislav Levin">slev</assigned_to>
          <cc>iv</cc>
    
    <cc>ldv</cc>
    
    <cc>slev</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>179400</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-03-13 04:24:57 +0300</bug_when>
    <thetext>First, look at https://lists.altlinux.org/pipermail/sisyphus-incominger/2019-March/522412.html :

	x86_64: NEW unmet dependencies detected:
python3-module-aiocouchdb#0.9.1-alt1	python3(aiohttp.errors) &lt; 0
python3-module-aiocouchdb#0.9.1-alt1	python3(aiohttp.multidict) &lt; 0

But they cannot be provided in Sisyphus even if we wanted to, because aiohttp.* are not importable due to cchardet:

[imz@team ~]$ hsh-install ~/hasher/ python3-module-aiohttp
[imz@team python-module-aiohttp.git]$ hsh-run --mount=/proc,/dev/pts ~/hasher/ -- python3 -c &apos;import aiohttp.multidict&apos;
Traceback (most recent call last):
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 25, in &lt;module&gt;
    import cchardet as chardet
ModuleNotFoundError: No module named &apos;cchardet&apos;

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib64/python3/site-packages/aiohttp/__init__.py&quot;, line 6, in &lt;module&gt;
    from .client import *  # noqa
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client.py&quot;, line 15, in &lt;module&gt;
    from . import connector as connector_mod
  File &quot;/usr/lib64/python3/site-packages/aiohttp/connector.py&quot;, line 18, in &lt;module&gt;
    from .client_reqrep import ClientRequest
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 27, in &lt;module&gt;
    import chardet
ModuleNotFoundError: No module named &apos;chardet&apos;
[imz@team python-module-aiohttp.git]$ hsh-run --mount=/proc,/dev/pts ~/hasher/ -- python3 -c &apos;import aiohttp.errors&apos;
Traceback (most recent call last):
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 25, in &lt;module&gt;
    import cchardet as chardet
ModuleNotFoundError: No module named &apos;cchardet&apos;

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib64/python3/site-packages/aiohttp/__init__.py&quot;, line 6, in &lt;module&gt;
    from .client import *  # noqa
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client.py&quot;, line 15, in &lt;module&gt;
    from . import connector as connector_mod
  File &quot;/usr/lib64/python3/site-packages/aiohttp/connector.py&quot;, line 18, in &lt;module&gt;
    from .client_reqrep import ClientRequest
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 27, in &lt;module&gt;
    import chardet
ModuleNotFoundError: No module named &apos;chardet&apos;
[imz@team python-module-aiohttp.git]$ hsh-run --mount=/proc,/dev/pts ~/hasher/ -- python3 -c &apos;import aiohttp&apos;
Traceback (most recent call last):
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 25, in &lt;module&gt;
    import cchardet as chardet
ModuleNotFoundError: No module named &apos;cchardet&apos;

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib64/python3/site-packages/aiohttp/__init__.py&quot;, line 6, in &lt;module&gt;
    from .client import *  # noqa
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client.py&quot;, line 15, in &lt;module&gt;
    from . import connector as connector_mod
  File &quot;/usr/lib64/python3/site-packages/aiohttp/connector.py&quot;, line 18, in &lt;module&gt;
    from .client_reqrep import ClientRequest
  File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 27, in &lt;module&gt;
    import chardet
ModuleNotFoundError: No module named &apos;chardet&apos;

Deleting these two packages would mean also deleting recursively:

$ join /beehive/stats/Sisyphus-x86_64/ufb-2 -1 2 - -o 1.1 &lt;&lt;&lt;python3-module-aiohttp
python-module-aio2gis
python-module-aiohttp_jinja2
python-module-aioxmlrpc
python-module-grapy
python-module-motor
python-module-pytest-aiohttp
$ 

and further transitively via ufb. (I don&apos;t how many packages would be in the final list.)

I think it&apos;s OK to delete them because they don&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179404</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2019-03-13 11:43:13 +0300</bug_when>
    <thetext>&gt; ModuleNotFoundError: No module named &apos;cchardet&apos;

`ccharted` is only mentioned in client_reqrep.py in the following construct:

try:
    import cchardet as chardet
except ImportError:  # pragma: no cover
    import chardet

`python.req` usually ignores such constructions, so this package is missing dependency on python3(chardet). If you install pythno3-module-chardet in your hasher, aiohttp kind of works. This dependency should, of course, be added.

`aiohttp.multidit` is another story -- there is no such submodule in python3-module-aiohttp-2.2.5-alt1.1.1, nor in upstream master (https://github.com/aio-libs/aiohttp/tree/master/aiohttp). aiocouchdb requires aiohttp==0.17.4 and apparently won&apos;t work with more recent versions, so it should be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179409</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-03-13 12:47:39 +0300</bug_when>
    <thetext>(In reply to comment #1)
&gt; &gt; ModuleNotFoundError: No module named &apos;cchardet&apos;
&gt; 
&gt; `ccharted` is only mentioned in client_reqrep.py in the following construct:
&gt; 
&gt; try:
&gt;     import cchardet as chardet
&gt; except ImportError:  # pragma: no cover
&gt;     import chardet
&gt; 
&gt; `python.req` usually ignores such constructions, so this package is missing
&gt; dependency on python3(chardet). If you install pythno3-module-chardet in your
&gt; hasher, aiohttp kind of works. This dependency should, of course, be added.

Thank you for your interesting invetsigation!

Another variant of the solution: simplify this code with a patch (remove &quot;try&quot;).

&gt; `aiohttp.multidit` is another story -- there is no such submodule in
&gt; python3-module-aiohttp-2.2.5-alt1.1.1, nor in upstream master
&gt; (https://github.com/aio-libs/aiohttp/tree/master/aiohttp). aiocouchdb requires
&gt; aiohttp==0.17.4 and apparently won&apos;t work with more recent versions, so it
&gt; should be removed.

OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179426</commentid>
    <comment_count>3</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2019-03-13 19:52:26 +0300</bug_when>
    <thetext>[#224917] DONE del=python-module-aiocouchdb

Close as notabug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179427</commentid>
    <comment_count>4</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-03-13 20:36:53 +0300</bug_when>
    <thetext>(In reply to comment #3)
&gt; [#224917] DONE del=python-module-aiocouchdb
&gt; 
&gt; Close as notabug?

No, aiocouchdb was just a trigger for looking at aiohttp.

The problem remains:

(In reply to comment #0)

&gt; aiohttp.*
&gt; are not importable due to cchardet:
&gt; 
&gt; [imz@team ~]$ hsh-install ~/hasher/ python3-module-aiohttp
&gt; [imz@team python-module-aiohttp.git]$ hsh-run --mount=/proc,/dev/pts ~/hasher/
&gt; -- python3 -c &apos;import aiohttp&apos;
&gt; Traceback (most recent call last):
&gt;   File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 25, in
&gt; &lt;module&gt;
&gt;     import cchardet as chardet
&gt; ModuleNotFoundError: No module named &apos;cchardet&apos;
&gt; 
&gt; During handling of the above exception, another exception occurred:
&gt; 
&gt; Traceback (most recent call last):
&gt;   File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
&gt;   File &quot;/usr/lib64/python3/site-packages/aiohttp/__init__.py&quot;, line 6, in
&gt; &lt;module&gt;
&gt;     from .client import *  # noqa
&gt;   File &quot;/usr/lib64/python3/site-packages/aiohttp/client.py&quot;, line 15, in
&gt; &lt;module&gt;
&gt;     from . import connector as connector_mod
&gt;   File &quot;/usr/lib64/python3/site-packages/aiohttp/connector.py&quot;, line 18, in
&gt; &lt;module&gt;
&gt;     from .client_reqrep import ClientRequest
&gt;   File &quot;/usr/lib64/python3/site-packages/aiohttp/client_reqrep.py&quot;, line 27, in
&gt; &lt;module&gt;
&gt;     import chardet
&gt; ModuleNotFoundError: No module named &apos;chardet&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179428</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2019-03-13 22:12:11 +0300</bug_when>
    <thetext>python-module-aiohttp-2.2.5-alt2 -&gt; sisyphus:

Thu Mar 14 2019 Anton Midyukov &lt;antohami@altlinux&gt; 2.2.5-alt2
- Added py3_requires chardet (Closes: 36270)
- Cleanup spec</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>