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

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

    <bug>
          <bug_id>43544</bug_id>
          
          <creation_ts>2022-08-16 17:29:12 +0300</creation_ts>
          <short_desc>Некорректные import зависимости для __import__</short_desc>
          <delta_ts>2022-08-16 17:38:20 +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>rpm-build-python3</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="kotopesutility@altlinux.org">kotopesutility</assigned_to>
          <cc>darktemplar</cc>
    
    <cc>george</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>kotopesutility</cc>
    
    <cc>ldv</cc>
    
    <cc>slev</cc>
    
    <cc>vitty</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>213766</commentid>
    <comment_count>0</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2022-08-16 17:29:12 +0300</bug_when>
    <thetext>На вход python3.req.py даем:
```
[user@host dir]$ cat foo.py
uiModule = __import__(&apos;pywikibot.userinterfaces.%s_interface&apos;
                      % config.userinterface,
                      fromlist=[&apos;UI&apos;])
module = __import__(&apos;%s&apos; % module_name)
```
На выходе получаем:
python3(%s)
python3(pywikibot.userinterfaces.%s_interface)

Немного диагностики:
```
(Pdb) bt
  /usr/lib/rpm/python3.req.py(249)&lt;module&gt;()
-&gt; dependencies, relative_dependencies = read_ast_tree(code, file_name, REQ)
&gt; /usr/lib/rpm/python3.req.py(68)read_ast_tree()
-&gt; relative_dep.add(chuck_norris.args[0].left.value)
(Pdb) type(chuck_norris.args[0])
&lt;class &apos;ast.BinOp&apos;&gt;
(Pdb) type(chuck_norris.args[0].left.value) != ast.Attribute
True
(Pdb) type(chuck_norris.args[0].left.value)
&lt;class &apos;str&apos;&gt;
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213767</commentid>
    <comment_count>1</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2022-08-16 17:36:30 +0300</bug_when>
    <thetext>Daniel Zagaynov (kotopesutility@),
вы собираете rpm-build-python3 0.1.20-alt1 с неизвестными исправлениями парсера (было бы здорово завести трэкер, чтобы понимать что именно фиксится). Есть ли желание посмотреть эту проблему? если нет, то могу попробовать поправить (спрашиваю, чтобы избежать пересечения по фиксам и недопонимания).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>