Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1319)

Unified Diff: tools/telemetry/third_party/gsutilz/third_party/six/documentation/index.rst

Issue 1376593003: Roll gsutil version to 4.15. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/third_party/gsutilz/third_party/six/documentation/index.rst
diff --git a/tools/telemetry/third_party/gsutilz/third_party/six/documentation/index.rst b/tools/telemetry/third_party/gsutilz/third_party/six/documentation/index.rst
index 0adadc29c8d6ac04248662b53ce30fb0a9323393..1f274005441d4bb025b14c31867bec5926d4762b 100644
--- a/tools/telemetry/third_party/gsutilz/third_party/six/documentation/index.rst
+++ b/tools/telemetry/third_party/gsutilz/third_party/six/documentation/index.rst
@@ -18,7 +18,7 @@ tracker and code hosting is on `BitBucket <http://bitbucket.org/gutworth/six>`_.
The name, "six", comes from the fact that 2*3 equals 6. Why not addition?
Multiplication is more powerful, and, anyway, "five" has already been snatched
-away by the Zope Five project.
+away by the (admittedly now moribund) Zope Five project.
Indices and tables
@@ -160,7 +160,7 @@ functions and methods is the stdlib :mod:`py3:inspect` module.
.. function:: next(it)
-.. function:: advance_iterator(it)
+ advance_iterator(it)
Get the next item of iterator *it*. :exc:`py3:StopIteration` is raised if
the iterator is exhausted. This is a replacement for calling ``it.next()``
@@ -203,6 +203,27 @@ functions and methods is the stdlib :mod:`py3:inspect` module.
*kwargs* are passed through to the underlying method.
+.. function:: viewkeys(dictionary)
+
+ Return a view over *dictionary*\'s keys. This replaces
+ :meth:`py2:dict.viewkeys` on Python 2.7 and :meth:`py3:dict.keys` on
+ Python 3.
+
+
+.. function:: viewvalues(dictionary)
+
+ Return a view over *dictionary*\'s values. This replaces
+ :meth:`py2:dict.viewvalues` on Python 2.7 and :meth:`py3:dict.values` on
+ Python 3.
+
+
+.. function:: viewitems(dictionary)
+
+ Return a view over *dictionary*\'s items. This replaces
+ :meth:`py2:dict.viewitems` on Python 2.7 and :meth:`py3:dict.items` on
+ Python 3.
+
+
.. function:: create_bound_method(func, obj)
Return a method object wrapping *func* and bound to *obj*. On both Python 2
@@ -222,7 +243,7 @@ functions and methods is the stdlib :mod:`py3:inspect` module.
aliased to :class:`py3:object`.)
-.. function:: wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES)
+.. decorator:: wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES)
This is exactly the :func:`py3:functools.wraps` decorator, but it sets the
``__wrapped__`` attribute on what it decorates as :func:`py3:functools.wraps`
@@ -249,10 +270,11 @@ Python 2 and 3.
:func:`exec` with them should be avoided.
-.. function:: print_(*args, *, file=sys.stdout, end="\\n", sep=" ")
+.. function:: print_(*args, *, file=sys.stdout, end="\\n", sep=" ", flush=False)
Print *args* into *file*. Each argument will be separated with *sep* and
- *end* will be written to the file after the last argument is printed.
+ *end* will be written to the file after the last argument is printed. If
+ *flush* is true, ``file.flush()`` will be called after all data is written.
.. note::
@@ -261,6 +283,13 @@ Python 2 and 3.
ok. :)
+.. function:: raise_from(exc_value, exc_value_from)
+
+ Raise an exception from a context. On Python 3, this is equivalent to
+ ``raise exc_value from exc_value_from``. On Python 2, which does not support
+ exception chaining, it is equivalent to ``raise exc_value``.
+
+
.. function:: reraise(exc_type, exc_value, exc_traceback=None)
Reraise an exception, possibly with a different traceback. In the simple
@@ -292,7 +321,7 @@ Python 2 and 3.
decorator.
-.. function:: add_metaclass(metaclass)
+.. decorator:: add_metaclass(metaclass)
Class decorator that replaces a normally-constructed class with a
metaclass-constructed one. Example usage: ::
@@ -409,6 +438,48 @@ string data in all Python versions.
:class:`py3:io.BytesIO`.
+.. decorator:: python_2_unicode_compatible
+
+ A class decorator that takes a class defining a ``__str__`` method. On
+ Python 3, the decorator does nothing. On Python 2, it aliases the
+ ``__str__`` method to ``__unicode__`` and creates a new ``__str__`` method
+ that returns the result of ``__unicode__()`` encoded with UTF-8.
+
+
+unittest assertions
+>>>>>>>>>>>>>>>>>>>
+
+Six contains compatibility shims for unittest assertions that have been renamed.
+The parameters are the same as their aliases, but you must pass the test method
+as the first argument. For example::
+
+ import six
+ import unittest
+
+ class TestAssertCountEqual(unittest.TestCase):
+ def test(self):
+ six.assertCountEqual(self, (1, 2), [2, 1])
+
+Note these functions are only available on Python 2.7 or later.
+
+.. function:: assertCountEqual()
+
+ Alias for :meth:`~py3:unittest.TestCase.assertCountEqual` on Python 3 and
+ :meth:`~py2:unittest.TestCase.assertItemsEqual` on Python 2.
+
+
+.. function:: assertRaisesRegex()
+
+ Alias for :meth:`~py3:unittest.TestCase.assertRaisesRegex` on Python 3 and
+ :meth:`~py2:unittest.TestCase.assertRaisesRegexp` on Python 2.
+
+
+.. function:: assertRegex()
+
+ Alias for :meth:`~py3:unittest.TestCase.assertRegex` on Python 3 and
+ :meth:`~py2:unittest.TestCase.assertRegexpMatches` on Python 2.
+
+
Renamed modules and attributes compatibility
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Powered by Google App Engine
This is Rietveld 408576698