Permalink
Browse files

Merge branch 'release-2.9.5'

* release-2.9.5:
  Bumping version to 2.9.5
  Updated release notes.
  Fixed a bug where an instance variable was not present in the low-level DynamoDB client.
  Added release notes for v2.9.5.
  Fixed headers in EC2 autodocs.
  Added support for web identity federation.
  Updated tests to accommodate the changes to ``_build_filters``.
  Solving bugs on empty results and between comparisions
  Added a failing test for no results to DDBv2.
  Added tests for the EBS Optimized change.
  Modifiy EbsOptimized param type in LauchConfig.
  Fix unit test
  Added tests for the dynamodb2 region fix.
  Fix a bug always connecting to the default end point in dynamodb2's DynamoDBConnecting
  Update release notes to use the new sphinx roles
  Add sphinx extension for linking to github
  Make s3 key buffer size configurable.
  • Loading branch information...
2 parents 9bffa78 + f21e933 commit c6118201920858c18a7fe6a8a86b4f418f4ce78d @toastdriven toastdriven committed May 29, 2013
View
@@ -1,9 +1,9 @@
####
boto
####
-boto 2.9.4
+boto 2.9.5
-Released: 20-May-2013
+Released: 28-May-2013
.. image:: https://travis-ci.org/boto/boto.png?branch=develop
:target: https://travis-ci.org/boto/boto
View
@@ -36,7 +36,7 @@
import urlparse
from boto.exception import InvalidUriError
-__version__ = '2.9.4'
+__version__ = '2.9.5'
Version = __version__ # for backware compatibility
UserAgent = 'Boto/%s (%s)' % (__version__, sys.platform)
View
@@ -63,13 +63,16 @@ def __init__(self, **kwargs):
if not region:
region_name = boto.config.get('DynamoDB', 'region',
self.DefaultRegionName)
- region = RegionInfo(self, region_name,
- self.DefaultRegionEndpoint)
+ for reg in boto.dynamodb2.regions():
+ if reg.name == region_name:
+ region = reg
+ break
kwargs['host'] = region.endpoint
AWSQueryConnection.__init__(self, **kwargs)
self.region = region
self._validate_checksums = boto.config.getbool(
'DynamoDB', 'validate_checksums', validate_checksums)
+ self.throughput_exceeded_events = 0
def _required_auth_capability(self):
return ['hmac-v4']
@@ -58,7 +58,10 @@ def next(self):
self.fetch_more()
- return self._results[self._offset]
+ if self._offset < len(self._results):
+ return self._results[self._offset]
+ else:
+ raise StopIteration()
def to_call(self, the_callable, *args, **kwargs):
"""
View
@@ -611,12 +611,7 @@ def _build_filters(self, filter_kwargs, using=QUERY_OPERATORS):
'AttributeValueList': [],
'ComparisonOperator': op,
}
-
- # Fix up the value for encoding, because it was built to only work
- # with ``set``s.
- if isinstance(value, (list, tuple)):
- value = set(value)
-
+
# Special-case the ``NULL/NOT_NULL`` case.
if field_bits[-1] == 'null':
del lookup['AttributeValueList']
@@ -625,7 +620,20 @@ def _build_filters(self, filter_kwargs, using=QUERY_OPERATORS):
lookup['ComparisonOperator'] = 'NOT_NULL'
else:
lookup['ComparisonOperator'] = 'NULL'
+ # Special-case the ``BETWEEN`` case.
+ elif field_bits[-1] == 'between':
+ if len(value) == 2 and isinstance(value, (list, tuple)):
+ lookup['AttributeValueList'].append(
+ self._dynamizer.encode(value[0])
+ )
+ lookup['AttributeValueList'].append(
+ self._dynamizer.encode(value[1])
+ )
else:
+ # Fix up the value for encoding, because it was built to only work
+ # with ``set``s.
+ if isinstance(value, (list, tuple)):
+ value = set(value)
lookup['AttributeValueList'].append(
self._dynamizer.encode(value)
)
@@ -238,9 +238,9 @@ def create_launch_configuration(self, launch_config):
if launch_config.instance_profile_name is not None:
params['IamInstanceProfile'] = launch_config.instance_profile_name
if launch_config.ebs_optimized:
- params['EbsOptimized'] = True
+ params['EbsOptimized'] = 'true'
else:
- params['EbsOptimized'] = False
+ params['EbsOptimized'] = 'false'
return self.get_object('CreateLaunchConfiguration', params,
Request, verb='POST')
View
@@ -82,7 +82,7 @@ class Key(object):
</RestoreRequest>"""
- BufferSize = 8192
+ BufferSize = boto.config.getint('Boto', 'key_buffer_size', 8192)
# The object metadata fields a user can set, other than custom metadata
# fields (i.e., those beginning with a provider-specific prefix like
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -2,9 +2,13 @@
import os
import boto
+import sys
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
-autoclass_content="both"
+sys.path.append(os.path.join(os.path.dirname(__file__), 'extensions'))
+
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
+ 'githublinks']
+autoclass_content = "both"
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
@@ -22,6 +26,7 @@
u'Mitch Garnaat', 'manual'),
]
intersphinx_mapping = {'http://docs.python.org/': None}
+github_project_url = 'https://github.com/boto/boto/'
try:
release = os.environ.get('SVN_REVISION', 'HEAD')
@@ -0,0 +1,55 @@
+"""Add github roles to sphinx docs.
+
+Based entirely on Doug Hellmann's bitbucket version, but
+adapted for Github.
+(https://bitbucket.org/dhellmann/sphinxcontrib-bitbucket/)
+
+"""
+from urlparse import urljoin
+
+from docutils import nodes, utils
+from docutils.parsers.rst.roles import set_classes
+
+
+def make_node(rawtext, app, type_, slug, options):
+ base_url = app.config.github_project_url
+ if base_url is None:
+ raise ValueError(
+ "Configuration value for 'github_project_url' is not set.")
+ relative = '%s/%s' % (type_, slug)
+ full_ref = urljoin(base_url, relative)
+ set_classes(options)
+ if type_ == 'issues':
+ type_ = 'issue'
+ node = nodes.reference(rawtext, type_ + ' ' + utils.unescape(slug),
+ refuri=full_ref, **options)
+ return node
+
+
+def github_sha(name, rawtext, text, lineno, inliner,
+ options={}, content=[]):
+ app = inliner.document.settings.env.app
+ node = make_node(rawtext, app, 'commit', text, options)
+ return [node], []
+
+
+def github_issue(name, rawtext, text, lineno, inliner,
+ options={}, content=[]):
+ try:
+ issue = int(text)
+ except ValueError:
+ msg = inliner.reporter.error(
+ "Invalid Github Issue '%s', must be an integer" % text,
+ line=lineno)
+ problem = inliner.problematic(rawtext, rawtext, msg)
+ return [problem], [msg]
+ app = inliner.document.settings.env.app
+ node = make_node(rawtext, app, 'issues', str(issue), options)
+ return [node], []
+
+
+def setup(app):
+ app.info('Adding github link roles')
+ app.add_role('sha', github_sha)
+ app.add_role('issue', github_issue)
+ app.add_config_value('github_project_url', None, 'env')
View
@@ -111,6 +111,8 @@ Release Notes
.. toctree::
:titlesonly:
+ releasenotes/v2.9.5
+ releasenotes/v2.9.4
releasenotes/v2.9.3
releasenotes/v2.9.2
releasenotes/v2.9.1
View
@@ -57,12 +57,12 @@ boto.ec2.ec2object
:undoc-members:
boto.ec2.elb
--------------------
+------------
See the :doc:`ELB Reference <elb>`.
boto.ec2.group
-----------------
+--------------
.. automodule:: boto.ec2.group
:members:
@@ -90,7 +90,7 @@ boto.ec2.instanceinfo
:undoc-members:
boto.ec2.instancestatus
---------------------------
+-----------------------
.. automodule:: boto.ec2.instancestatus
:members:
@@ -104,21 +104,21 @@ boto.ec2.keypair
:undoc-members:
boto.ec2.launchspecification
-----------------
+----------------------------
.. automodule:: boto.ec2.launchspecification
:members:
:undoc-members:
boto.ec2.networkinterface
-----------------
+-------------------------
.. automodule:: boto.ec2.networkinterface
:members:
:undoc-members:
boto.ec2.placementgroup
-----------------
+-----------------------
.. automodule:: boto.ec2.placementgroup
:members:
@@ -160,14 +160,14 @@ boto.ec2.spotinstancerequest
:undoc-members:
boto.ec2.tag
-----------------------------
+------------
.. automodule:: boto.ec2.tag
:members:
:undoc-members:
boto.ec2.vmtype
-----------------------------
+---------------
.. automodule:: boto.ec2.vmtype
:members:
@@ -27,22 +27,22 @@ Features
u'case-...'
The :ref:`Support Tutorial <support_tut>` has more information on how to use
- the new API. (SHA: 8c0451)
+ the new API. (:sha:`8c0451`)
Bugfixes
--------
* The reintroduction of ``ResumableUploadHandler.get_upload_id`` that was
- accidentally removed in a previous commit. (SHA: 758322)
+ accidentally removed in a previous commit. (:sha:`758322`)
* Added ``OrdinaryCallingFormat`` to support Google Storage's certificate
- verification. (SHA: 4ca83b)
-* Added the ``eu-west-1`` region for Redshift. (SHA: e98b95)
+ verification. (:sha:`4ca83b`)
+* Added the ``eu-west-1`` region for Redshift. (:sha:`e98b95`)
* Added support for overriding the port any connection in ``boto`` uses.
- (SHA: 08e893)
-* Added retry/checksumming support to the DynamoDB v2 client. (SHA: 969ae2)
+ (:sha:`08e893`)
+* Added retry/checksumming support to the DynamoDB v2 client. (:sha:`969ae2`)
* Several documentation improvements/fixes:
- * Incorrect docs on EC2's ``import_key_pair``. (SHA: 6ada7d)
- * Clearer docs on the DynamoDB ``count`` parameter. (SHA: dfa456)
- * Fixed a typo in the ``autoscale_tut``. (SHA: 6df1ae)
+ * Incorrect docs on EC2's ``import_key_pair``. (:sha:`6ada7d`)
+ * Clearer docs on the DynamoDB ``count`` parameter. (:sha:`dfa456`)
+ * Fixed a typo in the ``autoscale_tut``. (:sha:`6df1ae`)
@@ -15,4 +15,4 @@ Features
Bugfixes
--------
-* Fixed the missing ``boto.support`` in ``setup.py``. (SHA: 9ac196)
+* Fixed the missing ``boto.support`` in ``setup.py``. (:sha:`9ac196`)
@@ -12,42 +12,42 @@ Features
--------
* ELB support in Opsworks - You can now attach & describe the Elastic Load
- Balancers within the Opsworks client. (SHA: ecda87)
+ Balancers within the Opsworks client. (:sha:`ecda87`)
* Optimized EBS support in EC2 AutoScale - You can now specify whether an
- AutoScale instance should be optimized for EBS I/O. (SHA: f8acaa)
+ AutoScale instance should be optimized for EBS I/O. (:sha:`f8acaa`)
* Parallel Scan support in DynamoDB v2 - If you have extra read capacity &
a large amount of data, you can scan over the records in parallel by
telling DynamoDB to split the table into segments, then spinning up
- threads/processes to each run over their own segment. (SHA: db7f7b & 7ed73c)
+ threads/processes to each run over their own segment. (:sha:`db7f7b` & :sha:`7ed73c`)
* Higher-level interface to DynamoDB v2 - A more convenient API for using
DynamoDB v2. The :ref:`DynamoDB v2 Tutorial <dynamodb2_tut>` has more
- information on how to use the new API. (SHA: 0f7c8b)
+ information on how to use the new API. (:sha:`0f7c8b`)
Backward-Incompatible Changes
-----------------------------
* API Update for DataPipeline - The ``error_code`` (integer) argument to
``set_task_status`` changed to ``error_id`` (string). Many documentation
- updates were also added. (SHA: a78572)
+ updates were also added. (:sha:`a78572`)
Bugfixes
--------
-* Bumped the AWS Support API version. (SHA: 0323f4)
+* Bumped the AWS Support API version. (:sha:`0323f4`)
* Fixed the S3 ``ResumableDownloadHandler`` so that it no longer tries to use
- a hashing algorithm when used outside of GCS. (SHA: 29b046)
-* Fixed a bug where Sig V4 URIs were improperly canonicalized. (SHA: 5269d8)
-* Fixed a bug where Sig V4 ports were not included. (SHA: cfaba3)
+ a hashing algorithm when used outside of GCS. (:sha:`29b046`)
+* Fixed a bug where Sig V4 URIs were improperly canonicalized. (:sha:`5269d8`)
+* Fixed a bug where Sig V4 ports were not included. (:sha:`cfaba3`)
* Fixed a bug in CloudWatch's ``build_put_params`` that would overwrite
- existing/necessary variables. (SHA: 550e00)
+ existing/necessary variables. (:sha:`550e00`)
* Several documentation improvements/fixes:
- * Added docs for RDS ``modify/modify_dbinstance``. (SHA: 777d73)
- * Fixed a typo in the ``README.rst``. (SHA: 181e0f)
- * Documentation fallout from the previous release. (SHA: 14a111)
- * Fixed a typo in the EC2 ``Image.run`` docs. (SHA: 5edd6a)
- * Added/improved docs for EC2 ``Image.run``. (SHA: 773ce5)
- * Added a CONTRIBUTING doc. (SHA: cecbe8)
- * Fixed S3 ``create_bucket`` docs to specify "European Union". (SHA: ddddfd)
+ * Added docs for RDS ``modify/modify_dbinstance``. (:sha:`777d73`)
+ * Fixed a typo in the ``README.rst``. (:sha:`181e0f`)
+ * Documentation fallout from the previous release. (:sha:`14a111`)
+ * Fixed a typo in the EC2 ``Image.run`` docs. (:sha:`5edd6a`)
+ * Added/improved docs for EC2 ``Image.run``. (:sha:`773ce5`)
+ * Added a CONTRIBUTING doc. (:sha:`cecbe8`)
+ * Fixed S3 ``create_bucket`` docs to specify "European Union". (:sha:`ddddfd`)
@@ -11,20 +11,20 @@ Features
--------
* Updated Elastic Transcoder support - It now supports HLS, WebM, MPEG2-TS & a
- host of `other features`_. (SHA: 89196a)
+ host of `other features`_. (:sha:`89196a`)
.. _`other features`: http://aws.typepad.com/aws/2013/05/new-features-for-the-amazon-elastic-transcoder.html
Bugfixes
--------
-* Fixed a bug in the canonicalization of URLs on Windows. (SHA: 09ef8c)
-* Fixed glacier part size bug (issue: 1478, SHA: 9e04171)
+* Fixed a bug in the canonicalization of URLs on Windows. (:sha:`09ef8c`)
+* Fixed glacier part size bug (:issue:`1478`, :sha:`9e04171`)
* Fixed a bug in the bucket regex for S3 involving capital letters.
- (SHA: 950031)
+ (:sha:`950031`)
* Fixed a bug where timestamps from Cloudformation would fail to be parsed.
- (SHA: b40542)
+ (:sha:`b40542`)
* Several documentation improvements/fixes:
- * Added autodocs for many of the EC2 apis. (SHA: 79f939)
+ * Added autodocs for many of the EC2 apis. (:sha:`79f939`)
Oops, something went wrong.

0 comments on commit c611820

Please sign in to comment.