diff --git a/AUTHORS b/AUTHORS index 4ef7a6ce7..a0f897753 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,8 +13,8 @@ Patches and Contributions - Andrés Martano - Antonio Lourenco - Arnau Orriols -- Arthur Burkart - Artem Kolesnikov +- Arthur Burkart - Ashley Roach - Ben Demaree - Bjorn Andersson @@ -115,6 +115,7 @@ Patches and Contributions - Olivier Poitrey - Ondrej Slinták - Or Neeman +- Pahaz Blinov - Patrick Decat - Pau Freixes - Paul Doucet diff --git a/CHANGES b/CHANGES index 58ff772dc..bb89614e5 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Version 0.8 Python 2.6. - Dev: all branches are now tested on travis-ci. Previously, only 'master' was being tested. +- Docs: code snippets are now Python 3 compatibile (Pahaz Blinov). Breaking Changes ................ diff --git a/docs/features.rst b/docs/features.rst index efdc78134..9323c4a17 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -1108,10 +1108,10 @@ You can subscribe to these events with multiple callback functions. .. code-block:: pycon >>> def pre_get_callback(resource, request, lookup): - ... print 'A GET request on the "%s" endpoint has just been received!' % resource + ... print('A GET request on the "%s" endpoint has just been received!' % resource) >>> def pre_contacts_get_callback(request, lookup): - ... print 'A GET request on the contacts endpoint has just been received!' + ... print('A GET request on the contacts endpoint has just been received!') >>> app = Eve() @@ -1159,10 +1159,10 @@ payload. .. code-block:: pycon >>> def post_get_callback(resource, request, payload): - ... print 'A GET on the "%s" endpoint was just performed!' % resource + ... print('A GET on the "%s" endpoint was just performed!' % resource) >>> def post_contacts_get_callback(request, payload): - ... print 'A get on "contacts" was just performed!' + ... print('A get on "contacts" was just performed!') >>> app = Eve() @@ -1301,16 +1301,16 @@ the items as needed before they are returned to the client. .. code-block:: pycon >>> def before_returning_items(resource_name, response): - ... print 'About to return items from "%s" ' % resource_name + ... print('About to return items from "%s" ' % resource_name) >>> def before_returning_contacts(response): - ... print 'About to return contacts' + ... print('About to return contacts') >>> def before_returning_item(resource_name, response): - ... print 'About to return an item from "%s" ' % resource_name + ... print('About to return an item from "%s" ' % resource_name) >>> def before_returning_contact(response): - ... print 'About to return a contact' + ... print('About to return a contact') >>> app = Eve() >>> app.on_fetched_resource += before_returning_items @@ -1360,10 +1360,10 @@ Example: .. code-block:: pycon >>> def before_insert(resource_name, items): - ... print 'About to store items to "%s" ' % resource + ... print('About to store items to "%s" ' % resource) >>> def after_insert_contacts(items): - ... print 'About to store contacts' + ... print('About to store contacts') >>> app = Eve() >>> app.on_insert += before_insert