commit python-boto3 for openSUSE:Factory
Hello community, here is the log from the commit of package python-boto3 for openSUSE:Factory checked in at 2016-06-07 23:49:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-boto3 (Old) and /work/SRC/openSUSE:Factory/.python-boto3.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-boto3" Changes: -------- --- /work/SRC/openSUSE:Factory/python-boto3/python-boto3.changes 2016-04-14 13:05:48.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-boto3.new/python-boto3.changes 2016-06-07 23:49:48.000000000 +0200 @@ -1,0 +2,14 @@ +Mon Jun 6 11:36:24 UTC 2016 - dmueller@suse.com + +- fix source url + +------------------------------------------------------------------- +Thu Jun 2 03:56:36 UTC 2016 - jacobwinski@gmail.com + +- Update to 1.3.1 + + feature:S3: Add custom load to ObjectSummary + + feature:Session: Add method to get session credentials + + bugfix:DynamoDB: Ensure batch writer never sends more than flush_amount (#483) + + feature:Resources: Add get_available_subresources to Resources (#113) + +------------------------------------------------------------------- Old: ---- boto3-1.3.0.tar.gz New: ---- boto3-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-boto3.spec ++++++ --- /var/tmp/diff_new_pack.Tf6hqP/_old 2016-06-07 23:49:49.000000000 +0200 +++ /var/tmp/diff_new_pack.Tf6hqP/_new 2016-06-07 23:49:49.000000000 +0200 @@ -17,13 +17,13 @@ Name: python-boto3 -Version: 1.3.0 +Version: 1.3.1 Release: 0 Url: https://github.com/boto/boto3 Summary: Amazon Web Services Library License: Apache-2.0 Group: Development/Languages/Python -Source: https://pypi.python.org/packages/source/b/boto3/boto3-%{version}.tar.gz +Source: https://pypi.io/packages/source/b/boto3/boto3-%{version}.tar.gz BuildRequires: fdupes BuildRequires: python-devel BuildRequires: python-futures ++++++ boto3-1.3.0.tar.gz -> boto3-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/PKG-INFO new/boto3-1.3.1/PKG-INFO --- old/boto3-1.3.0/PKG-INFO 2016-03-16 01:14:40.000000000 +0100 +++ new/boto3-1.3.1/PKG-INFO 2016-04-22 00:18:17.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: boto3 -Version: 1.3.0 +Version: 1.3.1 Summary: The AWS SDK for Python Home-page: https://github.com/boto/boto3 Author: Amazon Web Services diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3/__init__.py new/boto3-1.3.1/boto3/__init__.py --- old/boto3-1.3.0/boto3/__init__.py 2016-03-16 01:14:40.000000000 +0100 +++ new/boto3-1.3.1/boto3/__init__.py 2016-04-22 00:18:16.000000000 +0200 @@ -17,7 +17,7 @@ __author__ = 'Amazon Web Services' -__version__ = '1.3.0' +__version__ = '1.3.1' # The default Boto3 session; autoloaded when needed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3/dynamodb/table.py new/boto3-1.3.1/boto3/dynamodb/table.py --- old/boto3-1.3.0/boto3/dynamodb/table.py 2016-03-16 01:14:39.000000000 +0100 +++ new/boto3-1.3.1/boto3/dynamodb/table.py 2016-04-22 00:18:16.000000000 +0200 @@ -98,18 +98,20 @@ self._flush() def _flush(self): + items_to_send = self._items_buffer[:self._flush_amount] + self._items_buffer = self._items_buffer[self._flush_amount:] response = self._client.batch_write_item( - RequestItems={self._table_name: self._items_buffer}) + RequestItems={self._table_name: items_to_send}) unprocessed_items = response['UnprocessedItems'] if unprocessed_items and unprocessed_items[self._table_name]: # Any unprocessed_items are immediately added to the # next batch we send. - self._items_buffer = unprocessed_items[self._table_name] + self._items_buffer.extend(unprocessed_items[self._table_name]) else: self._items_buffer = [] logger.debug("Batch write sent %s, unprocessed: %s", - self._flush_amount, len(self._items_buffer)) + len(items_to_send), len(self._items_buffer)) def __enter__(self): return self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3/resources/factory.py new/boto3-1.3.1/boto3/resources/factory.py --- old/boto3-1.3.0/boto3/resources/factory.py 2016-03-16 01:14:40.000000000 +0100 +++ new/boto3-1.3.1/boto3/resources/factory.py 2016-04-22 00:18:16.000000000 +0200 @@ -248,6 +248,26 @@ service_context=service_context ) + self._create_available_subresources_command( + attrs, resource_model.subresources) + + def _create_available_subresources_command(self, attrs, subresources): + _subresources = [subresource.name for subresource in subresources] + _subresources = sorted(_subresources) + + def get_available_subresources(factory_self): + """ + Returns a list of all the available sub-resources for this + Resource. + + :returns: A list containing the name of each sub-resource for this + resource + :rtype: list of str + """ + return _subresources + + attrs['get_available_subresources'] = get_available_subresources + def _load_waiters(self, attrs, resource_name, resource_model, service_context): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3/s3/inject.py new/boto3-1.3.1/boto3/s3/inject.py --- old/boto3-1.3.0/boto3/s3/inject.py 2016-03-16 01:14:39.000000000 +0100 +++ new/boto3-1.3.1/boto3/s3/inject.py 2016-04-22 00:18:16.000000000 +0200 @@ -34,6 +34,10 @@ class_attributes, 'download_file', object_download_file) +def inject_object_summary_methods(class_attributes, **kwargs): + utils.inject_attribute(class_attributes, 'load', object_summary_load) + + def bucket_load(self, *args, **kwargs): """Calls s3.Client.list_buckets() to update the attributes of the Bucket resource.""" # The docstring above is phrased this way to match what the autogenerated @@ -51,6 +55,15 @@ 'ListBuckets') +def object_summary_load(self, *args, **kwargs): + """Calls s3.Client.head_object to update the attributes of the ObjectSummary resource.""" + response = self.meta.client.head_object( + Bucket=self.bucket_name, Key=self.key) + if 'ContentLength' in response: + response['Size'] = response.pop('ContentLength') + self.meta.data = response + + def upload_file(self, Filename, Bucket, Key, ExtraArgs=None, Callback=None, Config=None): """Upload a file to an S3 object. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3/s3/transfer.py new/boto3-1.3.1/boto3/s3/transfer.py --- old/boto3-1.3.0/boto3/s3/transfer.py 2016-03-16 01:14:39.000000000 +0100 +++ new/boto3-1.3.1/boto3/s3/transfer.py 2016-04-22 00:18:16.000000000 +0200 @@ -72,7 +72,7 @@ extra_args={'ContentType': "application/json"}) -The ``S3Transfer`` clas also supports progress callbacks so you can +The ``S3Transfer`` class also supports progress callbacks so you can provide transfer progress to users. Both the ``upload_file`` and ``download_file`` methods take an optional ``callback`` parameter. Here's an example of how to print a simple progress percentage @@ -94,7 +94,7 @@ self._seen_so_far += bytes_amount percentage = (self._seen_so_far / self._size) * 100 sys.stdout.write( - "\r%s %s / %s (%.2f%%)" % (self._filename, self._seen_so_far, + "\\r%s %s / %s (%.2f%%)" % (self._filename, self._seen_so_far, self._size, percentage)) sys.stdout.flush() @@ -179,7 +179,7 @@ callback=None, enable_callback=True): """ - Given a file object shown below: + Given a file object shown below:: |___________________________________________________| 0 | | full_file_size diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3/session.py new/boto3-1.3.1/boto3/session.py --- old/boto3-1.3.0/boto3/session.py 2016-03-16 01:14:40.000000000 +0100 +++ new/boto3-1.3.1/boto3/session.py 2016-04-22 00:18:16.000000000 +0200 @@ -164,6 +164,16 @@ service_name=service_name, partition_name=partition_name, allow_non_regional=allow_non_regional) + def get_credentials(self): + """ + Return the :class:`botocore.credential.Credential` object + associated with this session. If the credentials have not + yet been loaded, this will attempt to load them. If they + have already been loaded, this will return the cached + credentials. + """ + return self._session.get_credentials() + def client(self, service_name, region_name=None, api_version=None, use_ssl=True, verify=None, endpoint_url=None, aws_access_key_id=None, aws_secret_access_key=None, @@ -394,6 +404,10 @@ 'creating-resource-class.s3.Object', boto3.utils.lazy_call( 'boto3.s3.inject.inject_object_methods')) + self._session.register( + 'creating-resource-class.s3.ObjectSummary', + boto3.utils.lazy_call( + 'boto3.s3.inject.inject_object_summary_methods')) # DynamoDb customizations self._session.register( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/boto3-1.3.0/boto3.egg-info/PKG-INFO new/boto3-1.3.1/boto3.egg-info/PKG-INFO --- old/boto3-1.3.0/boto3.egg-info/PKG-INFO 2016-03-16 01:14:40.000000000 +0100 +++ new/boto3-1.3.1/boto3.egg-info/PKG-INFO 2016-04-22 00:18:16.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: boto3 -Version: 1.3.0 +Version: 1.3.1 Summary: The AWS SDK for Python Home-page: https://github.com/boto/boto3 Author: Amazon Web Services
participants (1)
-
root@hilbert.suse.de