From 4d8ae2a694815ba617964605b40148f5a457799f Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Sun, 13 Mar 2016 17:30:57 +0100 Subject: [PATCH 1/6] I fail to see how Mule would help in Continuous Integration scenarios afaik Mule is an Enterprise Service Bus, which can be useful in enterprise application integration scenarios, but imo it is really is not useful in the context of continuous integration of Python programs. --- docs/scenarios/ci.rst | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/scenarios/ci.rst b/docs/scenarios/ci.rst index 43b4220..aa8d196 100644 --- a/docs/scenarios/ci.rst +++ b/docs/scenarios/ci.rst @@ -31,17 +31,6 @@ Buildbot automate the compile/test cycle to validate code changes. -Mule ------ - -`Mule `_ -is a lightweight integration platform that enables you to connect anything, -anywhere. You can use Mule to intelligently manage message routing, data -mapping, orchestration, reliability, security and scalability between nodes. -Plug other systems and applications into Mule and let it handle all the -communication between systems, enabling you to track and monitor everything -that happens. - Tox --- From a37543f242625fa199a10ec8a4a64f1d021a530b Mon Sep 17 00:00:00 2001 From: Joachim Jablon Date: Thu, 17 Mar 2016 00:25:34 +0100 Subject: [PATCH 2/6] Fixes #686 --- docs/writing/structure.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/writing/structure.rst b/docs/writing/structure.rst index 7cde9da..6448dba 100644 --- a/docs/writing/structure.rst +++ b/docs/writing/structure.rst @@ -658,8 +658,10 @@ And now the generator approach using Python's own @contextmanager def custom_open(filename): f = open(filename) - yield f - f.close() + try: + yield f + finally: + f.close() with custom_open('file') as f: contents = f.read() @@ -667,7 +669,9 @@ And now the generator approach using Python's own This works in exactly the same way as the class example above, albeit it's more terse. The ``custom_open`` function executes until it reaches the ``yield`` statement. It then gives control back to the ``with`` statement, which assigns -whatever was ``yield``'ed to `f` in the ``as f`` portion. +whatever was ``yield``'ed to `f` in the ``as f`` portion. The ``finally`` clause +ensures that ``close()`` is called whether or not there was an exception inside +the ``with``. Since the two approaches appear the same, we should follow the Zen of Python to decide when to use which. The class approach might be better if there's From 49192a4317bc3d68bf0e43822a4151ae743254f0 Mon Sep 17 00:00:00 2001 From: Adam Liter Date: Sat, 19 Mar 2016 22:44:22 -0400 Subject: [PATCH 3/6] Updates command for installing Homebrew As can be seen on the Homebrew website (http://brew.sh/), it seems that Homebrew is now recommending that you install Homebrew by calling `/usr/bin/ruby` instead of just `ruby`. --- docs/starting/install/osx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/starting/install/osx.rst b/docs/starting/install/osx.rst index cb0062c..b401c55 100644 --- a/docs/starting/install/osx.rst +++ b/docs/starting/install/osx.rst @@ -45,7 +45,7 @@ your favorite OSX terminal emulator and run .. code-block:: console - $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" The script will explain what changes it will make and prompt you before the installation begins. From 6b4d013f52b241df97827cb73bd1a9d148634603 Mon Sep 17 00:00:00 2001 From: remcodraijer Date: Thu, 24 Mar 2016 12:27:57 +0100 Subject: [PATCH 4/6] Changed summary line of docstring to follow PEP 0257 Quoting https://www.python.org/dev/peps/pep-0257/#one-line-docstrings The docstring is a phrase ending in a period. It prescribes the function or method's effect as a command ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...". --- docs/writing/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/writing/tests.rst b/docs/writing/tests.rst index f014bfd..19e7ec0 100644 --- a/docs/writing/tests.rst +++ b/docs/writing/tests.rst @@ -116,7 +116,7 @@ A simple doctest in a function: .. code-block:: python def square(x): - """Squares x. + """Square x. >>> square(2) 4 From 02d68a86ed9a9bfce9bad6aa532646cfcbda67b6 Mon Sep 17 00:00:00 2001 From: remcodraijer Date: Thu, 24 Mar 2016 12:33:39 +0100 Subject: [PATCH 5/6] Changed summary line of docstring to follow PEP 0257 - update Quoting https://www.python.org/dev/peps/pep-0257/#one-line-docstrings "The docstring is a phrase ending in a period. It prescribes the function or method's effect as a command ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...". --- docs/writing/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/writing/tests.rst b/docs/writing/tests.rst index 19e7ec0..84e5d27 100644 --- a/docs/writing/tests.rst +++ b/docs/writing/tests.rst @@ -116,7 +116,7 @@ A simple doctest in a function: .. code-block:: python def square(x): - """Square x. + """Return the square of x. >>> square(2) 4 From cc6a4c03a8ee0d1dbbeaf50d0dfc2eaaa8f04bd7 Mon Sep 17 00:00:00 2001 From: Carlos de la Guardia Date: Wed, 30 Mar 2016 23:53:51 -0600 Subject: [PATCH 6/6] Remove inaccurate comparison of Pyramid to Django. Ass proposed in #693. --- docs/scenarios/web.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/scenarios/web.rst b/docs/scenarios/web.rst index 19cddec..9dd3928 100644 --- a/docs/scenarios/web.rst +++ b/docs/scenarios/web.rst @@ -102,9 +102,9 @@ I do not recommend using Tornado unless you think you need it. Pyramid -------- -`Pyramid `_ is a lot like Django, except -with a heavier focus on modularity. It comes with a smaller number of -libraries ("batteries") built-in, and encourages users to extend its +`Pyramid `_ is a very flexible +framework with a heavy focus on modularity. It comes with a small number +of libraries ("batteries") built-in, and encourages users to extend its base functionality. Pyramid does not have a large user base, unlike Django and Flask. It's a