€cdocutils.nodes document q)q}q(U nametypesq}q(X porting guideqNX compat moduleqNXporting to python 3 reduxqˆX%porting to python 3 an in-depth guideq ˆX porting stepsq NXsix documentationq ˆuUsubstitution_defsq }q Uparse_messagesq]qUcurrent_sourceqNU decorationqNUautofootnote_startqKUnameidsq}q(hU porting-guideqhU compat-moduleqhUporting-to-python-3-reduxqh U%porting-to-python-3-an-in-depth-guideqh U porting-stepsqh Usix-documentationquUchildrenq]qcdocutils.nodes section q)q}q(U rawsourceq UUparentq!hUsourceq"XC/Users/kyleknap/Documents/GitHub/boto/docs/source/porting_guide.rstq#Utagnameq$Usectionq%U attributesq&}q'(Udupnamesq(]Uclassesq)]Ubackrefsq*]Uidsq+]q,haUnamesq-]q.hauUlineq/KUdocumentq0hh]q1(cdocutils.nodes title q2)q3}q4(h X Porting Guideq5h!hh"h#h$Utitleq6h&}q7(h(]h)]h*]h+]h-]uh/Kh0hh]q8cdocutils.nodes Text q9X Porting Guideq:…q;}q<(h h5h!h3ubaubcdocutils.nodes paragraph q=)q>}q?(h X«Boto supports Python versions 2.6, 2.7, 3.3, and 3.4. Python 3 support is on a per-module basis. This guide will help you to get started porting a Boto module to Python 3.q@h!hh"h#h$U paragraphqAh&}qB(h(]h)]h*]h+]h-]uh/Kh0hh]qCh9X«Boto supports Python versions 2.6, 2.7, 3.3, and 3.4. Python 3 support is on a per-module basis. This guide will help you to get started porting a Boto module to Python 3.qD…qE}qF(h h@h!h>ubaubh=)qG}qH(h XPPlease read the :doc:`Contributing Guide ` before getting started.h!hh"h#h$hAh&}qI(h(]h)]h*]h+]h-]uh/Kh0hh]qJ(h9XPlease read the qK…qL}qM(h XPlease read the h!hGubcsphinx.addnodes pending_xref qN)qO}qP(h X(:doc:`Contributing Guide `qQh!hGh"h#h$U pending_xrefqRh&}qS(UreftypeXdocqTUrefwarnqUˆU reftargetqVX contributingU refdomainUh+]h*]U refexplicitˆh(]h)]h-]UrefdocqWX porting_guideqXuh/Kh]qYcdocutils.nodes literal qZ)q[}q\(h hQh&}q](h(]h)]q^(Uxrefq_hTeh*]h+]h-]uh!hOh]q`h9XContributing Guideqa…qb}qc(h Uh!h[ubah$Uliteralqdubaubh9X before getting started.qe…qf}qg(h X before getting started.h!hGubeubh)qh}qi(h Uh!hh"h#h$h%h&}qj(h(]h)]h*]h+]qkhah-]qlhauh/K h0hh]qm(h2)qn}qo(h X Compat Moduleqph!hhh"h#h$h6h&}qq(h(]h)]h*]h+]h-]uh/K h0hh]qrh9X Compat Moduleqs…qt}qu(h hph!hnubaubh=)qv}qw(h XBoto ships with a ``boto.compat`` module that helps to abstract the differences between Python versions. A vendored version of the ``six`` module is exposed through ``boto.compat.six``, as well as a handful of moved functions used throughout the codebase::h!hhh"h#h$hAh&}qx(h(]h)]h*]h+]h-]uh/K h0hh]qy(h9XBoto ships with a qz…q{}q|(h XBoto ships with a h!hvubhZ)q}}q~(h X``boto.compat``h&}q(h(]h)]h*]h+]h-]uh!hvh]q€h9X boto.compatq…q‚}qƒ(h Uh!h}ubah$hdubh9Xb module that helps to abstract the differences between Python versions. A vendored version of the q„…q…}q†(h Xb module that helps to abstract the differences between Python versions. A vendored version of the h!hvubhZ)q‡}qˆ(h X``six``h&}q‰(h(]h)]h*]h+]h-]uh!hvh]qŠh9Xsixq‹…qŒ}q(h Uh!h‡ubah$hdubh9X module is exposed through qŽ…q}q(h X module is exposed through h!hvubhZ)q‘}q’(h X``boto.compat.six``h&}q“(h(]h)]h*]h+]h-]uh!hvh]q”h9Xboto.compat.sixq•…q–}q—(h Uh!h‘ubah$hdubh9XG, as well as a handful of moved functions used throughout the codebase:q˜…q™}qš(h XG, as well as a handful of moved functions used throughout the codebase:h!hvubeubcdocutils.nodes literal_block q›)qœ}q(h Xº# Import the six module from boto.compat import six # Other useful imports from boto.compat import BytesIO, StringIO from boto.compat import http_client from boto.compat import urlparseh!hhh"h#h$U literal_blockqžh&}qŸ(U xml:spaceq Upreserveq¡h+]h*]h(]h)]h-]uh/Kh0hh]q¢h9Xº# Import the six module from boto.compat import six # Other useful imports from boto.compat import BytesIO, StringIO from boto.compat import http_client from boto.compat import urlparseq£…q¤}q¥(h Uh!hœubaubh=)q¦}q§(h X®Please check the ``boto.compat`` module before writing your own logic around specialized behavior for different Python versions. Feel free to add new functionality here, too.h!hhh"h#h$hAh&}q¨(h(]h)]h*]h+]h-]uh/Kh0hh]q©(h9XPlease check the qª…q«}q¬(h XPlease check the h!h¦ubhZ)q­}q®(h X``boto.compat``h&}q¯(h(]h)]h*]h+]h-]uh!h¦h]q°h9X boto.compatq±…q²}q³(h Uh!h­ubah$hdubh9XŽ module before writing your own logic around specialized behavior for different Python versions. Feel free to add new functionality here, too.q´…qµ}q¶(h XŽ module before writing your own logic around specialized behavior for different Python versions. Feel free to add new functionality here, too.h!h¦ubeubeubh)q·}q¸(h Uh!hh"h#h$h%h&}q¹(h(]h)]h*]h+]qºhah-]q»h auh/Kh0hh]q¼(h2)q½}q¾(h X Porting Stepsq¿h!h·h"h#h$h6h&}qÀ(h(]h)]h*]h+]h-]uh/Kh0hh]qÁh9X Porting StepsqÂ…qÃ}qÄ(h h¿h!h½ubaubh=)qÅ}qÆ(h X8Please follow the following steps when porting a module:qÇh!h·h"h#h$hAh&}qÈ(h(]h)]h*]h+]h-]uh/Kh0hh]qÉh9X8Please follow the following steps when porting a module:qÊ…qË}qÌ(h hÇh!hÅubaubcdocutils.nodes bullet_list qÍ)qÎ}qÏ(h Uh!h·h"h#h$U bullet_listqÐh&}qÑ(UbulletqÒX*h+]h*]h(]h)]h-]uh/K!h0hh]qÓ(cdocutils.nodes list_item qÔ)qÕ}qÖ(h X/Install Python versions and ``pip install tox``q×h!hÎh"h#h$U list_itemqØh&}qÙ(h(]h)]h*]h+]h-]uh/Nh0hh]qÚh=)qÛ}qÜ(h h×h!hÕh"h#h$hAh&}qÝ(h(]h)]h*]h+]h-]uh/K!h]qÞ(h9XInstall Python versions and qß…qà}qá(h XInstall Python versions and h!hÛubhZ)qâ}qã(h X``pip install tox``h&}qä(h(]h)]h*]h+]h-]uh!hÛh]qåh9Xpip install toxqæ…qç}qè(h Uh!hâubah$hdubeubaubhÔ)qé}qê(h X”Port your module to support Python 3. These help: * `Six documentation`_ * `Porting to Python 3 An in-depth guide`_ * `Porting to Python 3 Redux`_ h!hÎh"Nh$hØh&}që(h(]h)]h*]h+]h-]uh/Nh0hh]qì(h=)qí}qî(h X1Port your module to support Python 3. These help:qïh!héh"h#h$hAh&}qð(h(]h)]h*]h+]h-]uh/K"h]qñh9X1Port your module to support Python 3. These help:qò…qó}qô(h hïh!híubaubhÍ)qõ}qö(h Uh&}q÷(hÒX*h+]h*]h(]h)]h-]uh!héh]qø(hÔ)qù}qú(h X`Six documentation`_qûh&}qü(h(]h)]h*]h+]h-]uh!hõh]qýh=)qþ}qÿ(h hûh!hùh"h#h$hAh&}r(h(]h)]h*]h+]h-]uh/K$h]rcdocutils.nodes reference r)r}r(h hûUresolvedrKh!hþh$U referencerh&}r(UnameXSix documentationUrefurirXhttp://pythonhosted.org/six/r h+]h*]h(]h)]h-]uh]r h9XSix documentationr …r }r (h Uh!jubaubaubah$hØubhÔ)r}r(h X(`Porting to Python 3 An in-depth guide`_rh&}r(h(]h)]h*]h+]h-]uh!hõh]rh=)r}r(h jh!jh"h#h$hAh&}r(h(]h)]h*]h+]h-]uh/K%h]rj)r}r(h jjKh!jh$jh&}r(UnameX%Porting to Python 3 An in-depth guidejXhttp://python3porting.com/rh+]h*]h(]h)]h-]uh]rh9X%Porting to Python 3 An in-depth guider…r}r(h Uh!jubaubaubah$hØubhÔ)r}r (h X`Porting to Python 3 Redux`_ h&}r!(h(]h)]h*]h+]h-]uh!hõh]r"h=)r#}r$(h X`Porting to Python 3 Redux`_r%h!jh"h#h$hAh&}r&(h(]h)]h*]h+]h-]uh/K&h]r'j)r(}r)(h j%jKh!j#h$jh&}r*(UnameXPorting to Python 3 ReduxjX<http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/r+h+]h*]h(]h)]h-]uh]r,h9XPorting to Python 3 Reduxr-…r.}r/(h Uh!j(ubaubaubah$hØubeh$hÐubeubhÔ)r0}r1(h X7Whitelist your module's unit tests in ``tests/test.py``r2h!hÎh"h#h$hØh&}r3(h(]h)]h*]h+]h-]uh/Nh0hh]r4h=)r5}r6(h j2h!j0h"h#h$hAh&}r7(h(]h)]h*]h+]h-]uh/K(h]r8(h9X&Whitelist your module's unit tests in r9…r:}r;(h X&Whitelist your module's unit tests in h!j5ubhZ)r<}r=(h X``tests/test.py``h&}r>(h(]h)]h*]h+]h-]uh!j5h]r?h9X tests/test.pyr@…rA}rB(h Uh!j<ubah$hdubeubaubhÔ)rC}rD(h X,Make sure unit tests pass by running ``tox``rEh!hÎh"h#h$hØh&}rF(h(]h)]h*]h+]h-]uh/Nh0hh]rGh=)rH}rI(h jEh!jCh"h#h$hAh&}rJ(h(]h)]h*]h+]h-]uh/K)h]rK(h9X%Make sure unit tests pass by running rL…rM}rN(h X%Make sure unit tests pass by running h!jHubhZ)rO}rP(h X``tox``h&}rQ(h(]h)]h*]h+]h-]uh!jHh]rRh9XtoxrS…rT}rU(h Uh!jOubah$hdubeubaubhÔ)rV}rW(h X¨Try running integration tests:: tox tests/integration/yourmodule # You can also run against a specific Python version: tox -e py26 tests/integration/yourmodule h!hÎh"h#h$hØh&}rX(h(]h)]h*]h+]h-]uh/Nh0hh]rY(h=)rZ}r[(h XTry running integration tests::h!jVh"h#h$hAh&}r\(h(]h)]h*]h+]h-]uh/K*h]r]h9XTry running integration tests:r^…r_}r`(h XTry running integration tests:h!jZubaubh›)ra}rb(h X€tox tests/integration/yourmodule # You can also run against a specific Python version: tox -e py26 tests/integration/yourmoduleh!jVh$hžh&}rc(h h¡h+]h*]h(]h)]h-]uh/K,h]rdh9X€tox tests/integration/yourmodule # You can also run against a specific Python version: tox -e py26 tests/integration/yourmodulere…rf}rg(h Uh!jaubaubeubhÔ)rh}ri(h X,Fix any failing tests. This is the fun part!rjh!hÎh"h#h$hØh&}rk(h(]h)]h*]h+]h-]uh/Nh0hh]rlh=)rm}rn(h jjh!jhh"h#h$hAh&}ro(h(]h)]h*]h+]h-]uh/K1h]rph9X,Fix any failing tests. This is the fun part!rq…rr}rs(h jjh!jmubaubaubhÔ)rt}ru(h XIf code you modified is not covered by tests, try to cover it with existing tests or write new tests. Here is how you can generate a coverage report in ``cover/index.html``:: # Run a test with coverage tox -e py33 -- default --with-coverage --cover-html --cover-package boto h!hÎh"h#h$hØh&}rv(h(]h)]h*]h+]h-]uh/Nh0hh]rw(h=)rx}ry(h X®If code you modified is not covered by tests, try to cover it with existing tests or write new tests. Here is how you can generate a coverage report in ``cover/index.html``::h!jth"h#h$hAh&}rz(h(]h)]h*]h+]h-]uh/K2h]r{(h9X˜If code you modified is not covered by tests, try to cover it with existing tests or write new tests. Here is how you can generate a coverage report in r|…r}}r~(h X˜If code you modified is not covered by tests, try to cover it with existing tests or write new tests. Here is how you can generate a coverage report in h!jxubhZ)r}r€(h X``cover/index.html``h&}r(h(]h)]h*]h+]h-]uh!jxh]r‚h9Xcover/index.htmlrƒ…r„}r…(h Uh!jubah$hdubh9X:…r†}r‡(h X:h!jxubeubh›)rˆ}r‰(h Xc# Run a test with coverage tox -e py33 -- default --with-coverage --cover-html --cover-package botoh!jth$hžh&}rŠ(h h¡h+]h*]h(]h)]h-]uh/K6h]r‹h9Xc# Run a test with coverage tox -e py33 -- default --with-coverage --cover-html --cover-package botorŒ…r}rŽ(h Uh!jˆubaubeubhÔ)r}r(h X_Update ``README.rst`` and ``docs/source/index.rst`` to label your module as supporting Python 3h!hÎh"h#h$hØh&}r‘(h(]h)]h*]h+]h-]uh/Nh0hh]r’h=)r“}r”(h X_Update ``README.rst`` and ``docs/source/index.rst`` to label your module as supporting Python 3h!jh"h#h$hAh&}r•(h(]h)]h*]h+]h-]uh/K9h]r–(h9XUpdate r—…r˜}r™(h XUpdate h!j“ubhZ)rš}r›(h X``README.rst``h&}rœ(h(]h)]h*]h+]h-]uh!j“h]rh9X README.rstrž…rŸ}r (h Uh!jšubah$hdubh9X and r¡…r¢}r£(h X and h!j“ubhZ)r¤}r¥(h X``docs/source/index.rst``h&}r¦(h(]h)]h*]h+]h-]uh!j“h]r§h9Xdocs/source/index.rstr¨…r©}rª(h Uh!j¤ubah$hdubh9X, to label your module as supporting Python 3r«…r¬}r­(h X, to label your module as supporting Python 3h!j“ubeubaubhÔ)r®}r¯(h XSubmit a pull request! h!hÎh"h#h$hØh&}r°(h(]h)]h*]h+]h-]uh/Nh0hh]r±h=)r²}r³(h XSubmit a pull request!r´h!j®h"h#h$hAh&}rµ(h(]h)]h*]h+]h-]uh/K;h]r¶h9XSubmit a pull request!r·…r¸}r¹(h j´h!j²ubaubaubeubh=)rº}r»(h XÂNote: We try our best to clean up resources after a test runs, but you should double check that no resources are left after integration tests run. If they are, then you will be charged for them!r¼h!h·h"h#h$hAh&}r½(h(]h)]h*]h+]h-]uh/K=h0hh]r¾h9XÂNote: We try our best to clean up resources after a test runs, but you should double check that no resources are left after integration tests run. If they are, then you will be charged for them!r¿…rÀ}rÁ(h j¼h!jºubaubcdocutils.nodes target rÂ)rÃ}rÄ(h X3.. _Six documentation: http://pythonhosted.org/six/U referencedrÅKh!h·h"h#h$UtargetrÆh&}rÇ(jj h+]rÈhah*]h(]h)]h-]rÉh auh/KAh0hh]ubjÂ)rÊ}rË(h XE.. _Porting to Python 3 An in-depth guide: http://python3porting.com/jÅKh!h·h"h#h$jÆh&}rÌ(jjh+]rÍhah*]h(]h)]h-]rÎh auh/KBh0hh]ubjÂ)rÏ}rÐ(h X[.. _Porting to Python 3 Redux: http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/jÅKh!h·h"h#h$jÆh&}rÑ(jj+h+]rÒhah*]h(]h)]h-]rÓhauh/KCh0hh]ubeubeubah UU transformerrÔNU footnote_refsrÕ}rÖUrefnamesr×}rØ(Xporting to python 3 redux]rÙj(aX%porting to python 3 an in-depth guide]rÚjaXsix documentation]rÛjauUsymbol_footnotesrÜ]rÝUautofootnote_refsrÞ]rßUsymbol_footnote_refsrà]ráU citationsrâ]rãh0hU current_lineräNUtransform_messagesrå]ræUreporterrçNUid_startrèKU autofootnotesré]rêU citation_refsrë}rìUindirect_targetsrí]rîUsettingsrï(cdocutils.frontend Values rðorñ}rò(Ufootnote_backlinksróKUrecord_dependenciesrôNU rfc_base_urlrõUhttp://tools.ietf.org/html/röU tracebackr÷ˆUpep_referencesrøNUstrip_commentsrùNU toc_backlinksrúUentryrûU language_coderüUenrýU datestamprþNU report_levelrÿKU _destinationrNU halt_levelrKU strip_classesrNh6NUerror_encoding_error_handlerrUbackslashreplacerUdebugrNUembed_stylesheetr‰Uoutput_encoding_error_handlerrUstrictrU sectnum_xformr KUdump_transformsr NU docinfo_xformr KUwarning_streamr NUpep_file_url_templater Upep-%04drUexit_status_levelrKUconfigrNUstrict_visitorrNUcloak_email_addressesrˆUtrim_footnote_reference_spacer‰UenvrNUdump_pseudo_xmlrNUexpose_internalsrNUsectsubtitle_xformr‰U source_linkrNUrfc_referencesrNUoutput_encodingrUutf-8rU source_urlrNUinput_encodingrU utf-8-sigrU_disable_configrNU id_prefixr UU tab_widthr!KUerror_encodingr"UUTF-8r#U_sourcer$h#Ugettext_compactr%ˆU generatorr&NUdump_internalsr'NU smart_quotesr(‰U pep_base_urlr)Uhttp://www.python.org/dev/peps/r*Usyntax_highlightr+Ulongr,Uinput_encoding_error_handlerr-jUauto_id_prefixr.Uidr/Udoctitle_xformr0‰Ustrip_elements_with_classesr1NU _config_filesr2]r3Ufile_insertion_enabledr4ˆU raw_enabledr5KU dump_settingsr6NubUsymbol_footnote_startr7KUidsr8}r9(hjÊhhhjÃhhhhh·hjÏuUsubstitution_namesr:}r;h$h0h&}r<(h(]h+]h*]Usourceh#h)]h-]uU footnotesr=]r>Urefidsr?}r@ub.