Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release-2.39.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JordonPhillips committed Jan 19, 2016
2 parents 5cc5326 + 30abc14 commit 3f8f02c
Show file tree
Hide file tree
Showing 95 changed files with 2,085 additions and 327 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "pypy"
env:
- BOTO_CONFIG=/tmp/nowhere
before_install:
- sudo apt-get update
- sudo apt-get --reinstall install -qq language-pack-en language-pack-de
Expand Down
45 changes: 45 additions & 0 deletions CONTRIBUTING
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,48 @@ Reporting An Issue/Feature
resolved sooner.


Maintenance
===========

You do not have to be labeled as a
"maintainer" to be able to help with the triaging, resolving, and
reviewing of boto issues and pull requests.

These are the processes that the maintainers follow, that you can also
follow to help speed up the resolution of an issue or pull request:

Pull Requests
-------------
There are some key points that are needed to be met before a pull request
can be merged:

* All tests must pass for all python versions.
* All pull requests require tests that either test the new feature or test
that the specific bug is fixed. Pull requests for minor things like
adding a new region or fixing a typo do not need tests.
* Must follow PEP8 conventions.
* All changes must be backwards compatible.
* If the pull request is for a feature, make sure a link to the corresponding
API is provided in order to easily check that the feature matches up
with the service's API.

The best way to help with pull requests is to comment on pull requests by
noting if any of these key points are missing, it will both help get feedback
sooner to the issuer of the pull request and make it easier to determine for
an individual with write permissions to the repository if a pull request
is ready to be merged.

Issues
------
Here are the best ways to help with open issues:

* If there is an issue without a set of instructions on how to reproduce the
bug, feel free to try to reproduce the issue, comment with the minimal
amount of steps to reproduce the bug (a code snippet would be ideal). If
there is not a set of steps that can be made to reproduce the issue, at
least make sure there are debug logs that capture the unexpected behavior.

* Consolidate all related issue to one issues by closing out related issues
and linking them to the single issue that outlines the general issue.

* Submit pull requests for open issues.
31 changes: 19 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
####
boto
####
boto 2.38.0
boto 2.39.0

Released: 9-Apr-2015

Expand All @@ -11,6 +11,24 @@ Released: 9-Apr-2015
.. image:: https://pypip.in/d/boto/badge.svg
:target: https://pypi.python.org/pypi/boto/

******
Boto 3
******

`Boto3 <https://github.com/boto/boto3>`__, the next version of Boto, is now
stable and recommended for general use. It can be used side-by-side with Boto
in the same project, so it is easy to start using Boto3 in your existing
projects as well as new projects. Going forward, API updates and all new
feature work will be focused on Boto3.

To assist users who still depend on Boto and cannot immediately switch over, we
will be triaging and addressing critical issues and PRs in Boto in the short
term. As more users make the switch to Boto3, we expect to reduce our
maintenance involvement over time. If we decide on a cutoff date or any
significant changes to our maintenance plan, we will make pre-announcements
well ahead of schedule to allow ample time for our users to adapt/migrate.


************
Introduction
************
Expand All @@ -26,17 +44,6 @@ and the `Porting Guide`_. If you would like, you can open an issue to let
others know about your work in progress. Tests **must** pass on Python
2.6, 2.7, 3.3, and 3.4 for pull requests to be accepted.

******
Boto 3
******
The next major version of Boto is currently in developer preview and can
be found in the `Boto 3 <https://github.com/boto/boto3#readme>`__
repository and installed via ``pip``. It supports the latest service APIs
and provides a high-level object-oriented interface to many services.

Please try Boto 3 and
`leave feedback <https://github.com/boto/boto3/issues>`__ with any issues,
suggestions, and feature requests you might have.

********
Services
Expand Down
2 changes: 1 addition & 1 deletion bin/cfadmin
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ if __name__ == "__main__":
cmd = help
try:
cmd(cf, *args)
except TypeError, e:
except TypeError as e:
print e
help(cf, cmd.__name__)
4 changes: 2 additions & 2 deletions bin/cq
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ def main():
if queue_name:
try:
rs = [c.create_queue(queue_name)]
except SQSError, e:
except SQSError as e:
print 'An Error Occurred:'
print '%s: %s' % (e.status, e.reason)
print e.body
sys.exit()
else:
try:
rs = c.get_all_queues()
except SQSError, e:
except SQSError as e:
print 'An Error Occurred:'
print '%s: %s' % (e.status, e.reason)
print e.body
Expand Down
2 changes: 1 addition & 1 deletion bin/cwutil
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ if __name__ == "__main__":
cmd = help
try:
cmd(*args)
except TypeError, e:
except TypeError as e:
print e
help(cmd.__name__)
3 changes: 2 additions & 1 deletion bin/dynamodb_dump
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import os

import boto
from boto.compat import json
from boto.compat import six


DESCRIPTION = """Dump the contents of one or more DynamoDB tables to the local filesystem.
Expand Down Expand Up @@ -39,7 +40,7 @@ def dump_table(table, out_dir):
for item in table.scan():
# JSON can't serialize sets -- convert those to lists.
data = {}
for k, v in item.iteritems():
for k, v in six.iteritems(item):
if isinstance(v, (set, frozenset)):
data[k] = list(v)
else:
Expand Down
3 changes: 2 additions & 1 deletion bin/dynamodb_load
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import os

import boto
from boto.compat import json
from boto.compat import six
from boto.dynamodb.schema import Schema


Expand Down Expand Up @@ -61,7 +62,7 @@ def load_table(table, in_fd):
for i in _json_iterload(in_fd):
# Convert lists back to sets.
data = {}
for k, v in i.iteritems():
for k, v in six.iteritems(i):
if isinstance(v, list):
data[k] = set(v)
else:
Expand Down
3 changes: 2 additions & 1 deletion bin/elbadmin
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def get(elb, name):

# Make map of all instance Id's to Name tags
import boto
from boto.compat.six import iteritems
if not options.region:
ec2 = boto.connect_ec2()
else:
Expand All @@ -127,7 +128,7 @@ def get(elb, name):
if i.id in instances:
names[i.id] = i.tags.get('Name', '')

name_column_width = max([4] + [len(v) for k,v in names.iteritems()]) + 2
name_column_width = max([4] + [len(v) for k,v in iteritems(names)]) + 2

print "Instances"
print "---------"
Expand Down
2 changes: 1 addition & 1 deletion bin/route53
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@ if __name__ == "__main__":
cmd = help
try:
cmd(conn, *args)
except TypeError, e:
except TypeError as e:
print e
help(conn, cmd.__name__)
2 changes: 1 addition & 1 deletion boto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from boto.compat import urlparse
from boto.exception import InvalidUriError

__version__ = '2.38.0'
__version__ = '2.39.0'
Version = __version__ # for backware compatibility

# http://bugs.python.org/issue7980
Expand Down
8 changes: 5 additions & 3 deletions boto/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@
# by default.
SIGV4_DETECT = [
'.cn-',
# In eu-central we support both host styles for S3
# In eu-central and ap-northeast-2 we support both host styles for S3
'.eu-central',
'-eu-central',
'.ap-northeast-2',
'-ap-northeast-2'
]


Expand Down Expand Up @@ -878,8 +880,8 @@ def __init__(self, *args, **kw):
def _calc_signature(self, params, *args):
boto.log.debug('using _calc_signature_1')
hmac = self._get_hmac()
keys = params.keys()
keys.sort(cmp=lambda x, y: cmp(x.lower(), y.lower()))
keys = list(params.keys())
keys.sort(key=lambda x: x.lower())
pairs = []
for key in keys:
hmac.update(key.encode('utf-8'))
Expand Down
32 changes: 0 additions & 32 deletions boto/cacerts/cacerts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,6 @@ BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
70+sB3c4
-----END CERTIFICATE-----

Verisign Class 3 Public Primary Certification Authority
=======================================================
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
Tqj/ZA1k
-----END CERTIFICATE-----

Verisign Class 3 Public Primary Certification Authority - G2
============================================================
-----BEGIN CERTIFICATE-----
Expand Down Expand Up @@ -2613,22 +2597,6 @@ MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o
tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA==
-----END CERTIFICATE-----

Verisign Class 3 Public Primary Certification Authority
=======================================================
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky
CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX
bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/
D/xwzoiQ
-----END CERTIFICATE-----

Microsec e-Szigno Root CA 2009
==============================
-----BEGIN CERTIFICATE-----
Expand Down
4 changes: 2 additions & 2 deletions boto/cloudfront/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,12 @@ def create_signed_url(self, url, keypair_id,
:param expire_time: The expiry time of the URL. If provided, the URL
will expire after the time has passed. If not provided the URL will
never expire. Format is a unix epoch.
Use time.time() + duration_in_sec.
Use int(time.time() + duration_in_sec).
:type valid_after_time: int
:param valid_after_time: If provided, the URL will not be valid until
after valid_after_time. Format is a unix epoch.
Use time.time() + secs_until_valid.
Use int(time.time() + secs_until_valid).
:type ip_address: str
:param ip_address: If provided, only allows access from the specified
Expand Down
4 changes: 2 additions & 2 deletions boto/cloudfront/invalidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def __setitem__(self, k, v):
self.paths[k] = v

def escape(self, p):
"""Escape a path, make sure it begins with a slash and contains no invalid characters"""
"""Escape a path, make sure it begins with a slash and contains no invalid characters. Retain literal wildcard characters."""
if not p[0] == "/":
p = "/%s" % p
return urllib.parse.quote(p)
return urllib.parse.quote(p, safe = "/*")

def to_xml(self):
"""Get this batch as XML"""
Expand Down
12 changes: 12 additions & 0 deletions boto/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,26 @@
from boto.vendored.six.moves.queue import Queue
from boto.vendored.six.moves.urllib.parse import parse_qs, quote, unquote, \
urlparse, urlsplit
from boto.vendored.six.moves.urllib.parse import unquote_plus
from boto.vendored.six.moves.urllib.request import urlopen

if six.PY3:
# StandardError was removed, so use the base exception type instead
StandardError = Exception
long_type = int
from configparser import ConfigParser
unquote_str = unquote_plus
else:
StandardError = StandardError
long_type = long
from ConfigParser import SafeConfigParser as ConfigParser

def unquote_str(value, encoding='utf-8'):
# In python2, unquote() gives us a string back that has the urldecoded
# bits, but not the unicode parts. We need to decode this manually.
# unquote has special logic in which if it receives a unicode object it
# will decode it to latin1. This is hard coded. To avoid this, we'll
# encode the string with the passed in encoding before trying to
# unquote it.
byte_string = value.encode(encoding)
return unquote_plus(byte_string).decode(encoding)
6 changes: 5 additions & 1 deletion boto/configservice/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ def put_configuration_recorder(self, configuration_recorder):
:type configuration_recorder: dict
:param configuration_recorder: The configuration recorder object that
records each configuration change made to the resources.
records each configuration change made to the resources. The
format should follow:
{'name': 'myrecorder',
'roleARN': 'arn:aws:iam::123456789012:role/trusted-aws-config'}
"""
params = {'ConfigurationRecorder': configuration_recorder, }
Expand Down
2 changes: 1 addition & 1 deletion boto/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def new_http_connection(self, host, port, is_secure):

# Make sure the host is really just the host, not including
# the port number
host = host.split(':', 1)[0]
host = boto.utils.parse_host(host)

http_connection_kwargs = self.http_connection_kwargs.copy()

Expand Down
2 changes: 1 addition & 1 deletion boto/contrib/ymlmessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, queue=None, body='', xml_attrs=None):
super(YAMLMessage, self).__init__(queue, body)

def set_body(self, body):
self.data = yaml.load(body)
self.data = yaml.safe_load(body)

def get_body(self):
return yaml.dump(self.data)
2 changes: 1 addition & 1 deletion boto/dynamodb/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def decode(self, attr):
the appropriate python type.
"""
if len(attr) > 1 or not attr:
if len(attr) > 1 or not attr or is_str(attr):
return attr
dynamodb_type = list(attr.keys())[0]
if dynamodb_type.lower() == dynamodb_type:
Expand Down
Loading

0 comments on commit 3f8f02c

Please sign in to comment.