Hello community,

here is the log from the commit of package python-requests-unixsocket for 
openSUSE:Factory checked in at 2019-09-02 13:20:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-unixsocket (Old)
 and      /work/SRC/openSUSE:Factory/.python-requests-unixsocket.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requests-unixsocket"

Mon Sep  2 13:20:17 2019 rev:3 rq:726706 version:0.2.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-requests-unixsocket/python-requests-unixsocket.changes
    2019-03-29 20:36:18.302565723 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-requests-unixsocket.new.7948/python-requests-unixsocket.changes
  2019-09-02 13:20:19.869366431 +0200
@@ -1,0 +2,11 @@
+Wed Aug 28 08:48:45 UTC 2019 - Marketa Calabkova <mcalabk...@suse.com>
+
+- update to version 0.2.0
+  * Remove support for Python 2.6
+  * Add support for Python 3.6
+  * Add Python 3.7
+  * Close socket on deletion
+  * Allow UnixAdapter to accept max_retries parameter
+  * Many other changes
+
+-------------------------------------------------------------------

Old:
----
  requests-unixsocket-0.1.5.tar.gz

New:
----
  requests-unixsocket-0.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-requests-unixsocket.spec ++++++
--- /var/tmp/diff_new_pack.gLvjN1/_old  2019-09-02 13:20:21.065366247 +0200
+++ /var/tmp/diff_new_pack.gLvjN1/_new  2019-09-02 13:20:21.069366246 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-requests-unixsocket
-Version:        0.1.5
+Version:        0.2.0
 Release:        0
 Summary:        UNIX domain socket backend for python-requests
 License:        Apache-2.0
@@ -57,7 +57,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
py.test-%{$python_bin_suffix} -v requests_unixsocket/tests
+%pytest requests_unixsocket/tests
 
 %files %{python_files}
 %doc AUTHORS ChangeLog README.rst

++++++ requests-unixsocket-0.1.5.tar.gz -> requests-unixsocket-0.2.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/.travis.yml 
new/requests-unixsocket-0.2.0/.travis.yml
--- old/requests-unixsocket-0.1.5/.travis.yml   2016-01-20 15:55:38.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/.travis.yml   2019-08-16 00:13:11.000000000 
+0200
@@ -1,14 +1,22 @@
 language: python
-
-env:
-    - TOXENV=py26
-    - TOXENV=py27
-    - TOXENV=py33
-    - TOXENV=py34
-    - TOXENV=py35
-    - TOXENV=pypy
-    - TOXENV=flake8
-    - TOXENV=coverage
+matrix:
+    include:
+        - python: 2.7
+          sudo: true
+          env: TOXENV=py27
+        - python: 3.4
+          sudo: true
+          env: TOXENV=py34
+        - python: 3.5
+          sudo: true
+          env: TOXENV=py35
+        - python: 3.6
+          sudo: true
+          env: TOXENV=py36
+        - python: 3.7
+          dist: xenial
+          sudo: true
+          env: TOXENV=py37
 
 install:
     - travis_retry pip install tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/AUTHORS 
new/requests-unixsocket-0.2.0/AUTHORS
--- old/requests-unixsocket-0.1.5/AUTHORS       2016-01-20 16:09:49.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/AUTHORS       2019-08-16 00:52:02.000000000 
+0200
@@ -1,6 +1,11 @@
+Aaron Gallagher <_...@habnab.it>
 Ben Jackson <puremourn...@gmail.com>
+David Preece <da...@zedkep.com>
 Esben Haabendal <es...@haabendal.dk>
+Marc Abramowitz <abram...@adobe.com>
 Marc Abramowitz <m...@marc-abramowitz.com>
+Marc Abramowitz <msabr...@gmail.com>
+Ondřej Kobližel <kobliz...@gmail.com>
 Tomaz Solc <tomaz.s...@tablix.org>
 Will Rouesnel <w.roues...@gmail.com>
 William Rouesnel <william.roues...@netregistry.com.au>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/ChangeLog 
new/requests-unixsocket-0.2.0/ChangeLog
--- old/requests-unixsocket-0.1.5/ChangeLog     2016-01-20 16:09:49.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/ChangeLog     2019-08-16 00:52:02.000000000 
+0200
@@ -1,6 +1,44 @@
 CHANGES
 =======
 
+0.2.0
+-----
+
+* .travis.yml: Switch to only matrix.include
+* .travis.yml: Add Python 3.7
+* tox.ini: Test py37
+* examples/docker-info.py: Make executable (#33)
+* Add examples/simple-http.py (#32)
+* Add Makefile (#31)
+* Move examples to separate directory
+* README.rst: Give up on linking to file
+* README.rst: Fix links
+* Example for abstract namespace sockets
+* Vagrantfile: Add socat
+* Vagrantfile: xenial64 and install all Pythons
+* .gitignore: Add .vagrant
+* Vagrantfile: Remove unnecessary comments
+* README.rst: Fix HTTPie link
+* README.rst: See also: httpie-unixsocket
+* README.rst: Make examples use docker.sock
+* Add Vagrantfile
+* Add sample.py
+* test-requirements.txt: Get rid of pytest warnings
+* tox.ini: Add py26 back
+* test-requirements.txt: Remove redundancy
+* .travis.yml: Remove py36
+* Revert ".travis.yml: Try another way"
+* .travis.yml: Try another way
+* Pin test-requirements
+* .travis.yml: Add sudo: false
+* Add support for Python 3.6
+* Remove support for Python 2.6
+* Close socket on deletion
+* Non case sensitive url comparison in tests
+* Pull in more recent code from docker-py
+* Fix PyPI badge
+* Override HTTPAdapter.request_url
+
 0.1.5
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/Makefile 
new/requests-unixsocket-0.2.0/Makefile
--- old/requests-unixsocket-0.1.5/Makefile      1970-01-01 01:00:00.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/Makefile      2019-08-13 22:53:24.000000000 
+0200
@@ -0,0 +1,12 @@
+
+clean:
+       find . -name '*.pyc' -exec rm -f {} +
+       find . -name '*.pyo' -exec rm -f {} +
+       find . -name '*~' -exec rm -f {} +
+       find . -name '__pycache__' -exec rm -rf {} +
+
+test:
+       tox -e py27
+
+test-tox:
+       tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/PKG-INFO 
new/requests-unixsocket-0.2.0/PKG-INFO
--- old/requests-unixsocket-0.1.5/PKG-INFO      2016-01-20 16:09:50.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/PKG-INFO      2019-08-16 00:52:04.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests-unixsocket
-Version: 0.1.5
+Version: 0.2.0
 Summary: Use requests to talk HTTP via a UNIX domain socket
 Home-page: https://github.com/msabramo/requests-unixsocket
 Author: Marc Abramowitz
@@ -9,10 +9,10 @@
 Description: requests-unixsocket
         ===================
         
-        .. image:: 
https://pypip.in/version/requests-unixsocket/badge.svg?style=flat
-            :target: https://pypi.python.org/pypi/requests-unixsocket/
-            :alt: Latest Version
-        
+        .. image:: https://badge.fury.io/py/requests-unixsocket.svg
+            :target: https://badge.fury.io/py/requests-unixsocket
+            :alt: Latest Version on PyPI
+            
         .. image:: 
https://travis-ci.org/msabramo/requests-unixsocket.svg?branch=master
             :target: https://travis-ci.org/msabramo/requests-unixsocket
         
@@ -28,13 +28,16 @@
         
         .. code-block:: python
         
+            import json
+        
             import requests_unixsocket
         
             session = requests_unixsocket.Session()
         
-            # Access /path/to/page from /tmp/profilesvc.sock
-            r = 
session.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
-            assert r.status_code == 200
+            r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
+            registry_config = r.json()['RegistryConfig']
+            print(json.dumps(registry_config, indent=4))
+        
         
         Implicit (monkeypatching)
         +++++++++++++++++++++++++
@@ -54,8 +57,7 @@
         
             requests_unixsocket.monkeypatch()
         
-            # Access /path/to/page from /tmp/profilesvc.sock
-            r = 
requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
+            r = requests.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
             assert r.status_code == 200
         
         or you can do it temporarily using a context manager:
@@ -65,11 +67,36 @@
             import requests_unixsocket
         
             with requests_unixsocket.monkeypatch():
-                # Access /path/to/page from /tmp/profilesvc.sock
-                r = 
requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
+                r = requests.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
                 assert r.status_code == 200
         
         
+        Abstract namespace sockets
+        ++++++++++++++++++++++++++
+        
+        To connect to an `abstract namespace
+        socket 
<https://utcc.utoronto.ca/~cks/space/blog/python/AbstractUnixSocketsAndPeercred>`_
+        (Linux only), prefix the name with a NULL byte (i.e.: `\0`) - e.g.:
+        
+        .. code-block:: python
+        
+            import requests_unixsocket
+        
+            session = requests_unixsocket.Session()
+            res = session.get('http+unix://\0test_socket/get')
+            print(res.text)
+        
+        For an example program that illustrates this, see
+        ``examples/abstract_namespace.py`` in the git repo. Since abstract 
namespace
+        sockets are specific to Linux, the program will only work on Linux.
+        
+        
+        See also
+        --------
+        
+        - https://github.com/httpie/httpie-unixsocket - a plugin for `HTTPie 
<https://httpie.org/>`_ that allows you to interact with UNIX domain sockets
+        
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 3 - Alpha
 Classifier: Intended Audience :: Developers
@@ -79,6 +106,8 @@
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/README.rst 
new/requests-unixsocket-0.2.0/README.rst
--- old/requests-unixsocket-0.1.5/README.rst    2015-02-04 18:46:39.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/README.rst    2019-08-13 22:53:24.000000000 
+0200
@@ -1,10 +1,10 @@
 requests-unixsocket
 ===================
 
-.. image:: https://pypip.in/version/requests-unixsocket/badge.svg?style=flat
-    :target: https://pypi.python.org/pypi/requests-unixsocket/
-    :alt: Latest Version
-
+.. image:: https://badge.fury.io/py/requests-unixsocket.svg
+    :target: https://badge.fury.io/py/requests-unixsocket
+    :alt: Latest Version on PyPI
+    
 .. image:: https://travis-ci.org/msabramo/requests-unixsocket.svg?branch=master
     :target: https://travis-ci.org/msabramo/requests-unixsocket
 
@@ -20,13 +20,16 @@
 
 .. code-block:: python
 
+    import json
+
     import requests_unixsocket
 
     session = requests_unixsocket.Session()
 
-    # Access /path/to/page from /tmp/profilesvc.sock
-    r = session.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
-    assert r.status_code == 200
+    r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
+    registry_config = r.json()['RegistryConfig']
+    print(json.dumps(registry_config, indent=4))
+
 
 Implicit (monkeypatching)
 +++++++++++++++++++++++++
@@ -46,8 +49,7 @@
 
     requests_unixsocket.monkeypatch()
 
-    # Access /path/to/page from /tmp/profilesvc.sock
-    r = requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
+    r = requests.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
     assert r.status_code == 200
 
 or you can do it temporarily using a context manager:
@@ -57,6 +59,31 @@
     import requests_unixsocket
 
     with requests_unixsocket.monkeypatch():
-        # Access /path/to/page from /tmp/profilesvc.sock
-        r = requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
+        r = requests.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
         assert r.status_code == 200
+
+
+Abstract namespace sockets
+++++++++++++++++++++++++++
+
+To connect to an `abstract namespace
+socket 
<https://utcc.utoronto.ca/~cks/space/blog/python/AbstractUnixSocketsAndPeercred>`_
+(Linux only), prefix the name with a NULL byte (i.e.: `\0`) - e.g.:
+
+.. code-block:: python
+
+    import requests_unixsocket
+
+    session = requests_unixsocket.Session()
+    res = session.get('http+unix://\0test_socket/get')
+    print(res.text)
+
+For an example program that illustrates this, see
+``examples/abstract_namespace.py`` in the git repo. Since abstract namespace
+sockets are specific to Linux, the program will only work on Linux.
+
+
+See also
+--------
+
+- https://github.com/httpie/httpie-unixsocket - a plugin for `HTTPie 
<https://httpie.org/>`_ that allows you to interact with UNIX domain sockets
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/Vagrantfile 
new/requests-unixsocket-0.2.0/Vagrantfile
--- old/requests-unixsocket-0.1.5/Vagrantfile   1970-01-01 01:00:00.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/Vagrantfile   2019-08-13 22:53:24.000000000 
+0200
@@ -0,0 +1,25 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure("2") do |config|
+  config.vm.box = "ubuntu/xenial64"
+  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+  config.vm.provision "shell", inline: <<-SHELL
+    export DEBIAN_FRONTEND=noninteractive
+    sudo add-apt-repository -y ppa:fkrull/deadsnakes
+    sudo add-apt-repository ppa:pypy/ppa
+    apt-get update
+    apt-get install -y docker.io jq python2.6-dev python2.7-dev python3.3-dev 
python3.4-dev python3.5-dev python3.6-dev pypy-dev socat virtualenv
+    usermod --append --groups docker ubuntu
+    mkdir -p /home/ubuntu/.virtualenvs
+    if [ ! -d /home/ubuntu/.virtualenvs/requests-unixsocket ]; then
+      virtualenv --python=python3.6 
/home/ubuntu/.virtualenvs/requests-unixsocket
+      /home/ubuntu/.virtualenvs/requests-unixsocket/bin/pip install -e 
/vagrant ipython tox
+    fi
+    chown -R ubuntu:ubuntu /home/ubuntu/.virtualenvs
+    grep -q 'source 
/home/ubuntu/.virtualenvs/requests-unixsocket/bin/activate' 
/home/ubuntu/.profile \
+      || echo -e '\nsource 
/home/ubuntu/.virtualenvs/requests-unixsocket/bin/activate' >> 
/home/ubuntu/.profile
+    grep -q 'cd /vagrant' /home/ubuntu/.profile \
+      || echo -e '\ncd /vagrant' >> /home/ubuntu/.profile
+  SHELL
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-unixsocket-0.1.5/examples/abstract_namespace.py 
new/requests-unixsocket-0.2.0/examples/abstract_namespace.py
--- old/requests-unixsocket-0.1.5/examples/abstract_namespace.py        
1970-01-01 01:00:00.000000000 +0100
+++ new/requests-unixsocket-0.2.0/examples/abstract_namespace.py        
2019-08-13 22:53:24.000000000 +0200
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Example of interacting with a [abstract namespace
+# 
socket](https://utcc.utoronto.ca/~cks/space/blog/python/AbstractUnixSocketsAndPeercred)
+#
+# Since abstract namespace sockets are specific to Linux, this program will
+# only work on Linux.
+
+import os
+import socket
+
+import requests_unixsocket
+
+
+def handle_response():
+    # Listens on an abstract namespace socket and sends one HTTP response
+    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+    sock.bind('\0test_socket')
+    sock.listen(1)
+    client_sock, addr = sock.accept()
+    client_sock.recv(1024)
+    client_sock.sendall(b'HTTP/1.0 200 OK\r\n')
+    client_sock.sendall(b'Content-Type: text/plain\r\n\r\n')
+    client_sock.sendall(b'Hello world!')
+
+
+if os.fork() == 0:        # child
+    handle_response()
+else:                     # parent
+    try:
+        session = requests_unixsocket.Session()
+        res = session.get('http+unix://\0test_socket/get')
+        print(res.text)
+    finally:
+        os.wait()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/examples/docker-info.py 
new/requests-unixsocket-0.2.0/examples/docker-info.py
--- old/requests-unixsocket-0.1.5/examples/docker-info.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/requests-unixsocket-0.2.0/examples/docker-info.py       2019-08-13 
22:53:24.000000000 +0200
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import json
+
+import requests_unixsocket
+
+session = requests_unixsocket.Session()
+
+r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
+registry_config = r.json()['RegistryConfig']
+print(json.dumps(registry_config, indent=4))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/examples/simple-http.py 
new/requests-unixsocket-0.2.0/examples/simple-http.py
--- old/requests-unixsocket-0.1.5/examples/simple-http.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/requests-unixsocket-0.2.0/examples/simple-http.py       2019-08-13 
22:53:24.000000000 +0200
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import sys
+
+import requests_unixsocket
+
+session = requests_unixsocket.Session()
+
+url = sys.argv[1]
+res = session.get(url)
+print(res.text)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-unixsocket-0.1.5/requests_unixsocket/adapters.py 
new/requests-unixsocket-0.2.0/requests_unixsocket/adapters.py
--- old/requests-unixsocket-0.1.5/requests_unixsocket/adapters.py       
2016-01-20 15:55:40.000000000 +0100
+++ new/requests-unixsocket-0.2.0/requests_unixsocket/adapters.py       
2019-08-16 00:50:29.000000000 +0200
@@ -2,17 +2,21 @@
 
 from requests.adapters import HTTPAdapter
 from requests.compat import urlparse, unquote
+
+try:
+    import http.client as httplib
+except ImportError:
+    import httplib
+
 try:
-    from requests.packages.urllib3.connection import HTTPConnection
-    from requests.packages.urllib3.connectionpool import HTTPConnectionPool
+    from requests.packages import urllib3
 except ImportError:
-    from urllib3.connection import HTTPConnection
-    from urllib3.connectionpool import HTTPConnectionPool
+    import urllib3
 
 
 # The following was adapted from some code from docker-py
-# https://github.com/docker/docker-py/blob/master/docker/unixconn/unixconn.py
-class UnixHTTPConnection(HTTPConnection):
+# https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py
+class UnixHTTPConnection(httplib.HTTPConnection, object):
 
     def __init__(self, unix_socket_url, timeout=60):
         """Create an HTTP connection to a unix domain socket
@@ -21,9 +25,14 @@
         netloc is a percent-encoded path to a unix domain socket. E.g.:
         'http+unix://%2Ftmp%2Fprofilesvc.sock/status/pid'
         """
-        HTTPConnection.__init__(self, 'localhost', timeout=timeout)
+        super(UnixHTTPConnection, self).__init__('localhost', timeout=timeout)
         self.unix_socket_url = unix_socket_url
         self.timeout = timeout
+        self.sock = None
+
+    def __del__(self):  # base class does not have d'tor
+        if self.sock:
+            self.sock.close()
 
     def connect(self):
         sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
@@ -33,10 +42,11 @@
         self.sock = sock
 
 
-class UnixHTTPConnectionPool(HTTPConnectionPool):
+class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
 
     def __init__(self, socket_path, timeout=60):
-        HTTPConnectionPool.__init__(self, 'localhost', timeout=timeout)
+        super(UnixHTTPConnectionPool, self).__init__(
+            'localhost', timeout=timeout)
         self.socket_path = socket_path
         self.timeout = timeout
 
@@ -46,15 +56,34 @@
 
 class UnixAdapter(HTTPAdapter):
 
-    def __init__(self, timeout=60):
+    def __init__(self, timeout=60, pool_connections=25):
         super(UnixAdapter, self).__init__()
         self.timeout = timeout
+        self.pools = urllib3._collections.RecentlyUsedContainer(
+            pool_connections, dispose_func=lambda p: p.close()
+        )
+        super(UnixAdapter, self).__init__()
 
-    def get_connection(self, socket_path, proxies=None):
+    def get_connection(self, url, proxies=None):
         proxies = proxies or {}
-        proxy = proxies.get(urlparse(socket_path.lower()).scheme)
+        proxy = proxies.get(urlparse(url.lower()).scheme)
 
         if proxy:
             raise ValueError('%s does not support specifying proxies'
                              % self.__class__.__name__)
-        return UnixHTTPConnectionPool(socket_path, self.timeout)
+
+        with self.pools.lock:
+            pool = self.pools.get(url)
+            if pool:
+                return pool
+
+            pool = UnixHTTPConnectionPool(url, self.timeout)
+            self.pools[url] = pool
+
+        return pool
+
+    def request_url(self, request, proxies):
+        return request.path_url
+
+    def close(self):
+        self.pools.clear()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-unixsocket-0.1.5/requests_unixsocket/tests/test_requests_unixsocket.py
 
new/requests-unixsocket-0.2.0/requests_unixsocket/tests/test_requests_unixsocket.py
--- 
old/requests-unixsocket-0.1.5/requests_unixsocket/tests/test_requests_unixsocket.py
 2016-01-20 15:55:40.000000000 +0100
+++ 
new/requests-unixsocket-0.2.0/requests_unixsocket/tests/test_requests_unixsocket.py
 2019-08-16 00:50:29.000000000 +0200
@@ -34,7 +34,7 @@
             assert r.headers['X-Requested-Path'] == '/path/to/page'
             assert r.headers['X-Socket-Path'] == usock_thread.usock
             assert isinstance(r.connection, requests_unixsocket.UnixAdapter)
-            assert r.url == url
+            assert r.url.lower() == url.lower()
             if method == 'head':
                 assert r.text == ''
             else:
@@ -62,7 +62,7 @@
             assert r.headers['X-Requested-Query-String'] == 'timestamp=true'
             assert r.headers['X-Socket-Path'] == usock_thread.usock
             assert isinstance(r.connection, requests_unixsocket.UnixAdapter)
-            assert r.url == url
+            assert r.url.lower() == url.lower()
             if method == 'head':
                 assert r.text == ''
             else:
@@ -110,7 +110,7 @@
                 assert r.headers['X-Socket-Path'] == usock_thread.usock
                 assert isinstance(r.connection,
                                   requests_unixsocket.UnixAdapter)
-                assert r.url == url
+                assert r.url.lower() == url.lower()
                 if method == 'head':
                     assert r.text == ''
                 else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-unixsocket-0.1.5/requests_unixsocket.egg-info/PKG-INFO 
new/requests-unixsocket-0.2.0/requests_unixsocket.egg-info/PKG-INFO
--- old/requests-unixsocket-0.1.5/requests_unixsocket.egg-info/PKG-INFO 
2016-01-20 16:09:49.000000000 +0100
+++ new/requests-unixsocket-0.2.0/requests_unixsocket.egg-info/PKG-INFO 
2019-08-16 00:52:02.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests-unixsocket
-Version: 0.1.5
+Version: 0.2.0
 Summary: Use requests to talk HTTP via a UNIX domain socket
 Home-page: https://github.com/msabramo/requests-unixsocket
 Author: Marc Abramowitz
@@ -9,10 +9,10 @@
 Description: requests-unixsocket
         ===================
         
-        .. image:: 
https://pypip.in/version/requests-unixsocket/badge.svg?style=flat
-            :target: https://pypi.python.org/pypi/requests-unixsocket/
-            :alt: Latest Version
-        
+        .. image:: https://badge.fury.io/py/requests-unixsocket.svg
+            :target: https://badge.fury.io/py/requests-unixsocket
+            :alt: Latest Version on PyPI
+            
         .. image:: 
https://travis-ci.org/msabramo/requests-unixsocket.svg?branch=master
             :target: https://travis-ci.org/msabramo/requests-unixsocket
         
@@ -28,13 +28,16 @@
         
         .. code-block:: python
         
+            import json
+        
             import requests_unixsocket
         
             session = requests_unixsocket.Session()
         
-            # Access /path/to/page from /tmp/profilesvc.sock
-            r = 
session.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
-            assert r.status_code == 200
+            r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
+            registry_config = r.json()['RegistryConfig']
+            print(json.dumps(registry_config, indent=4))
+        
         
         Implicit (monkeypatching)
         +++++++++++++++++++++++++
@@ -54,8 +57,7 @@
         
             requests_unixsocket.monkeypatch()
         
-            # Access /path/to/page from /tmp/profilesvc.sock
-            r = 
requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
+            r = requests.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
             assert r.status_code == 200
         
         or you can do it temporarily using a context manager:
@@ -65,11 +67,36 @@
             import requests_unixsocket
         
             with requests_unixsocket.monkeypatch():
-                # Access /path/to/page from /tmp/profilesvc.sock
-                r = 
requests.get('http+unix://%2Ftmp%2Fprofilesvc.sock/path/to/page')
+                r = requests.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
                 assert r.status_code == 200
         
         
+        Abstract namespace sockets
+        ++++++++++++++++++++++++++
+        
+        To connect to an `abstract namespace
+        socket 
<https://utcc.utoronto.ca/~cks/space/blog/python/AbstractUnixSocketsAndPeercred>`_
+        (Linux only), prefix the name with a NULL byte (i.e.: `\0`) - e.g.:
+        
+        .. code-block:: python
+        
+            import requests_unixsocket
+        
+            session = requests_unixsocket.Session()
+            res = session.get('http+unix://\0test_socket/get')
+            print(res.text)
+        
+        For an example program that illustrates this, see
+        ``examples/abstract_namespace.py`` in the git repo. Since abstract 
namespace
+        sockets are specific to Linux, the program will only work on Linux.
+        
+        
+        See also
+        --------
+        
+        - https://github.com/httpie/httpie-unixsocket - a plugin for `HTTPie 
<https://httpie.org/>`_ that allows you to interact with UNIX domain sockets
+        
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 3 - Alpha
 Classifier: Intended Audience :: Developers
@@ -79,6 +106,8 @@
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-unixsocket-0.1.5/requests_unixsocket.egg-info/SOURCES.txt 
new/requests-unixsocket-0.2.0/requests_unixsocket.egg-info/SOURCES.txt
--- old/requests-unixsocket-0.1.5/requests_unixsocket.egg-info/SOURCES.txt      
2016-01-20 16:09:50.000000000 +0100
+++ new/requests-unixsocket-0.2.0/requests_unixsocket.egg-info/SOURCES.txt      
2019-08-16 00:52:04.000000000 +0200
@@ -2,13 +2,18 @@
 AUTHORS
 ChangeLog
 LICENSE
+Makefile
 README.rst
+Vagrantfile
 pytest.ini
 requirements.txt
 setup.cfg
 setup.py
 test-requirements.txt
 tox.ini
+examples/abstract_namespace.py
+examples/docker-info.py
+examples/simple-http.py
 requests_unixsocket/__init__.py
 requests_unixsocket/adapters.py
 requests_unixsocket/testutils.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-unixsocket-0.1.5/requests_unixsocket.egg-info/pbr.json 
new/requests-unixsocket-0.2.0/requests_unixsocket.egg-info/pbr.json
--- old/requests-unixsocket-0.1.5/requests_unixsocket.egg-info/pbr.json 
2016-01-20 16:09:49.000000000 +0100
+++ new/requests-unixsocket-0.2.0/requests_unixsocket.egg-info/pbr.json 
2019-08-16 00:52:02.000000000 +0200
@@ -1 +1 @@
-{"is_release": false, "git_version": "0c1c7e0"}
\ No newline at end of file
+{"is_release": false, "git_version": "f4703e0"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/setup.cfg 
new/requests-unixsocket-0.2.0/setup.cfg
--- old/requests-unixsocket-0.1.5/setup.cfg     2016-01-20 16:09:50.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/setup.cfg     2019-08-16 00:52:04.000000000 
+0200
@@ -15,9 +15,11 @@
        Programming Language :: Python
        Programming Language :: Python :: 2
        Programming Language :: Python :: 2.7
-       Programming Language :: Python :: 2.6
        Programming Language :: Python :: 3
        Programming Language :: Python :: 3.3
+       Programming Language :: Python :: 3.4
+       Programming Language :: Python :: 3.5
+       Programming Language :: Python :: 3.6
 test_suite = requests_unixsocket.tests
 
 [files]
@@ -29,5 +31,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/test-requirements.txt 
new/requests-unixsocket-0.2.0/test-requirements.txt
--- old/requests-unixsocket-0.1.5/test-requirements.txt 2014-11-25 
18:31:50.000000000 +0100
+++ new/requests-unixsocket-0.2.0/test-requirements.txt 2019-08-13 
22:53:24.000000000 +0200
@@ -1,4 +1,12 @@
-pytest
-pytest-capturelog
-pytest-pep8
-waitress
+apipkg==1.4
+appdirs==1.4.0
+execnet==1.4.1
+packaging==16.8
+pep8==1.7.0
+py==1.4.32
+pyparsing==2.1.10
+pytest==2.8.7
+pytest-cache==1.0
+pytest-pep8==1.0.2
+six==1.10.0
+waitress==0.9.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-unixsocket-0.1.5/tox.ini 
new/requests-unixsocket-0.2.0/tox.ini
--- old/requests-unixsocket-0.1.5/tox.ini       2016-01-20 15:55:38.000000000 
+0100
+++ new/requests-unixsocket-0.2.0/tox.ini       2019-08-16 00:13:11.000000000 
+0200
@@ -1,5 +1,5 @@
 [tox]
-envlist = py26, py27, py33, py34, py35, pypy, flake8
+envlist = py26, py27, py33, py34, py35, py36, py37, pypy, flake8
 
 [testenv]
 commands = py.test {posargs:requests_unixsocket/tests}


Reply via email to