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

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

    <bug>
          <bug_id>52318</bug_id>
          
          <creation_ts>2024-12-02 13:24:20 +0300</creation_ts>
          <short_desc>requests.exceptions.InvalidURL: Not supported URL scheme http+unix</short_desc>
          <delta_ts>2024-12-02 13:42:14 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Branch p10</product>
          <component>python3-module-requests-unixsocket</component>
          <version>не указана</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</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="Vladislav Glinkin">glinkinvd</reporter>
          <assigned_to name="Stanislav Levin">slev</assigned_to>
          
          
          <qa_contact name="qa-p10@altlinux.org">qa-p10</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>255394</commentid>
    <comment_count>0</comment_count>
    <who name="Vladislav Glinkin">glinkinvd</who>
    <bug_when>2024-12-02 13:24:20 +0300</bug_when>
    <thetext>Воспроизводится независимо от дистрибутива.

Версия:
python3-module-requests-unixsocket-0.1.5-alt5.noarch

Шаги воспроизведения:
1) # apt-get install docker-engine docker-cli python3-module-requests-unixsocket python3-module-requests &amp;&amp; systemctl start docker.service
2) # cat &gt; test.py &lt;&lt; EOF

import json

import requests_unixsocket

session = requests_unixsocket.Session()

r = session.get(&apos;http+unix://%2Fvar%2Frun%2Fdocker.sock/info&apos;)
registry_config = r.json()[&apos;RegistryConfig&apos;]
print(json.dumps(registry_config, indent=4))

EOF
3) # python3 test.py

Фактический результат:
requests.exceptions.InvalidURL: Not supported URL scheme http+unix

Ожидаемый результат:
{
    &quot;AllowNondistributableArtifactsCIDRs&quot;: null,
    &quot;AllowNondistributableArtifactsHostnames&quot;: null,
    &quot;InsecureRegistryCIDRs&quot;: [
        &quot;127.0.0.0/8&quot;
    ],
    &quot;IndexConfigs&quot;: {
        &quot;docker.io&quot;: {
            &quot;Name&quot;: &quot;docker.io&quot;,
            &quot;Mirrors&quot;: [],
            &quot;Secure&quot;: true,
            &quot;Official&quot;: true
        }
    },
    &quot;Mirrors&quot;: null
}

Дополнительно:
Судя по-всему пакет мёртв. В sisyphus используется другой - python3-module-requests-unixsocket2-0.4.2-alt1.noarch, с ним всё работает.
В p10 заработало после установки:
# pip install requests-unixsocket2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255395</commentid>
    <comment_count>1</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2024-12-02 13:35:09 +0300</bug_when>
    <thetext>https://github.com/msabramo/requests-unixsocket/issues/73

апстрим мертв и, судя по всему, никто не будет это чинить.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255396</commentid>
    <comment_count>2</comment_count>
    <who name="Vladislav Glinkin">glinkinvd</who>
    <bug_when>2024-12-02 13:36:16 +0300</bug_when>
    <thetext>(Ответ для Stanislav Levin на комментарий #1)
&gt; https://github.com/msabramo/requests-unixsocket/issues/73
&gt; 
&gt; апстрим мертв и, судя по всему, никто не будет это чинить.

Извиняюсь, перепутал версии пакетов.
Данная ошибка найдена в сборочном задании 363434, что является регрессом
С текущей версией в p10, собранной в таске sisyphus+275993.100.1.2 - не воспроизводится.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255397</commentid>
    <comment_count>3</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2024-12-02 13:42:14 +0300</bug_when>
    <thetext>requests-unixsocket2 - это drop-in замена requests-unixsocket с поддержкой нового requests (более свежая версия которого закрывает уязвимости в p10). То есть можно удалить requests-unixsocket и скопировать из сизифа requests-unixsocket2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>