Hello community,

here is the log from the commit of package python-slumber for openSUSE:Factory 
checked in at 2013-09-16 16:35:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-slumber (Old)
 and      /work/SRC/openSUSE:Factory/.python-slumber.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-slumber"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-slumber/python-slumber.changes    
2012-11-12 16:06:33.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-slumber.new/python-slumber.changes       
2013-09-16 16:35:35.000000000 +0200
@@ -1,0 +2,12 @@
+Sat Sep 14 17:56:36 UTC 2013 - os-...@jacraig.com
+
+- Update to 0.6.0:
+  * All HTTP methods support multipart/form-data. The new files parameter is
+    directly passed to requests.
+- Changes from 0.5.2:
+  * Now compatible with requests 1.0
+  * Fix bug when using default serializer
+- Changed BuildRequires from distribute to setuptools
+
+
+-------------------------------------------------------------------

Old:
----
  slumber-0.5.1.tar.gz

New:
----
  slumber-0.6.0.tar.gz

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

Other differences:
------------------
++++++ python-slumber.spec ++++++
--- /var/tmp/diff_new_pack.tID5V3/_old  2013-09-16 16:35:35.000000000 +0200
+++ /var/tmp/diff_new_pack.tID5V3/_new  2013-09-16 16:35:35.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-slumber
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python-slumber
-Version:        0.5.1
+Version:        0.6.0
 Release:        0
 Url:            http://slumber.in/
 Summary:        A library that makes consuming a REST API easier and more 
convenient
@@ -26,7 +26,7 @@
 Source:         
http://pypi.python.org/packages/source/s/slumber/slumber-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  python-devel
-BuildRequires:  python-distribute
+BuildRequires:  python-setuptools
 #BuildRequires:  python-mock
 #BuildRequires:  python-requests
 Requires:       python-PyYAML

++++++ slumber-0.5.1.tar.gz -> slumber-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/CHANGELOG.rst 
new/slumber-0.6.0/CHANGELOG.rst
--- old/slumber-0.5.1/CHANGELOG.rst     2012-10-29 17:05:08.000000000 +0100
+++ new/slumber-0.6.0/CHANGELOG.rst     2013-04-01 19:27:51.000000000 +0200
@@ -3,6 +3,21 @@
 Changelog
 =========
 
+0.6.0
+-----
+
+* All HTTP methods support multipart/form-data.  The new ``files``
+  parameter is directly passed to ``requests``.  Thanks to Philip
+  Neustrom and Diego Gaustein.
+
+
+0.5.2
+-----
+
+* Now compatible with ``requests`` 1.0 thanks to Matias Saguir.
+
+* Fix bug when using default serializer.  Thanks to Andy McKay
+
 
 0.4.2
 -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/MANIFEST.in 
new/slumber-0.6.0/MANIFEST.in
--- old/slumber-0.5.1/MANIFEST.in       2012-10-29 17:12:17.000000000 +0100
+++ new/slumber-0.6.0/MANIFEST.in       2013-04-01 19:27:51.000000000 +0200
@@ -2,4 +2,4 @@
 include README.rst
 include LICENSE.txt
 include CHANGELOG.rst
-prune tests
+include tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/PKG-INFO new/slumber-0.6.0/PKG-INFO
--- old/slumber-0.5.1/PKG-INFO  2012-10-30 18:08:48.000000000 +0100
+++ new/slumber-0.6.0/PKG-INFO  2013-04-01 20:25:05.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: slumber
-Version: 0.5.1
+Version: 0.6.0
 Summary: A library that makes consuming a REST API easier and more convenient
 Home-page: http://slumber.in/
 Author: Donald Stufft
@@ -19,9 +19,8 @@
         Getting Help
         ============
         
-        There are two primary ways of getting help. I have an IRC channel
-        (`#slumber on irc.freenode.net`_) to get help, want to bounce idea or
-        generally shoot the breeze.
+        I have an IRC channel (`#slumber on irc.freenode.net`_) to get help, 
bounce idea
+        or generally shoot the breeze.
         
         .. _#slumber on irc.freenode.net: irc://irc.freenode.net/slumber
         
@@ -43,9 +42,9 @@
         
         Slumber requires the following modules.
         
-        * Python 2.5+
+        * Python 2.6+
         * requests
-        * simplejson (If using Python 2.5, or you desire the speedups for JSON 
serialization)
+        * simplejson (If you desire the speedups for JSON serialization)
         * pyyaml (If you are using the optional yaml serialization)
         
         .. _Pip: http://pip.openplans.org/
@@ -57,6 +56,21 @@
         Changelog
         =========
         
+        0.6.0
+        -----
+        
+        * All HTTP methods support multipart/form-data.  The new ``files``
+          parameter is directly passed to ``requests``.  Thanks to Philip
+          Neustrom and Diego Gaustein.
+        
+        
+        0.5.2
+        -----
+        
+        * Now compatible with ``requests`` 1.0 thanks to Matias Saguir.
+        
+        * Fix bug when using default serializer.  Thanks to Andy McKay
+        
         
         0.4.2
         -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/README.rst new/slumber-0.6.0/README.rst
--- old/slumber-0.5.1/README.rst        2012-10-29 17:05:08.000000000 +0100
+++ new/slumber-0.6.0/README.rst        2013-04-01 19:27:51.000000000 +0200
@@ -11,9 +11,8 @@
 Getting Help
 ============
 
-There are two primary ways of getting help. I have an IRC channel
-(`#slumber on irc.freenode.net`_) to get help, want to bounce idea or
-generally shoot the breeze.
+I have an IRC channel (`#slumber on irc.freenode.net`_) to get help, bounce 
idea
+or generally shoot the breeze.
 
 .. _#slumber on irc.freenode.net: irc://irc.freenode.net/slumber
 
@@ -35,9 +34,9 @@
 
 Slumber requires the following modules.
 
-* Python 2.5+
+* Python 2.6+
 * requests
-* simplejson (If using Python 2.5, or you desire the speedups for JSON 
serialization)
+* simplejson (If you desire the speedups for JSON serialization)
 * pyyaml (If you are using the optional yaml serialization)
 
 .. _Pip: http://pip.openplans.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/docs/options.rst 
new/slumber-0.6.0/docs/options.rst
--- old/slumber-0.5.1/docs/options.rst  2012-10-29 17:12:17.000000000 +0100
+++ new/slumber-0.6.0/docs/options.rst  2013-04-01 19:27:51.000000000 +0200
@@ -29,6 +29,18 @@
 argument is passed directly to requests and thus works exactly the same way
 and accepts exactly the same arguments.
 
+File uploads
+============
+
+You may upload files by supplying a dictionary in the form {'key': 
file-like-object} as the value of the
+``files`` parameter in ``post``, ``patch`` or ``put`` calls.  E.g.::
+
+    with open('/home/philip/out.txt') as fp:
+        api.file.post({'name': 'my file'}, files={'file': fp}) 
+
+Will do a POST to ``/api/file/`` with a multipart-form-data request.
+
+
 Serializer
 ==========
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/docs/tutorial.rst 
new/slumber-0.6.0/docs/tutorial.rst
--- old/slumber-0.5.1/docs/tutorial.rst 2012-10-29 17:12:17.000000000 +0100
+++ new/slumber-0.6.0/docs/tutorial.rst 2013-04-01 19:27:51.000000000 +0200
@@ -36,7 +36,7 @@
 
     >>> import slumber
     >>> ## Connect to http://slumber.in/api/v1/ with the Basic Auth 
user/password of demo/demo
-    >>> api = slumber.API("http://slumber.in/api/v1/";, auth=("demo", "demo")
+    >>> api = slumber.API("http://slumber.in/api/v1/";, auth=("demo", "demo"))
     >>> ## GET http://slumber.in/api/v1/note/
     >>> ##     Note: Any kwargs passed to get(), post(), put(), delete() will 
be used as url parameters
     >>> api.note.get()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/setup.py new/slumber-0.6.0/setup.py
--- old/slumber-0.5.1/setup.py  2012-10-30 18:07:44.000000000 +0100
+++ new/slumber-0.6.0/setup.py  2013-04-01 19:27:51.000000000 +0200
@@ -1,17 +1,13 @@
-import os.path
-from setuptools import setup, find_packages
-import sys
+import os
+from setuptools import setup
 
 install_requires = ["requests"]
 
-if sys.version_info < (2, 6):
-    install_requires.append("simplejson")
-
 base_dir = os.path.dirname(os.path.abspath(__file__))
 
 setup(
     name = "slumber",
-    version = "0.5.1",
+    version = "0.6.0",
     description = "A library that makes consuming a REST API easier and more 
convenient",
     long_description="\n\n".join([
         open(os.path.join(base_dir, "README.rst"), "r").read(),
@@ -20,7 +16,7 @@
     url = "http://slumber.in/";,
     author = "Donald Stufft",
     author_email = "donald.stu...@gmail.com",
-    packages = find_packages(),
+    packages = ["slumber"],
     zip_safe = False,
     install_requires = install_requires,
     test_suite = "tests.get_tests",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/slumber/__init__.py 
new/slumber-0.6.0/slumber/__init__.py
--- old/slumber-0.5.1/slumber/__init__.py       2012-10-30 18:04:33.000000000 
+0100
+++ new/slumber-0.6.0/slumber/__init__.py       2013-04-01 19:27:51.000000000 
+0200
@@ -88,14 +88,21 @@
 
         return self.__class__(**kwargs)
 
-    def _request(self, method, data=None, params=None):
+    def _request(self, method, data=None, files=None, params=None):
         s = self._store["serializer"]
         url = self._store["base_url"]
 
         if self._store["append_slash"] and not url.endswith("/"):
             url = url + "/"
 
-        resp = self._store["session"].request(method, url, data=data, 
params=params, headers={"content-type": s.get_content_type(), "accept": 
s.get_content_type()})
+        headers = {"accept": s.get_content_type()}
+
+        if not files:
+            headers["content-type"] = s.get_content_type()
+            if data is not None:
+                data = s.dumps(data)
+
+        resp = self._store["session"].request(method, url, data=data, 
params=params, files=files, headers=headers)
 
         if 400 <= resp.status_code <= 499:
             raise exceptions.HttpClientError("Client Error %s: %s" % 
(resp.status_code, url), response=resp, content=resp.content)
@@ -133,30 +140,29 @@
         else:
             return  # @@@ We should probably do some sort of error here? (Is 
this even possible?)
 
-    def post(self, data, **kwargs):
+    def post(self, data=None, files=None, **kwargs):
         s = self._store["serializer"]
 
-        resp = self._request("POST", data=s.dumps(data), params=kwargs)
+        resp = self._request("POST", data=data, files=files, params=kwargs)
         if 200 <= resp.status_code <= 299:
             return self._try_to_serialize_response(resp)
         else:
             # @@@ Need to be Some sort of Error Here or Something
             return
 
-    def patch(self, data, **kwargs):
+    def patch(self, data=None, files=None, **kwargs):
         s = self._store["serializer"]
 
-        resp = self._request("PATCH", data=s.dumps(data), params=kwargs)
+        resp = self._request("PATCH", data=data, files=files, params=kwargs)
         if 200 <= resp.status_code <= 299:
             return self._try_to_serialize_response(resp)
         else:
             # @@@ Need to be Some sort of Error Here or Something
             return
 
-    def put(self, data, **kwargs):
-        s = self._store["serializer"]
+    def put(self, data=None, files=None, **kwargs):
+        resp = self._request("PUT", data=data, files=files, params=kwargs)
 
-        resp = self._request("PUT", data=s.dumps(data), params=kwargs)
         if 200 <= resp.status_code <= 299:
             return self._try_to_serialize_response(resp)
         else:
@@ -177,14 +183,18 @@
 
     def __init__(self, base_url=None, auth=None, format=None, 
append_slash=True, session=None, serializer=None):
         if serializer is None:
-            s = Serializer(default=format)
+            serializer = Serializer(default=format)
+
+        if session is None:
+            session = requests.session()
+            session.auth = auth
 
         self._store = {
             "base_url": base_url,
             "format": format if format is not None else "json",
             "append_slash": append_slash,
-            "session": requests.session(auth=auth) if session is None else 
session,
-            "serializer": s,
+            "session": session,
+            "serializer": serializer,
         }
 
         # Do some Checks for Required Values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/slumber.egg-info/PKG-INFO 
new/slumber-0.6.0/slumber.egg-info/PKG-INFO
--- old/slumber-0.5.1/slumber.egg-info/PKG-INFO 2012-10-30 18:08:46.000000000 
+0100
+++ new/slumber-0.6.0/slumber.egg-info/PKG-INFO 2013-04-01 20:25:05.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: slumber
-Version: 0.5.1
+Version: 0.6.0
 Summary: A library that makes consuming a REST API easier and more convenient
 Home-page: http://slumber.in/
 Author: Donald Stufft
@@ -19,9 +19,8 @@
         Getting Help
         ============
         
-        There are two primary ways of getting help. I have an IRC channel
-        (`#slumber on irc.freenode.net`_) to get help, want to bounce idea or
-        generally shoot the breeze.
+        I have an IRC channel (`#slumber on irc.freenode.net`_) to get help, 
bounce idea
+        or generally shoot the breeze.
         
         .. _#slumber on irc.freenode.net: irc://irc.freenode.net/slumber
         
@@ -43,9 +42,9 @@
         
         Slumber requires the following modules.
         
-        * Python 2.5+
+        * Python 2.6+
         * requests
-        * simplejson (If using Python 2.5, or you desire the speedups for JSON 
serialization)
+        * simplejson (If you desire the speedups for JSON serialization)
         * pyyaml (If you are using the optional yaml serialization)
         
         .. _Pip: http://pip.openplans.org/
@@ -57,6 +56,21 @@
         Changelog
         =========
         
+        0.6.0
+        -----
+        
+        * All HTTP methods support multipart/form-data.  The new ``files``
+          parameter is directly passed to ``requests``.  Thanks to Philip
+          Neustrom and Diego Gaustein.
+        
+        
+        0.5.2
+        -----
+        
+        * Now compatible with ``requests`` 1.0 thanks to Matias Saguir.
+        
+        * Fix bug when using default serializer.  Thanks to Andy McKay
+        
         
         0.4.2
         -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slumber-0.5.1/slumber.egg-info/top_level.txt 
new/slumber-0.6.0/slumber.egg-info/top_level.txt
--- old/slumber-0.5.1/slumber.egg-info/top_level.txt    2012-10-30 
18:08:46.000000000 +0100
+++ new/slumber-0.6.0/slumber.egg-info/top_level.txt    2013-04-01 
20:25:05.000000000 +0200
@@ -1,2 +1 @@
 slumber
-tests

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to