Hello community,

here is the log from the commit of package python-boto for openSUSE:Factory 
checked in at 2017-08-23 11:55:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-boto (Old)
 and      /work/SRC/openSUSE:Factory/.python-boto.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-boto"

Wed Aug 23 11:55:00 2017 rev:42 rq:518141 version:2.48.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-boto/python-boto-doc.changes      
2017-05-20 10:13:46.698907922 +0200
+++ /work/SRC/openSUSE:Factory/.python-boto.new/python-boto-doc.changes 
2017-08-23 11:55:04.239548016 +0200
@@ -1,0 +2,14 @@
+Mon Aug 21 14:26:38 UTC 2017 - tbecht...@suse.com
+
+- update to version 2.48.0
+  * Populate storage class from HEAD Object responses.
+  * Fix generate_url() AttributeError when using anonymous connections
+  * Add release notes for 2.47.0
+  * Allow specifying s3 host from boto config file.
+  * Use RegionInfo by default with heuristics
+  * Loosen requirements for ID field in PROJECT_PRIVATE_RE to enable new 
canonical id format for project groups.
+  * Added reelase notes for 2.48.0
+  * Bumped to 2.48.0
+  * Bumped to 2.47.0
+
+-------------------------------------------------------------------
python-boto.changes: same change

Old:
----
  boto-2.46.1.tar.gz

New:
----
  boto-2.48.0.tar.gz

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

Other differences:
------------------
++++++ python-boto-doc.spec ++++++
--- /var/tmp/diff_new_pack.HjcmYx/_old  2017-08-23 11:55:05.419381931 +0200
+++ /var/tmp/diff_new_pack.HjcmYx/_new  2017-08-23 11:55:05.427380804 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-boto-doc
-Version:        2.46.1
+Version:        2.48.0
 Release:        0
 Url:            https://github.com/boto/boto/
 Summary:        Documentation for python-boto
@@ -26,10 +26,10 @@
 Group:          Documentation/Other
 Source:         
https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz
 Source1:        boto.cfg
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module boto = %{version}}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 # Documentation requirement
 BuildRequires:  python3-Sphinx
 Provides:       %{python_module boto-doc = %{version}}

++++++ python-boto.spec ++++++
--- /var/tmp/diff_new_pack.HjcmYx/_old  2017-08-23 11:55:05.471374612 +0200
+++ /var/tmp/diff_new_pack.HjcmYx/_new  2017-08-23 11:55:05.483372923 +0200
@@ -21,7 +21,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-boto
-Version:        2.46.1
+Version:        2.48.0
 Release:        0
 Url:            https://github.com/boto/boto/
 Summary:        Amazon Web Services Library
@@ -29,12 +29,12 @@
 Group:          Development/Languages/Python
 Source:         
https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz
 Source1:        boto.cfg
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module paramiko}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module xml}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 # Documentation requirement
 Requires:       python-paramiko
 Requires:       python-xml

++++++ boto-2.46.1.tar.gz -> boto-2.48.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/PKG-INFO new/boto-2.48.0/PKG-INFO
--- old/boto-2.46.1/PKG-INFO    2017-02-21 02:37:56.000000000 +0100
+++ new/boto-2.48.0/PKG-INFO    2017-07-06 18:41:21.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: boto
-Version: 2.46.1
+Version: 2.48.0
 Summary: Amazon Web Services Library
 Home-page: https://github.com/boto/boto/
 Author: Mitch Garnaat
@@ -9,9 +9,9 @@
 Description: ####
         boto
         ####
-        boto 2.46.1
+        boto 2.48.0
         
-        Released: 20-Feb-2017
+        Released: 24-May-2017
         
         .. image:: https://travis-ci.org/boto/boto.svg?branch=develop
                 :target: https://travis-ci.org/boto/boto
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/README.rst new/boto-2.48.0/README.rst
--- old/boto-2.46.1/README.rst  2017-02-21 02:37:00.000000000 +0100
+++ new/boto-2.48.0/README.rst  2017-07-06 18:24:18.000000000 +0200
@@ -1,9 +1,9 @@
 ####
 boto
 ####
-boto 2.46.1
+boto 2.48.0
 
-Released: 20-Feb-2017
+Released: 24-May-2017
 
 .. image:: https://travis-ci.org/boto/boto.svg?branch=develop
         :target: https://travis-ci.org/boto/boto
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto/__init__.py 
new/boto-2.48.0/boto/__init__.py
--- old/boto-2.46.1/boto/__init__.py    2017-02-21 02:37:00.000000000 +0100
+++ new/boto-2.48.0/boto/__init__.py    2017-07-06 18:24:18.000000000 +0200
@@ -38,7 +38,7 @@
 from boto.compat import urlparse
 from boto.exception import InvalidUriError
 
-__version__ = '2.46.1'
+__version__ = '2.48.0'
 Version = __version__  # for backware compatibility
 
 # http://bugs.python.org/issue7980
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto/provider.py 
new/boto-2.48.0/boto/provider.py
--- old/boto-2.46.1/boto/provider.py    2016-12-09 00:55:00.000000000 +0100
+++ new/boto-2.48.0/boto/provider.py    2017-05-24 23:20:50.000000000 +0200
@@ -155,7 +155,7 @@
             # Note that this version header is not to be confused with
             # the Google Cloud Storage 'x-goog-api-version' header.
             VERSION_ID_HEADER_KEY: GOOG_HEADER_PREFIX + 'version-id',
-            STORAGE_CLASS_HEADER_KEY: None,
+            STORAGE_CLASS_HEADER_KEY: GOOG_HEADER_PREFIX + 'storage-class',
             MFA_HEADER_KEY: None,
             RESTORE_HEADER_KEY: None,
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto/regioninfo.py 
new/boto-2.48.0/boto/regioninfo.py
--- old/boto-2.46.1/boto/regioninfo.py  2017-02-21 00:50:57.000000000 +0100
+++ new/boto-2.48.0/boto/regioninfo.py  2017-07-06 18:24:02.000000000 +0200
@@ -205,6 +205,8 @@
 
     :returns: A configured connection class.
     """
+    if region_cls is None:
+        region_cls = RegionInfo
     region = _get_region(service_name, region_name, region_cls, connection_cls)
 
     if region is None and _use_endpoint_heuristics():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto/s3/bucket.py 
new/boto-2.48.0/boto/s3/bucket.py
--- old/boto-2.46.1/boto/s3/bucket.py   2016-03-24 21:05:15.000000000 +0100
+++ new/boto-2.48.0/boto/s3/bucket.py   2017-05-24 23:20:50.000000000 +0200
@@ -221,6 +221,7 @@
             k.handle_version_headers(response)
             k.handle_encryption_headers(response)
             k.handle_restore_headers(response)
+            k.handle_storage_class_header(response)
             k.handle_addl_headers(response.getheaders())
             return k, response
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto/s3/connection.py 
new/boto-2.48.0/boto/s3/connection.py
--- old/boto-2.46.1/boto/s3/connection.py       2016-12-09 00:55:00.000000000 
+0100
+++ new/boto-2.48.0/boto/s3/connection.py       2017-07-06 18:24:02.000000000 
+0200
@@ -161,7 +161,7 @@
 
 class S3Connection(AWSAuthConnection):
 
-    DefaultHost = boto.config.get('s3', 'host', 's3.amazonaws.com')
+    DefaultHost = 's3.amazonaws.com'
     DefaultCallingFormat = boto.config.get('s3', 'calling_format', 
'boto.s3.connection.SubdomainCallingFormat')
     QueryString = 'Signature=%s&Expires=%d&AWSAccessKeyId=%s'
 
@@ -174,9 +174,12 @@
                  suppress_consec_slashes=True, anon=False,
                  validate_certs=None, profile_name=None):
         no_host_provided = False
+        # Try falling back to the boto config file's value, if present.
         if host is NoHostProvided:
-            no_host_provided = True
-            host = self.DefaultHost
+            host = boto.config.get('s3', 'host')
+            if host is None:
+                host = self.DefaultHost
+                no_host_provided = True
         if isinstance(calling_format, six.string_types):
             calling_format=boto.utils.find_class(calling_format)()
         self.calling_format = calling_format
@@ -406,12 +409,12 @@
         if extra_qp:
             delimiter = '?' if '?' not in auth_path else '&'
             auth_path += delimiter + '&'.join(extra_qp)
-        c_string = boto.utils.canonical_string(method, auth_path, headers,
-                                               expires, self.provider)
-        b64_hmac = self._auth_handler.sign_string(c_string)
-        encoded_canonical = urllib.parse.quote(b64_hmac, safe='')
         self.calling_format.build_path_base(bucket, key)
-        if query_auth:
+        if query_auth and not self.anon:
+            c_string = boto.utils.canonical_string(method, auth_path, headers,
+                                                   expires, self.provider)
+            b64_hmac = self._auth_handler.sign_string(c_string)
+            encoded_canonical = urllib.parse.quote(b64_hmac, safe='')
             query_part = '?' + self.QueryString % (encoded_canonical, expires,
                                                    self.aws_access_key_id)
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto/s3/key.py 
new/boto-2.48.0/boto/s3/key.py
--- old/boto-2.46.1/boto/s3/key.py      2016-12-09 00:55:00.000000000 +0100
+++ new/boto-2.48.0/boto/s3/key.py      2017-05-24 23:20:50.000000000 +0200
@@ -230,6 +230,18 @@
         else:
             self.encrypted = None
 
+    def handle_storage_class_header(self, resp):
+        provider = self.bucket.connection.provider
+        if provider.storage_class_header:
+            self._storage_class = resp.getheader(
+                provider.storage_class_header, None)
+            if (self._storage_class is None and
+                provider.get_provider_name() == 'aws'):
+                # S3 docs for HEAD object requests say S3 will return this
+                # header for all objects except Standard storage class objects.
+                self._storage_class = 'STANDARD'
+
+
     def handle_version_headers(self, resp, force=False):
         provider = self.bucket.connection.provider
         # If the Key object already has a version_id attribute value, it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto.egg-info/PKG-INFO 
new/boto-2.48.0/boto.egg-info/PKG-INFO
--- old/boto-2.46.1/boto.egg-info/PKG-INFO      2017-02-21 02:37:56.000000000 
+0100
+++ new/boto-2.48.0/boto.egg-info/PKG-INFO      2017-07-06 18:41:20.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: boto
-Version: 2.46.1
+Version: 2.48.0
 Summary: Amazon Web Services Library
 Home-page: https://github.com/boto/boto/
 Author: Mitch Garnaat
@@ -9,9 +9,9 @@
 Description: ####
         boto
         ####
-        boto 2.46.1
+        boto 2.48.0
         
-        Released: 20-Feb-2017
+        Released: 24-May-2017
         
         .. image:: https://travis-ci.org/boto/boto.svg?branch=develop
                 :target: https://travis-ci.org/boto/boto
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/boto.egg-info/SOURCES.txt 
new/boto-2.48.0/boto.egg-info/SOURCES.txt
--- old/boto-2.46.1/boto.egg-info/SOURCES.txt   2017-02-21 02:37:56.000000000 
+0100
+++ new/boto-2.48.0/boto.egg-info/SOURCES.txt   2017-07-06 18:41:20.000000000 
+0200
@@ -568,6 +568,8 @@
 docs/source/releasenotes/v2.44.0.rst
 docs/source/releasenotes/v2.45.0.rst
 docs/source/releasenotes/v2.46.1.rst
+docs/source/releasenotes/v2.47.0.rst
+docs/source/releasenotes/v2.48.0.rst
 docs/source/releasenotes/v2.5.0.rst
 docs/source/releasenotes/v2.5.1.rst
 docs/source/releasenotes/v2.5.2.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/docs/source/index.rst 
new/boto-2.48.0/docs/source/index.rst
--- old/boto-2.46.1/docs/source/index.rst       2017-02-21 02:37:00.000000000 
+0100
+++ new/boto-2.48.0/docs/source/index.rst       2017-07-06 18:24:18.000000000 
+0200
@@ -152,6 +152,8 @@
 .. toctree::
    :titlesonly:
 
+   releasenotes/v2.48.0
+   releasenotes/v2.47.0
    releasenotes/v2.46.1
    releasenotes/v2.46.0
    releasenotes/v2.45.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/docs/source/releasenotes/v2.47.0.rst 
new/boto-2.48.0/docs/source/releasenotes/v2.47.0.rst
--- old/boto-2.46.1/docs/source/releasenotes/v2.47.0.rst        1970-01-01 
01:00:00.000000000 +0100
+++ new/boto-2.48.0/docs/source/releasenotes/v2.47.0.rst        2017-05-24 
23:27:38.000000000 +0200
@@ -0,0 +1,15 @@
+Bumped to 2.47.0
+
+boto v2.47.0
+============
+
+:date: 2017/05/24
+
+Adds features for Google Cloud Storage.
+
+Changes
+-------
+* Loosen requirements for ID field in PROJECT_PRIVATE_RE. (:issue:`3729`, 
:sha:`5e85d7c7`)
+* Populate storage class from HEAD Object responses. (:issue:`3691`, 
:sha:`315b76e0`)
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/docs/source/releasenotes/v2.48.0.rst 
new/boto-2.48.0/docs/source/releasenotes/v2.48.0.rst
--- old/boto-2.46.1/docs/source/releasenotes/v2.48.0.rst        1970-01-01 
01:00:00.000000000 +0100
+++ new/boto-2.48.0/docs/source/releasenotes/v2.48.0.rst        2017-07-06 
18:24:18.000000000 +0200
@@ -0,0 +1,17 @@
+Bumped to 2.48.0
+
+boto v2.48.0
+============
+
+:date: 2017/06/29
+
+This release addresses a few S3 related bugs as well as a bug with the recent
+endpoint heuristics feature.
+
+Changes
+-------
+* Fix generate_url() AttributeError when using anonymous connections 
(:issue:`3734`, :sha:`83481807`)
+* Use RegionInfo by default with heuristics (:issue:`3737`, :sha:`0a9b1140`)
+* Allow specifying s3 host from boto config file. (:issue:`3738`, 
:sha:`dcfc7512`)
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/setup.cfg new/boto-2.48.0/setup.cfg
--- old/boto-2.46.1/setup.cfg   2017-02-21 02:37:56.000000000 +0100
+++ new/boto-2.48.0/setup.cfg   2017-07-06 18:41:21.000000000 +0200
@@ -4,4 +4,5 @@
 [egg_info]
 tag_build = 
 tag_date = 0
+tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/tests/integration/gs/test_basic.py 
new/boto-2.48.0/tests/integration/gs/test_basic.py
--- old/boto-2.46.1/tests/integration/gs/test_basic.py  2017-01-26 
21:23:15.000000000 +0100
+++ new/boto-2.48.0/tests/integration/gs/test_basic.py  2017-05-24 
23:20:50.000000000 +0200
@@ -75,12 +75,15 @@
 
 # Regexp for matching project-private default object ACL.
 PROJECT_PRIVATE_RE = ('\s*<AccessControlList>\s*<Entries>\s*<Entry>'
-  '\s*<Scope type="GroupById"><ID>[0-9a-fA-F]+</ID></Scope>'
+  '\s*<Scope type="GroupById">\s*<ID>[-a-zA-Z0-9]+</ID>'
+  '\s*(<Name>[^<]+</Name>)?\s*</Scope>'
   '\s*<Permission>FULL_CONTROL</Permission>\s*</Entry>\s*<Entry>'
-  '\s*<Scope type="GroupById"><ID>[0-9a-fA-F]+</ID></Scope>'
+  '\s*<Scope type="GroupById">\s*<ID>[-a-zA-Z0-9]+</ID>'
+  '\s*(<Name>[^<]+</Name>)?\s*</Scope>'
   '\s*<Permission>FULL_CONTROL</Permission>\s*</Entry>\s*<Entry>'
-  '\s*<Scope type="GroupById"><ID>[0-9a-fA-F]+</ID></Scope>'
-  '\s*<Permission>READ</Permission></Entry>\s*</Entries>'
+  '\s*<Scope type="GroupById">\s*<ID>[-a-zA-Z0-9]+</ID>'
+  '\s*(<Name>[^<]+</Name>)?\s*</Scope>'
+  '\s*<Permission>READ</Permission>\s*</Entry>\s*</Entries>'
   '\s*</AccessControlList>\s*')
 
 
@@ -349,7 +352,9 @@
         uri = storage_uri('gs://' + bucket_name)
         # get default acl and make sure it's project-private
         acl = uri.get_def_acl()
-        self.assertIsNotNone(re.search(PROJECT_PRIVATE_RE, acl.to_xml()))
+        self.assertIsNotNone(
+            re.search(PROJECT_PRIVATE_RE, acl.to_xml()),
+            'PROJECT_PRIVATE_RE not found in ACL XML:\n' + acl.to_xml())
         # set default acl to a canned acl and verify it gets set
         uri.set_def_acl('public-read')
         acl = uri.get_def_acl()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/tests/integration/s3/test_key.py 
new/boto-2.48.0/tests/integration/s3/test_key.py
--- old/boto-2.46.1/tests/integration/s3/test_key.py    2016-12-09 
00:55:00.000000000 +0100
+++ new/boto-2.48.0/tests/integration/s3/test_key.py    2017-07-06 
18:24:02.000000000 +0200
@@ -419,7 +419,10 @@
         remote_metadata = check._get_remote_metadata()
 
         # TODO: investigate whether encoding ' ' as '%20' makes sense
-        self.assertEqual(check.cache_control, 'public,%20max-age=500')
+        self.assertIn(
+            check.cache_control,
+            ('public,%20max-age=500', 'public, max-age=500')
+        )
         self.assertEqual(remote_metadata['cache-control'], 
'public,%20max-age=500')
         self.assertEqual(check.get_metadata('test-plus'), 'A plus (+)')
         self.assertEqual(check.content_disposition, 
'filename=Sch%C3%B6ne%20Zeit.txt')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/tests/unit/s3/test_connection.py 
new/boto-2.48.0/tests/unit/s3/test_connection.py
--- old/boto-2.46.1/tests/unit/s3/test_connection.py    2017-01-26 
21:23:15.000000000 +0100
+++ new/boto-2.48.0/tests/unit/s3/test_connection.py    2017-07-06 
18:24:02.000000000 +0200
@@ -48,6 +48,18 @@
         )
 
 
+class TestAnon(MockServiceWithConfigTestCase):
+    connection_class = S3Connection
+
+    def test_generate_url(self):
+        conn = self.connection_class(
+            anon=True,
+            host='s3.amazonaws.com'
+        )
+        url = conn.generate_url(0, 'GET', bucket='examplebucket', 
key='test.txt')
+        self.assertNotIn('Signature=', url)
+
+
 class TestPresigned(MockServiceWithConfigTestCase):
     connection_class = S3Connection
 
@@ -84,6 +96,8 @@
         self.assertEqual(self.service_connection.host, 's3.amazonaws.com')
 
     def test_sigv4_opt_in(self):
+        host_value = 's3.cn-north-1.amazonaws.com.cn'
+
         # Switch it at the config, so we can check to see how the host is
         # handled.
         self.config = {
@@ -92,6 +106,8 @@
             }
         }
 
+        # Should raise an error if no host is given in either the config or
+        # in connection arguments.
         with self.assertRaises(HostRequiredError):
             # No host+SigV4 == KABOOM
             self.connection_class(
@@ -99,11 +115,32 @@
                 aws_secret_access_key='more'
             )
 
-        # Ensure passing a ``host`` still works.
+        # Ensure passing a ``host`` in the connection args still works.
         conn = self.connection_class(
             aws_access_key_id='less',
             aws_secret_access_key='more',
-            host='s3.cn-north-1.amazonaws.com.cn'
+            host=host_value
+        )
+        self.assertEqual(
+            conn._required_auth_capability(),
+            ['hmac-v4-s3']
+        )
+        self.assertEqual(
+            conn.host,
+            host_value
+        )
+
+        # Ensure that the host is populated from our config if one is not
+        # provided when creating a connection.
+        self.config = {
+            's3': {
+                'host': host_value,
+                'use-sigv4': True,
+            }
+        }
+        conn = self.connection_class(
+            aws_access_key_id='less',
+            aws_secret_access_key='more'
         )
         self.assertEqual(
             conn._required_auth_capability(),
@@ -111,7 +148,7 @@
         )
         self.assertEqual(
             conn.host,
-            's3.cn-north-1.amazonaws.com.cn'
+            host_value
         )
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/tests/unit/test_connect_to_region.py 
new/boto-2.48.0/tests/unit/test_connect_to_region.py
--- old/boto-2.46.1/tests/unit/test_connect_to_region.py        2017-02-21 
00:50:57.000000000 +0100
+++ new/boto-2.48.0/tests/unit/test_connect_to_region.py        2017-07-06 
18:24:02.000000000 +0200
@@ -19,6 +19,8 @@
 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
+import os
+
 from tests.unit import unittest
 
 
@@ -191,6 +193,16 @@
         self.assertIsInstance(connection, DynamoDBConnection)
         self.assertEqual(connection.host, 'dynamodb.us-east-1.amazonaws.com')
 
+    def test_connect_to_unkown_region(self):
+        from boto.dynamodb2 import connect_to_region
+        from boto.dynamodb2.layer1 import DynamoDBConnection
+        os.environ['BOTO_USE_ENDPOINT_HEURISTICS'] = 'True'
+        connection = connect_to_region(
+            'us-east-45', aws_access_key_id='foo',
+            aws_secret_access_key='bar')
+        self.assertIsInstance(connection, DynamoDBConnection)
+        self.assertEqual(connection.host, 'dynamodb.us-east-45.amazonaws.com')
+
 
 class TestEC2Connection(unittest.TestCase):
     def test_connect_to_region(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/boto-2.46.1/tests/unit/test_regioninfo.py 
new/boto-2.48.0/tests/unit/test_regioninfo.py
--- old/boto-2.46.1/tests/unit/test_regioninfo.py       2017-02-21 
00:50:57.000000000 +0100
+++ new/boto-2.48.0/tests/unit/test_regioninfo.py       2017-07-06 
18:24:02.000000000 +0200
@@ -200,6 +200,17 @@
         expected_endpoint = 'ec2.us-southeast-43.amazonaws.com'
         self.assertEqual(connection.region.endpoint, expected_endpoint)
 
+    def test_connect_with_hueristics_without_explicit_regioninfo(self):
+        os.environ['BOTO_USE_ENDPOINT_HEURISTICS'] = 'True'
+        self.addCleanup(os.environ.pop, 'BOTO_USE_ENDPOINT_HEURISTICS')
+        connection = connect(
+            'ec2', 'us-southeast-43', connection_cls=FakeConn)
+        self.assertIsNotNone(connection)
+        self.assertIsInstance(connection.region, RegionInfo)
+        self.assertEqual(connection.region.name, 'us-southeast-43')
+        expected_endpoint = 'ec2.us-southeast-43.amazonaws.com'
+        self.assertEqual(connection.region.endpoint, expected_endpoint)
+
 
 if __name__ == '__main__':
     unittest.main()


Reply via email to