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

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

    <bug>
          <bug_id>50120</bug_id>
          
          <creation_ts>2024-04-22 19:41:31 +0300</creation_ts>
          <short_desc>missing runtime dependency on requests</short_desc>
          <delta_ts>2024-04-22 20:46:05 +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-pooch</component>
          <version>unstable</version>
          <rep_platform>x86_64</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>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stanislav Levin">slev</reporter>
          <assigned_to name="Yuri N. Sedunov">aris</assigned_to>
          <cc>aris</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>245167</commentid>
    <comment_count>0</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2024-04-22 19:41:31 +0300</bug_when>
    <thetext>```console
[user@host dir]$ python3 -c &quot;import pooch; pooch.retrieve(&apos;https://raw.githubusercontent.com/scipy/dataset-ascent/main/ascent.dat&apos;, known_hash=&apos;03ce124c1afc880f87b55f6b061110e2e1e939679184f5614e38dacc6c1957e2&apos;)&quot;
```

Actual result:
```
Downloading data from &apos;https://raw.githubusercontent.com/scipy/dataset-ascent/main/ascent.dat&apos; to file &apos;/usr/src/.cache/pooch/a054439914b0bb9423fcdf06445c6c08-ascent.dat&apos;.
Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib/python3/site-packages/pooch/core.py&quot;, line 239, in retrieve
    stream_download(url, full_path, known_hash, downloader, pooch=None)
  File &quot;/usr/lib/python3/site-packages/pooch/core.py&quot;, line 794, in stream_download
    import requests.exceptions  # pylint: disable=C0415
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named &apos;requests&apos;
```

Expected result:
dowloaded data file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>245168</commentid>
    <comment_count>1</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2024-04-22 19:46:29 +0300</bug_when>
    <thetext>(Ответ для Stanislav Levin на комментарий #0)
...
&gt;   File &quot;/usr/lib/python3/site-packages/pooch/core.py&quot;, line 794, in
&gt; stream_download
&gt;     import requests.exceptions  # pylint: disable=C0415
                                  ^^^^^^^^^^^^^^^^^^^^^^^ 
Это надо вешать на rpm-build-python3, который, видимо, не справляется с комментарием в конце строки.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>245169</commentid>
    <comment_count>2</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2024-04-22 20:07:18 +0300</bug_when>
    <thetext>Это не так, импорт вложенный, поэтому в slight:
[user@host python3-module-pooch]$ RPM_PYTHON3_IMPORT_PATH=$(pwd) RPM_BUILD_ROOT=$(pwd) RPM_PYTHON3_REQ_METHOD=slight /usr/lib/rpm/python3.req pooch/pooch/downloaders.py 2&gt;&amp;1 | grep requests
py3req:pooch/pooch/downloaders.py: &quot;requests&quot; lines:[[[195]], [632], [[[790]]], [[[955]]], [[1074]]]: Ignore for REQ:slight

и в strict:
[user@host python3-module-pooch]$ RPM_PYTHON3_IMPORT_PATH=$(pwd) RPM_BUILD_ROOT=$(pwd) RPM_PYTHON3_REQ_METHOD=strict /usr/lib/rpm/python3.req pooch/pooch/downloaders.py 2&gt;&amp;1 | grep requests
python3(requests)

Это же можно видеть и в логе сборке в сизиф:
https://git.altlinux.org/tasks/archive/done/_333/341168/build/100/x86_64/log

[00:00:05] py3req:/usr/src/tmp/python3-module-pooch-buildroot/usr/lib/python3/site-packages/pooch/core.py: &quot;requests.exceptions&quot; lines:[[794]]: Ignore for REQ:slight

...

[00:00:05] py3req:/usr/src/tmp/python3-module-pooch-buildroot/usr/lib/python3/site-packages/pooch/downloaders.py: &quot;requests&quot; lines:[[[197]], [640], [[[798]]], [[[964]]], [[1084]]]: Ignore for REQ:slight</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>245172</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-04-22 20:46:05 +0300</bug_when>
    <thetext>python3-module-pooch-1.8.1-alt1.1 -&gt; sisyphus:

 Mon Apr 22 2024 Yuri N. Sedunov &lt;aris@altlinux&gt; 1.8.1-alt1.1
 - rebuilt with python3_req_method=strict (ALT #50120)
 - split tests to separate subpackage</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>