openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2014
- 1 participants
- 1539 discussions
Hello community,
here is the log from the commit of package python3-six for openSUSE:Factory checked in at 2014-05-09 06:58:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-six (Old)
and /work/SRC/openSUSE:Factory/.python3-six.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-six"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-six/python3-six.changes 2014-02-26 06:55:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-six.new/python3-six.changes 2014-05-09 06:58:59.000000000 +0200
@@ -1,0 +2,13 @@
+Thu May 8 11:52:39 UTC 2014 - toddrme2178(a)gmail.com
+
+- update to 1.6.1:
+ - Raise an AttributeError for six.moves.X when X is a module not available in
+ the current interpreter.
+ - Raise an AttributeError for every attribute of unimportable modules.
+ - Issue #56: Make the fake modules six.moves puts into sys.modules appear not to
+ have a __path__ unless they are loaded.
+ - Pull request #28: Add support for SplitResult.
+ - Issue #55: Add move mapping for xmlrpc.server.
+ - Pull request #29: Add move for urllib.parse.splitquery.
+
+-------------------------------------------------------------------
Old:
----
six-1.5.2.tar.gz
New:
----
six-1.6.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-six.spec ++++++
--- /var/tmp/diff_new_pack.p0j1oH/_old 2014-05-09 06:58:59.000000000 +0200
+++ /var/tmp/diff_new_pack.p0j1oH/_new 2014-05-09 06:58:59.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-six
-Version: 1.5.2
+Version: 1.6.1
Release: 0
Url: http://pypi.python.org/pypi/six/
Summary: Python 2 and 3 compatibility utilities
++++++ six-1.5.2.tar.gz -> six-1.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/CHANGES new/six-1.6.1/CHANGES
--- old/six-1.5.2/CHANGES 2014-01-06 16:53:20.000000000 +0100
+++ new/six-1.6.1/CHANGES 2014-03-14 04:36:39.000000000 +0100
@@ -1,8 +1,28 @@
-Changelog for Six
------------------
+Changelog for six
+=================
This file lists the changes in each six version.
+1.6.1
+-----
+
+- Raise an AttributeError for six.moves.X when X is a module not available in
+ the current interpreter.
+
+1.6.0
+-----
+
+- Raise an AttributeError for every attribute of unimportable modules.
+
+- Issue #56: Make the fake modules six.moves puts into sys.modules appear not to
+ have a __path__ unless they are loaded.
+
+- Pull request #28: Add support for SplitResult.
+
+- Issue #55: Add move mapping for xmlrpc.server.
+
+- Pull request #29: Add move for urllib.parse.splitquery.
+
1.5.2
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/PKG-INFO new/six-1.6.1/PKG-INFO
--- old/six-1.5.2/PKG-INFO 2014-01-06 16:57:41.000000000 +0100
+++ new/six-1.6.1/PKG-INFO 2014-03-14 04:39:28.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: six
-Version: 1.5.2
+Version: 1.6.1
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/documentation/conf.py new/six-1.6.1/documentation/conf.py
--- old/six-1.5.2/documentation/conf.py 2013-09-15 15:52:34.000000000 +0200
+++ new/six-1.6.1/documentation/conf.py 2014-01-10 04:44:36.000000000 +0100
@@ -33,7 +33,7 @@
# General information about the project.
project = u"six"
-copyright = u"2010, Benjamin Peterson"
+copyright = u"2010-2014, Benjamin Peterson"
sys.path.append(os.path.abspath(os.path.join(".", "..")))
from six import __version__ as six_version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/documentation/index.rst new/six-1.6.1/documentation/index.rst
--- old/six-1.5.2/documentation/index.rst 2014-01-04 19:22:33.000000000 +0100
+++ new/six-1.6.1/documentation/index.rst 2014-03-14 03:56:36.000000000 +0100
@@ -438,6 +438,28 @@
functionality; its structure mimics the structure of the Python 3
:mod:`py3:urllib` package.
+.. note::
+
+ In order to make imports of the form::
+
+ from six.moves.cPickle import loads
+
+ work, six places special proxy objects in in :data:`py3:sys.modules`. These
+ proxies lazily load the underlying module when an attribute is fetched. This
+ will fail if the underlying module is not available in the Python
+ interpreter. For example, ``sys.modules["six.moves.winreg"].LoadKey`` would
+ fail on any non-Windows platform. Unfortunately, some applications try to
+ load attributes on every module in :data:`py3:sys.modules`. six mitigates
+ this problem for some applications by pretending attributes on unimportable
+ modules don't exist. This hack doesn't work in every case, though. If you are
+ encountering problems with the lazy modules and don't use any from imports
+ directly from ``six.moves`` modules, you can workaround the issue by removing
+ the six proxy modules::
+
+ d = [name for name in sys.modules if name.startswith("six.moves.")]
+ for name in d:
+ del sys.modules[name]
+
Supported renames:
+------------------------------+-------------------------------------+-------------------------------------+
@@ -545,7 +567,9 @@
+------------------------------+-------------------------------------+-------------------------------------+
| ``winreg`` | :mod:`py2:_winreg` | :mod:`py3:winreg` |
+------------------------------+-------------------------------------+-------------------------------------+
-| ``xmlrpc_client`` | :mod:`py2:xmlrpclib` | :mod:`py3:xmlrpclib` |
+| ``xmlrpc_client`` | :mod:`py2:xmlrpclib` | :mod:`py3:xmlrpc.client` |
++------------------------------+-------------------------------------+-------------------------------------+
+| ``xmlrpc_server`` | :mod:`py2:SimpleXMLRPCServer` | :mod:`py3:xmlrpc.server` |
+------------------------------+-------------------------------------+-------------------------------------+
| ``xrange`` | :func:`py2:xrange` | :func:`py3:range` |
+------------------------------+-------------------------------------+-------------------------------------+
@@ -565,6 +589,7 @@
:mod:`py2:urlparse`:
* :func:`py2:urlparse.ParseResult`
+* :func:`py2:urlparse.SplitResult`
* :func:`py2:urlparse.urlparse`
* :func:`py2:urlparse.urlunparse`
* :func:`py2:urlparse.parse_qs`
@@ -573,6 +598,7 @@
* :func:`py2:urlparse.urldefrag`
* :func:`py2:urlparse.urlsplit`
* :func:`py2:urlparse.urlunsplit`
+* :func:`py2:urlparse.splitquery`
and :mod:`py2:urllib`:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/six.egg-info/PKG-INFO new/six-1.6.1/six.egg-info/PKG-INFO
--- old/six-1.5.2/six.egg-info/PKG-INFO 2014-01-06 16:57:40.000000000 +0100
+++ new/six-1.6.1/six.egg-info/PKG-INFO 2014-03-14 04:39:28.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: six
-Version: 1.5.2
+Version: 1.6.1
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/six.py new/six-1.6.1/six.py
--- old/six-1.5.2/six.py 2014-01-06 16:54:24.000000000 +0100
+++ new/six-1.6.1/six.py 2014-03-14 04:38:01.000000000 +0100
@@ -25,7 +25,7 @@
import types
__author__ = "Benjamin Peterson <benjamin(a)python.org>"
-__version__ = "1.5.2"
+__version__ = "1.6.1"
# Useful for very coarse version differentiation.
@@ -83,7 +83,11 @@
self.name = name
def __get__(self, obj, tp):
- result = self._resolve()
+ try:
+ result = self._resolve()
+ except ImportError:
+ # See the nice big comment in MovedModule.__getattr__.
+ raise AttributeError("%s could not be imported " % self.name)
setattr(obj, self.name, result) # Invokes __set__.
# This is a bit ugly, but it avoids running this again.
delattr(obj.__class__, self.name)
@@ -105,15 +109,22 @@
return _import_module(self.mod)
def __getattr__(self, attr):
- # Hack around the Django autoreloader. The reloader tries to get
- # __file__ or __name__ of every module in sys.modules. This doesn't work
- # well if this MovedModule is for an module that is unavailable on this
- # machine (like winreg on Unix systems). Thus, we pretend __file__ and
- # __name__ don't exist if the module hasn't been loaded yet. See issues
- # #51 and #53.
- if attr in ("__file__", "__name__") and self.mod not in sys.modules:
- raise AttributeError
- _module = self._resolve()
+ # It turns out many Python frameworks like to traverse sys.modules and
+ # try to load various attributes. This causes problems if this is a
+ # platform-specific module on the wrong platform, like _winreg on
+ # Unixes. Therefore, we silently pretend unimportable modules do not
+ # have any attributes. See issues #51, #53, #56, and #63 for the full
+ # tales of woe.
+ #
+ # First, if possible, avoid loading the module just to look at __file__,
+ # __name__, or __path__.
+ if (attr in ("__file__", "__name__", "__path__") and
+ self.mod not in sys.modules):
+ raise AttributeError(attr)
+ try:
+ _module = self._resolve()
+ except ImportError:
+ raise AttributeError(attr)
value = getattr(_module, attr)
setattr(self, attr, value)
return value
@@ -222,6 +233,7 @@
MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
+ MovedModule("xmlrpc_server", "xmlrpclib", "xmlrpc.server"),
MovedModule("winreg", "_winreg"),
]
for attr in _moved_attributes:
@@ -241,6 +253,7 @@
_urllib_parse_moved_attributes = [
MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
+ MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
@@ -254,6 +267,7 @@
MovedAttribute("unquote", "urllib", "urllib.parse"),
MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
MovedAttribute("urlencode", "urllib", "urllib.parse"),
+ MovedAttribute("splitquery", "urllib", "urllib.parse"),
]
for attr in _urllib_parse_moved_attributes:
setattr(Module_six_moves_urllib_parse, attr.name, attr)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.5.2/test_six.py new/six-1.6.1/test_six.py
--- old/six-1.5.2/test_six.py 2014-01-05 17:21:00.000000000 +0100
+++ new/six-1.6.1/test_six.py 2014-03-14 04:30:44.000000000 +0100
@@ -113,7 +113,8 @@
if item_name.startswith("dbm_gnu") and not have_gdbm:
py.test.skip("requires gdbm")
raise
- assert item_name in dir(six.moves)
+ if sys.version_info[:2] >= (2, 6):
+ assert item_name in dir(six.moves)
@py.test.mark.parametrize("item_name",
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-scipy for openSUSE:Factory checked in at 2014-05-09 06:58:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-scipy (Old)
and /work/SRC/openSUSE:Factory/.python3-scipy.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-scipy"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-scipy/python3-scipy.changes 2014-03-02 18:22:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-scipy.new/python3-scipy.changes 2014-05-09 06:58:49.000000000 +0200
@@ -1,0 +2,128 @@
+Thu May 8 10:16:00 UTC 2014 - toddrme2178(a)gmail.com
+
+- Update to version 0.14.0
+ * New features
+ * scipy.interpolate improvements
+ * A new wrapper function `scipy.interpolate.interpn` for
+ interpolation onregular grids has been added. `interpn`
+ supports linear and nearest-neighbor interpolation in
+ arbitrary dimensions and spline interpolation in two
+ dimensions.
+ * Faster implementations of piecewise polynomials in power
+ and Bernstein polynomial bases have been added as
+ `scipy.interpolate.PPoly` and `scipy.interpolate.BPoly`.
+ New users should use these in favor of
+ `scipy.interpolate.PiecewisePolynomial`.
+ * `scipy.interpolate.interp1d` now accepts non-monotonic
+ inputs and sorts them. If performance is critical, sorting
+ can be turned off by using the new ``assume_sorted``
+ keyword.
+ * Functionality for evaluation of bivariate spline
+ derivatives in ``scipy.interpolate`` has been added.
+ * The new class `scipy.interpolate.Akima1DInterpolator`
+ implements the piecewise cubic polynomial interpolation
+ scheme devised by H. Akima.
+ * Functionality for fast interpolation on regular, unevenly
+ spaced grids in arbitrary dimensions has been added as
+ `scipy.interpolate.RegularGridInterpolator` .
+ * ``scipy.linalg`` improvements
+ * The new function `scipy.linalg.dft` computes the matrix of
+ the discrete Fourier transform.
+ * A condition number estimation function for matrix
+ exponential, `scipy.linalg.expm_cond`, has been added.
+ * ``scipy.optimize`` improvements
+ * A set of benchmarks for optimize, which can be run with
+ ``optimize.bench()``, has been added.
+ * `scipy.optimize.curve_fit` now has more controllable error
+ estimation via the ``absolute_sigma`` keyword.
+ * Support for passing custom minimization methods to
+ ``optimize.minimize()`` and ``optimize.minimize_scalar()``
+ has been added, currently useful especially for combining
+ ``optimize.basinhopping()`` with custom local optimizer
+ routines.
+ * ``scipy.stats`` improvements
+ * A new class `scipy.stats.multivariate_normal` with
+ functionality for multivariate normal random variables
+ has been added.
+ * A lot of work on the ``scipy.stats`` distribution framework
+ has been done. Moment calculations (skew and kurtosis
+ mainly) are fixed and verified, all examples are now
+ runnable, and many small accuracy and performance
+ improvements for individual distributions were merged.
+ * The new function `scipy.stats.anderson_ksamp` computes the
+ k-sample Anderson-Darling test for the null hypothesis that
+ k samples come from the same parent population.
+ * ``scipy.signal`` improvements
+ * ``scipy.signal.iirfilter`` and related functions to design
+ Butterworth, Chebyshev, elliptical and Bessel IIR filters
+ now all use pole-zero ("zpk") format internally instead of
+ using transformations to numerator/denominator format.
+ The accuracy of the produced filters, especially high-order
+ ones, is improved significantly as a result.
+ * The new function `scipy.signal.vectorstrength` computes the
+ vector strength, a measure of phase synchrony, of a set of
+ events.
+ * ``scipy.special`` improvements
+ * The functions `scipy.special.boxcox` and
+ `scipy.special.boxcox1p`, which compute the
+ Box-Cox transformation, have been added.
+ * ``scipy.sparse`` improvements
+ * Significant performance improvement in CSR, CSC, and DOK
+ indexing speed.
+ * When using Numpy >= 1.9 (to be released in MM 2014), sparse
+ matrices function correctly when given to arguments of
+ ``np.dot``, ``np.multiply`` and other ufuncs.
+ With earlier Numpy and Scipy versions, the results of such
+ operations are undefined and usually unexpected.
+ * Sparse matrices are no longer limited to ``2^31`` nonzero
+ elements. They automatically switch to using 64-bit index
+ data type for matrices containing more elements. User code
+ written assuming the sparse matrices use int32 as the index
+ data type will continue to work, except for such large
+ matrices. Code dealing with larger matrices needs to accept
+ either int32 or int64 indices.
+ * Deprecated features
+ * ``anneal``
+ * The global minimization function `scipy.optimize.anneal` is
+ deprecated. All users should use the
+ `scipy.optimize.basinhopping` function instead.
+ * ``scipy.stats``
+ * ``randwcdf`` and ``randwppf`` functions are deprecated.
+ All users should use distribution-specific ``rvs`` methods
+ instead.
+ * Probability calculation aliases ``zprob``, ``fprob`` and
+ ``ksprob`` are deprecated. Use instead the ``sf`` methods
+ of the corresponding distributions or the ``special``
+ functions directly.
+ * ``scipy.interpolate``
+ * ``PiecewisePolynomial`` class is deprecated.
+ * Backwards incompatible changes
+ * scipy.special.lpmn
+ * ``lpmn`` no longer accepts complex-valued arguments. A new
+ function ``clpmn`` with uniform complex analytic behavior
+ has been added, and it should be used instead.
+ * scipy.sparse.linalg
+ * Eigenvectors in the case of generalized eigenvalue problem
+ are normalized to unit vectors in 2-norm, rather than
+ following the LAPACK normalization convention.
+ * The deprecated UMFPACK wrapper in ``scipy.sparse.linalg``
+ has been removed due to license and install issues. If
+ available, ``scikits.umfpack`` is still used transparently
+ in the ``spsolve`` and ``factorized`` functions.
+ Otherwise, SuperLU is used instead in these functions.
+ * scipy.stats
+ * The deprecated functions ``glm``, ``oneway`` and
+ ``cmedian`` have been removed from ``scipy.stats``.
+ * ``stats.scoreatpercentile`` now returns an array instead of
+ a list of percentiles.
+ * scipy.interpolate
+ * The API for computing derivatives of a monotone piecewise
+ interpolation has changed: if `p` is a
+ ``PchipInterpolator`` object, `p.derivative(der)`
+ returns a callable object representing the derivative of
+ `p`. For in-place derivatives use the second argument of
+ the `__call__` method: `p(0.1, der=2)` evaluates the
+ second derivative of `p` at `x=0.1`.
+ * The method `p.derivatives` has been removed.
+
+-------------------------------------------------------------------
Old:
----
scipy-0.13.3.tar.gz
New:
----
scipy-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-scipy.spec ++++++
--- /var/tmp/diff_new_pack.3qsQuN/_old 2014-05-09 06:58:51.000000000 +0200
+++ /var/tmp/diff_new_pack.3qsQuN/_new 2014-05-09 06:58:51.000000000 +0200
@@ -20,7 +20,7 @@
%define modname scipy
Name: python3-%{modname}
-Version: 0.13.3
+Version: 0.14.0
Release: 0
Summary: Scientific Tools for Python
License: BSD-3-Clause and LGPL-2.0+
++++++ scipy-0.13.3.tar.gz -> scipy-0.14.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/python3-scipy/scipy-0.13.3.tar.gz /work/SRC/openSUSE:Factory/.python3-scipy.new/scipy-0.14.0.tar.gz differ: char 5, line 1
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-pytz for openSUSE:Factory checked in at 2014-05-09 06:58:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-pytz (Old)
and /work/SRC/openSUSE:Factory/.python3-pytz.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-pytz"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-pytz/python3-pytz.changes 2013-10-23 13:12:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-pytz.new/python3-pytz.changes 2014-05-09 06:58:44.000000000 +0200
@@ -1,0 +2,12 @@
+Thu May 8 10:55:13 UTC 2014 - toddrme2178(a)gmail.com
+
+- Update to pytz 2014.2
+ + Olson/IANA databse version 2014b
+ + No code changes in this release
+- update to 2013.9:
+ - Olson database 2013i
+- New upstream release 2013.8
+ - IANA database version 2013h
+ - No code changes
+
+-------------------------------------------------------------------
Old:
----
pytz-2013.7.tar.bz2
New:
----
pytz-2014.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-pytz.spec ++++++
--- /var/tmp/diff_new_pack.cUBRxg/_old 2014-05-09 06:58:44.000000000 +0200
+++ /var/tmp/diff_new_pack.cUBRxg/_new 2014-05-09 06:58:44.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-pytz
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python3-pytz
-Version: 2013.7
+Version: 2014.2
Release: 0
Url: http://pytz.sourceforge.net
Summary: World timezone definitions, modern and historical
++++++ pytz-2013.7.tar.bz2 -> pytz-2014.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/MANIFEST.in new/pytz-2014.2/MANIFEST.in
--- old/pytz-2013.7/MANIFEST.in 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/MANIFEST.in 2014-03-25 07:57:03.000000000 +0100
@@ -1,5 +1,5 @@
include *.txt setup.py
recursive-include pytz *.py
-recursive-include pytz *.pot
+#recursive-include pytz *.pot
graft pytz/zoneinfo
-exclude test_zdump.py
+#exclude test_zdump.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/PKG-INFO new/pytz-2014.2/PKG-INFO
--- old/pytz-2013.7/PKG-INFO 2013-10-02 06:28:19.000000000 +0200
+++ new/pytz-2014.2/PKG-INFO 2014-03-25 07:57:13.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytz
-Version: 2013.7
+Version: 2014.2
Summary: World timezone definitions, modern and historical
Home-page: http://pythonhosted.org/pytz
Author: Stuart Bishop
@@ -18,7 +18,7 @@
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.4
or higher. It also solves the issue of ambiguous times at the end
- of daylight savings, which you can read more about in the Python
+ of daylight saving time, which you can read more about in the Python
Library Reference (``datetime.tzinfo``).
Almost all of the Olson timezones are supported.
@@ -99,7 +99,7 @@
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt)
'2002-10-27 12:00:00 AMT+0020'
- It is safe for timezones without daylight savings trasitions though, such
+ It is safe for timezones without daylight saving transitions though, such
as UTC:
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt)
@@ -116,9 +116,9 @@
This library also allows you to do date arithmetic using local
times, although it is more complicated than working in UTC as you
- need to use the ``normalize()`` method to handle daylight savings time
+ need to use the ``normalize()`` method to handle daylight saving time
and other timezone transitions. In this example, ``loc_dt`` is set
- to the instant when daylight savings time ends in the US/Eastern
+ to the instant when daylight saving time ends in the US/Eastern
timezone.
>>> before = loc_dt - timedelta(minutes=10)
@@ -159,7 +159,7 @@
You can take shortcuts when dealing with the UTC side of timezone
conversions. ``normalize()`` and ``localize()`` are not really
- necessary when there are no daylight savings time transitions to
+ necessary when there are no daylight saving time transitions to
deal with.
>>> utc_dt = datetime.utcfromtimestamp(1143408899).replace(tzinfo=utc)
@@ -260,7 +260,7 @@
In fact, every instant between 01:00 and 02:00 occurs twice. This means
that if you try and create a time in the 'US/Eastern' timezone using
the standard datetime syntax, there is no way to specify if you meant
- before of after the end-of-daylight-savings-time transition.
+ before of after the end-of-daylight-saving-time transition.
>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00, tzinfo=eastern)
>>> loc_dt.strftime(fmt)
@@ -297,12 +297,16 @@
>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')
True
- Note that this instance is not the same instance (or implementation) as
- other timezones with the same meaning (GMT, Greenwich, Universal, etc.).
+ Note that some other timezones are commonly thought of as the same (GMT,
+ Greenwich, Universal, etc.). The definition of UTC is distinct from these
+ other timezones, and they are not equivalent. For this reason, they will
+ not compare the same in Python.
- >>> utc is pytz.timezone('GMT')
+ >>> utc == pytz.timezone('GMT')
False
+ See the section `What is UTC`_, below.
+
If you insist on working with local times, this library provides a
facility for constructing them unambiguously:
@@ -317,7 +321,7 @@
times.
For example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern
- timezone when the clocks where put back at the end of Daylight Savings
+ timezone when the clocks where put back at the end of Daylight Saving
Time:
>>> dt = datetime(2002, 10, 27, 1, 30, 00)
@@ -348,13 +352,13 @@
Although ``localize()`` handles many cases, it is still not possible
to handle all. In cases where countries change their timezone definitions,
- cases like the end-of-daylight-savings-time occur with no way of resolving
+ cases like the end-of-daylight-saving-time occur with no way of resolving
the ambiguity. For example, in 1915 Warsaw switched from Warsaw time to
Central European time. So at the stroke of midnight on August 5th 1915
the clocks were wound back 24 minutes creating an ambiguous time period
that cannot be specified without referring to the timezone abbreviation
or the actual UTC offset. In this case midnight happened twice, neither
- time during a daylight savings time period:
+ time during a daylight saving time period:
>>> warsaw = pytz.timezone('Europe/Warsaw')
>>> loc_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)
@@ -368,7 +372,7 @@
The only way of creating a time during the missing 24 minutes is
converting from another timezone - because neither of the timezones
- involved where in daylight savings mode the API simply provides no way
+ involved where in daylight saving mode the API simply provides no way
to express it:
>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)
@@ -424,13 +428,19 @@
What is UTC
~~~~~~~~~~~
- 'UTC' is Universal Time, also known as Greenwich Mean Time or GMT
- in the United Kingdom. All other timezones are given as offsets from
- UTC. No daylight savings time occurs in UTC, making it a useful timezone
- to perform date arithmetic without worrying about the confusion and
- ambiguities caused by daylight savings time transitions, your country
- changing its timezone, or mobile computers that move roam through
- multiple timezones.
+ 'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct
+ from, Greenwich Mean Time (GMT) and the various definitions of Universal
+ Time. UTC is now the worldwide standard for regulating clocks and time
+ measurement.
+
+ All other timezones are defined relative to UTC, and include offsets like
+ UTC+0800 - hours to add or subtract from UTC to derive the local time. No
+ daylight saving time occurs in UTC, making it a useful timezone to perform
+ date arithmetic without worrying about the confusion and ambiguities caused
+ by daylight saving time transitions, your country changing its timezone, or
+ mobile computers that roam through multiple timezones.
+
+ .. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
Helpers
@@ -526,6 +536,11 @@
bzr branch lp:pytz
+ Announcements of new releases are made on
+ `Launchpad <https://launchpad.net/pytz>`_, and the
+ `Atom feed <http://feeds.launchpad.net/pytz/announcements.atom>`_
+ hosted there.
+
Bugs, Feature Requests & Patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/README.txt new/pytz-2014.2/README.txt
--- old/pytz-2013.7/README.txt 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/README.txt 2014-03-25 07:57:03.000000000 +0100
@@ -9,7 +9,7 @@
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.4
or higher. It also solves the issue of ambiguous times at the end
-of daylight savings, which you can read more about in the Python
+of daylight saving time, which you can read more about in the Python
Library Reference (``datetime.tzinfo``).
Almost all of the Olson timezones are supported.
@@ -90,7 +90,7 @@
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt)
'2002-10-27 12:00:00 AMT+0020'
-It is safe for timezones without daylight savings trasitions though, such
+It is safe for timezones without daylight saving transitions though, such
as UTC:
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt)
@@ -107,9 +107,9 @@
This library also allows you to do date arithmetic using local
times, although it is more complicated than working in UTC as you
-need to use the ``normalize()`` method to handle daylight savings time
+need to use the ``normalize()`` method to handle daylight saving time
and other timezone transitions. In this example, ``loc_dt`` is set
-to the instant when daylight savings time ends in the US/Eastern
+to the instant when daylight saving time ends in the US/Eastern
timezone.
>>> before = loc_dt - timedelta(minutes=10)
@@ -150,7 +150,7 @@
You can take shortcuts when dealing with the UTC side of timezone
conversions. ``normalize()`` and ``localize()`` are not really
-necessary when there are no daylight savings time transitions to
+necessary when there are no daylight saving time transitions to
deal with.
>>> utc_dt = datetime.utcfromtimestamp(1143408899).replace(tzinfo=utc)
@@ -251,7 +251,7 @@
In fact, every instant between 01:00 and 02:00 occurs twice. This means
that if you try and create a time in the 'US/Eastern' timezone using
the standard datetime syntax, there is no way to specify if you meant
-before of after the end-of-daylight-savings-time transition.
+before of after the end-of-daylight-saving-time transition.
>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00, tzinfo=eastern)
>>> loc_dt.strftime(fmt)
@@ -288,12 +288,16 @@
>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')
True
-Note that this instance is not the same instance (or implementation) as
-other timezones with the same meaning (GMT, Greenwich, Universal, etc.).
+Note that some other timezones are commonly thought of as the same (GMT,
+Greenwich, Universal, etc.). The definition of UTC is distinct from these
+other timezones, and they are not equivalent. For this reason, they will
+not compare the same in Python.
->>> utc is pytz.timezone('GMT')
+>>> utc == pytz.timezone('GMT')
False
+See the section `What is UTC`_, below.
+
If you insist on working with local times, this library provides a
facility for constructing them unambiguously:
@@ -308,7 +312,7 @@
times.
For example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern
-timezone when the clocks where put back at the end of Daylight Savings
+timezone when the clocks where put back at the end of Daylight Saving
Time:
>>> dt = datetime(2002, 10, 27, 1, 30, 00)
@@ -339,13 +343,13 @@
Although ``localize()`` handles many cases, it is still not possible
to handle all. In cases where countries change their timezone definitions,
-cases like the end-of-daylight-savings-time occur with no way of resolving
+cases like the end-of-daylight-saving-time occur with no way of resolving
the ambiguity. For example, in 1915 Warsaw switched from Warsaw time to
Central European time. So at the stroke of midnight on August 5th 1915
the clocks were wound back 24 minutes creating an ambiguous time period
that cannot be specified without referring to the timezone abbreviation
or the actual UTC offset. In this case midnight happened twice, neither
-time during a daylight savings time period:
+time during a daylight saving time period:
>>> warsaw = pytz.timezone('Europe/Warsaw')
>>> loc_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)
@@ -359,7 +363,7 @@
The only way of creating a time during the missing 24 minutes is
converting from another timezone - because neither of the timezones
-involved where in daylight savings mode the API simply provides no way
+involved where in daylight saving mode the API simply provides no way
to express it:
>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)
@@ -415,13 +419,19 @@
What is UTC
~~~~~~~~~~~
-'UTC' is Universal Time, also known as Greenwich Mean Time or GMT
-in the United Kingdom. All other timezones are given as offsets from
-UTC. No daylight savings time occurs in UTC, making it a useful timezone
-to perform date arithmetic without worrying about the confusion and
-ambiguities caused by daylight savings time transitions, your country
-changing its timezone, or mobile computers that move roam through
-multiple timezones.
+'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct
+from, Greenwich Mean Time (GMT) and the various definitions of Universal
+Time. UTC is now the worldwide standard for regulating clocks and time
+measurement.
+
+All other timezones are defined relative to UTC, and include offsets like
+UTC+0800 - hours to add or subtract from UTC to derive the local time. No
+daylight saving time occurs in UTC, making it a useful timezone to perform
+date arithmetic without worrying about the confusion and ambiguities caused
+by daylight saving time transitions, your country changing its timezone, or
+mobile computers that roam through multiple timezones.
+
+.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
Helpers
@@ -517,6 +527,11 @@
bzr branch lp:pytz
+Announcements of new releases are made on
+`Launchpad <https://launchpad.net/pytz>`_, and the
+`Atom feed <http://feeds.launchpad.net/pytz/announcements.atom>`_
+hosted there.
+
Bugs, Feature Requests & Patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/__init__.py new/pytz-2014.2/pytz/__init__.py
--- old/pytz-2013.7/pytz/__init__.py 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/pytz/__init__.py 2014-03-25 07:57:04.000000000 +0100
@@ -9,8 +9,8 @@
'''
# The Olson database is updated several times a year.
-OLSON_VERSION = '2013g'
-VERSION = '2013.7' # Switching to pip compatible version numbering.
+OLSON_VERSION = '2014b'
+VERSION = '2014.2' # Switching to pip compatible version numbering.
__version__ = VERSION
OLSEN_VERSION = OLSON_VERSION # Old releases had this misspelling
@@ -716,6 +716,7 @@
'Antarctica/Rothera',
'Antarctica/South_Pole',
'Antarctica/Syowa',
+ 'Antarctica/Troll',
'Antarctica/Vostok',
'Arctic/Longyearbyen',
'Asia/Aden',
@@ -1279,6 +1280,7 @@
'Antarctica/Palmer',
'Antarctica/Rothera',
'Antarctica/Syowa',
+ 'Antarctica/Troll',
'Antarctica/Vostok',
'Arctic/Longyearbyen',
'Asia/Aden',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/lazy.py new/pytz-2014.2/pytz/lazy.py
--- old/pytz-2013.7/pytz/lazy.py 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/pytz/lazy.py 2014-03-25 07:57:04.000000000 +0100
@@ -66,6 +66,17 @@
class LazyList(list):
"""List populated on first use."""
+
+ _props = [
+ '__str__', '__repr__', '__unicode__',
+ '__hash__', '__sizeof__', '__cmp__',
+ '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__',
+ 'append', 'count', 'index', 'extend', 'insert', 'pop', 'remove',
+ 'reverse', 'sort', '__add__', '__radd__', '__iadd__', '__mul__',
+ '__rmul__', '__imul__', '__contains__', '__len__', '__nonzero__',
+ '__getitem__', '__setitem__', '__delitem__', '__iter__',
+ '__reversed__', '__getslice__', '__setslice__', '__delslice__']
+
def __new__(cls, fill_iter=None):
if fill_iter is None:
@@ -76,16 +87,6 @@
class LazyList(list):
pass
- _props = (
- '__str__', '__repr__', '__unicode__',
- '__hash__', '__sizeof__', '__cmp__',
- '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__',
- 'append', 'count', 'index', 'extend', 'insert', 'pop', 'remove',
- 'reverse', 'sort', '__add__', '__radd__', '__iadd__', '__mul__',
- '__rmul__', '__imul__', '__contains__', '__len__', '__nonzero__',
- '__getitem__', '__setitem__', '__delitem__', '__iter__',
- '__reversed__', '__getslice__', '__setslice__', '__delslice__')
-
fill_iter = [fill_iter]
def lazy(name):
@@ -94,22 +95,43 @@
try:
if len(fill_iter) > 0:
list.extend(self, fill_iter.pop())
- for method_name in _props:
+ for method_name in cls._props:
delattr(LazyList, method_name)
finally:
_fill_lock.release()
return getattr(list, name)(self, *args, **kw)
return _lazy
- for name in _props:
+ for name in cls._props:
setattr(LazyList, name, lazy(name))
new_list = LazyList()
return new_list
+# Not all versions of Python declare the same magic methods.
+# Filter out properties that don't exist in this version of Python
+# from the list.
+LazyList._props = [prop for prop in LazyList._props if hasattr(list, prop)]
+
class LazySet(set):
"""Set populated on first use."""
+
+ _props = (
+ '__str__', '__repr__', '__unicode__',
+ '__hash__', '__sizeof__', '__cmp__',
+ '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__',
+ '__contains__', '__len__', '__nonzero__',
+ '__getitem__', '__setitem__', '__delitem__', '__iter__',
+ '__sub__', '__and__', '__xor__', '__or__',
+ '__rsub__', '__rand__', '__rxor__', '__ror__',
+ '__isub__', '__iand__', '__ixor__', '__ior__',
+ 'add', 'clear', 'copy', 'difference', 'difference_update',
+ 'discard', 'intersection', 'intersection_update', 'isdisjoint',
+ 'issubset', 'issuperset', 'pop', 'remove',
+ 'symmetric_difference', 'symmetric_difference_update',
+ 'union', 'update')
+
def __new__(cls, fill_iter=None):
if fill_iter is None:
@@ -118,21 +140,6 @@
class LazySet(set):
pass
- _props = (
- '__str__', '__repr__', '__unicode__',
- '__hash__', '__sizeof__', '__cmp__',
- '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__',
- '__contains__', '__len__', '__nonzero__',
- '__getitem__', '__setitem__', '__delitem__', '__iter__',
- '__sub__', '__and__', '__xor__', '__or__',
- '__rsub__', '__rand__', '__rxor__', '__ror__',
- '__isub__', '__iand__', '__ixor__', '__ior__',
- 'add', 'clear', 'copy', 'difference', 'difference_update',
- 'discard', 'intersection', 'intersection_update', 'isdisjoint',
- 'issubset', 'issuperset', 'pop', 'remove',
- 'symmetric_difference', 'symmetric_difference_update',
- 'union', 'update')
-
fill_iter = [fill_iter]
def lazy(name):
@@ -142,15 +149,20 @@
if len(fill_iter) > 0:
for i in fill_iter.pop():
set.add(self, i)
- for method_name in _props:
+ for method_name in cls._props:
delattr(LazySet, method_name)
finally:
_fill_lock.release()
return getattr(set, name)(self, *args, **kw)
return _lazy
- for name in _props:
+ for name in cls._props:
setattr(LazySet, name, lazy(name))
new_set = LazySet()
return new_set
+
+# Not all versions of Python declare the same magic methods.
+# Filter out properties that don't exist in this version of Python
+# from the list.
+LazySet._props = [prop for prop in LazySet._props if hasattr(set, prop)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/tests/test_docs.py new/pytz-2014.2/pytz/tests/test_docs.py
--- old/pytz-2013.7/pytz/tests/test_docs.py 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/pytz/tests/test_docs.py 2014-03-25 07:57:04.000000000 +0100
@@ -1,35 +1,33 @@
# -*- coding: ascii -*-
-from doctest import DocTestSuite
-import unittest, os, os.path, sys
-import warnings
-
-# We test the documentation this way instead of using DocFileSuite so
-# we can run the tests under Python 2.3
-def test_README():
- pass
-
-this_dir = os.path.dirname(__file__)
-locs = [
- os.path.join(this_dir, os.pardir, 'README.txt'),
- os.path.join(this_dir, os.pardir, os.pardir, 'README.txt'),
- ]
-for loc in locs:
- if os.path.exists(loc):
- test_README.__doc__ = open(loc).read()
- break
-if test_README.__doc__ is None:
- raise RuntimeError('README.txt not found')
+from doctest import DocFileSuite
+import unittest, os.path, sys
+
+THIS_DIR = os.path.dirname(__file__)
+
+README = os.path.join(THIS_DIR, os.pardir, os.pardir, 'README.txt')
+
+
+class DocumentationTestCase(unittest.TestCase):
+ def test_readme_encoding(self):
+ '''Confirm the README.txt is pure ASCII.'''
+ f = open(README, 'rb')
+ try:
+ f.read().decode('US-ASCII')
+ finally:
+ f.close()
def test_suite():
"For the Z3 test runner"
- return DocTestSuite()
+ return unittest.TestSuite((
+ DocumentationTestCase('test_readme_encoding'),
+ DocFileSuite(os.path.join(os.pardir, os.pardir, 'README.txt'))))
if __name__ == '__main__':
sys.path.insert(0, os.path.abspath(os.path.join(
- this_dir, os.pardir, os.pardir
+ THIS_DIR, os.pardir, os.pardir
)))
unittest.main(defaultTest='test_suite')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/tests/test_lazy.py new/pytz-2014.2/pytz/tests/test_lazy.py
--- old/pytz-2013.7/pytz/tests/test_lazy.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pytz-2014.2/pytz/tests/test_lazy.py 2014-03-25 07:57:04.000000000 +0100
@@ -0,0 +1,313 @@
+from operator import *
+import os.path
+import sys
+import unittest
+import warnings
+
+
+if __name__ == '__main__':
+ # Only munge path if invoked as a script. Testrunners should have setup
+ # the paths already
+ sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, os.pardir)))
+
+
+from pytz.lazy import LazyList, LazySet
+
+
+class LazyListTestCase(unittest.TestCase):
+ initial_data = [3,2,1]
+
+ def setUp(self):
+ self.base = [3, 2, 1]
+ self.lesser = [2, 1, 0]
+ self.greater = [4, 3, 2]
+
+ self.lazy = LazyList(iter(list(self.base)))
+
+ def test_unary_ops(self):
+ unary_ops = [str, repr, len, bool, not_]
+ try:
+ unary_ops.append(unicode)
+ except NameError:
+ pass # unicode no longer exists in Python 3.
+
+ for op in unary_ops:
+ self.assertEqual(
+ op(self.lazy),
+ op(self.base), str(op))
+
+ def test_binary_ops(self):
+ binary_ops = [eq, ge, gt, le, lt, ne, add, concat]
+ try:
+ binary_ops.append(cmp)
+ except NameError:
+ pass # cmp no longer exists in Python 3.
+
+ for op in binary_ops:
+ self.assertEqual(
+ op(self.lazy, self.lazy),
+ op(self.base, self.base), str(op))
+ for other in [self.base, self.lesser, self.greater]:
+ self.assertEqual(
+ op(self.lazy, other),
+ op(self.base, other), '%s %s' % (op, other))
+ self.assertEqual(
+ op(other, self.lazy),
+ op(other, self.base), '%s %s' % (op, other))
+
+ # Multiplication
+ self.assertEqual(self.lazy * 3, self.base * 3)
+ self.assertEqual(3 * self.lazy, 3 * self.base)
+
+ # Contains
+ self.assertTrue(2 in self.lazy)
+ self.assertFalse(42 in self.lazy)
+
+ def test_iadd(self):
+ self.lazy += [1]
+ self.base += [1]
+ self.assertEqual(self.lazy, self.base)
+
+ def test_bool(self):
+ self.assertTrue(bool(self.lazy))
+ self.assertFalse(bool(LazyList()))
+ self.assertFalse(bool(LazyList(iter([]))))
+
+ def test_hash(self):
+ self.assertRaises(TypeError, hash, self.lazy)
+
+ def test_isinstance(self):
+ self.assertTrue(isinstance(self.lazy, list))
+ self.assertFalse(isinstance(self.lazy, tuple))
+
+ def test_callable(self):
+ try:
+ callable
+ except NameError:
+ return # No longer exists with Python 3.
+ self.assertFalse(callable(self.lazy))
+
+ def test_append(self):
+ self.base.append('extra')
+ self.lazy.append('extra')
+ self.assertEqual(self.lazy, self.base)
+
+ def test_count(self):
+ self.assertEqual(self.lazy.count(2), 1)
+
+ def test_index(self):
+ self.assertEqual(self.lazy.index(2), 1)
+
+ def test_extend(self):
+ self.base.extend([6, 7])
+ self.lazy.extend([6, 7])
+ self.assertEqual(self.lazy, self.base)
+
+ def test_insert(self):
+ self.base.insert(0, 'ping')
+ self.lazy.insert(0, 'ping')
+ self.assertEqual(self.lazy, self.base)
+
+ def test_pop(self):
+ self.assertEqual(self.lazy.pop(), self.base.pop())
+ self.assertEqual(self.lazy, self.base)
+
+ def test_remove(self):
+ self.base.remove(2)
+ self.lazy.remove(2)
+ self.assertEqual(self.lazy, self.base)
+
+ def test_reverse(self):
+ self.base.reverse()
+ self.lazy.reverse()
+ self.assertEqual(self.lazy, self.base)
+
+ def test_reversed(self):
+ self.assertEqual(list(reversed(self.lazy)), list(reversed(self.base)))
+
+ def test_sort(self):
+ self.base.sort()
+ self.assertNotEqual(self.lazy, self.base, 'Test data already sorted')
+ self.lazy.sort()
+ self.assertEqual(self.lazy, self.base)
+
+ def test_sorted(self):
+ self.assertEqual(sorted(self.lazy), sorted(self.base))
+
+ def test_getitem(self):
+ for idx in range(-len(self.base), len(self.base)):
+ self.assertEqual(self.lazy[idx], self.base[idx])
+
+ def test_setitem(self):
+ for idx in range(-len(self.base), len(self.base)):
+ self.base[idx] = idx + 1000
+ self.assertNotEqual(self.lazy, self.base)
+ self.lazy[idx] = idx + 1000
+ self.assertEqual(self.lazy, self.base)
+
+ def test_delitem(self):
+ del self.base[0]
+ self.assertNotEqual(self.lazy, self.base)
+ del self.lazy[0]
+ self.assertEqual(self.lazy, self.base)
+
+ del self.base[-2]
+ self.assertNotEqual(self.lazy, self.base)
+ del self.lazy[-2]
+ self.assertEqual(self.lazy, self.base)
+
+ def test_iter(self):
+ self.assertEqual(list(iter(self.lazy)), list(iter(self.base)))
+
+ def test_getslice(self):
+ for i in range(-len(self.base), len(self.base)):
+ for j in range(-len(self.base), len(self.base)):
+ for step in [-1, 1]:
+ self.assertEqual(self.lazy[i:j:step], self.base[i:j:step])
+
+ def test_setslice(self):
+ for i in range(-len(self.base), len(self.base)):
+ for j in range(-len(self.base), len(self.base)):
+ for step in [-1, 1]:
+ replacement = range(0, len(self.base[i:j:step]))
+ self.base[i:j:step] = replacement
+ self.lazy[i:j:step] = replacement
+ self.assertEqual(self.lazy, self.base)
+
+ def test_delslice(self):
+ del self.base[0:1]
+ del self.lazy[0:1]
+ self.assertEqual(self.lazy, self.base)
+
+ del self.base[-1:1:-1]
+ del self.lazy[-1:1:-1]
+ self.assertEqual(self.lazy, self.base)
+
+
+class LazySetTestCase(unittest.TestCase):
+ initial_data = set([3,2,1])
+
+ def setUp(self):
+ self.base = set([3, 2, 1])
+ self.lazy = LazySet(iter(set(self.base)))
+
+ def test_unary_ops(self):
+ # These ops just need to work.
+ unary_ops = [str, repr]
+ try:
+ unary_ops.append(unicode)
+ except NameError:
+ pass # unicode no longer exists in Python 3.
+
+ for op in unary_ops:
+ op(self.lazy) # These ops just need to work.
+
+ # These ops should return identical values as a real set.
+ unary_ops = [len, bool, not_]
+
+ for op in unary_ops:
+ self.assertEqual(
+ op(self.lazy),
+ op(self.base), '%s(lazy) == %r' % (op, op(self.lazy)))
+
+ def test_binary_ops(self):
+ binary_ops = [eq, ge, gt, le, lt, ne, sub, and_, or_, xor]
+ try:
+ binary_ops.append(cmp)
+ except NameError:
+ pass # cmp no longer exists in Python 3.
+
+ for op in binary_ops:
+ self.assertEqual(
+ op(self.lazy, self.lazy),
+ op(self.base, self.base), str(op))
+ self.assertEqual(
+ op(self.lazy, self.base),
+ op(self.base, self.base), str(op))
+ self.assertEqual(
+ op(self.base, self.lazy),
+ op(self.base, self.base), str(op))
+
+ # Contains
+ self.assertTrue(2 in self.lazy)
+ self.assertFalse(42 in self.lazy)
+
+ def test_iops(self):
+ try:
+ iops = [isub, iand, ior, ixor]
+ except NameError:
+ return # Don't exist in older Python versions.
+ for op in iops:
+ # Mutating operators, so make fresh copies.
+ lazy = LazySet(self.base)
+ base = self.base.copy()
+ op(lazy, set([1]))
+ op(base, set([1]))
+ self.assertEqual(lazy, base, str(op))
+
+ def test_bool(self):
+ self.assertTrue(bool(self.lazy))
+ self.assertFalse(bool(LazySet()))
+ self.assertFalse(bool(LazySet(iter([]))))
+
+ def test_hash(self):
+ self.assertRaises(TypeError, hash, self.lazy)
+
+ def test_isinstance(self):
+ self.assertTrue(isinstance(self.lazy, set))
+
+ def test_callable(self):
+ try:
+ callable
+ except NameError:
+ return # No longer exists with Python 3.
+ self.assertFalse(callable(self.lazy))
+
+ def test_add(self):
+ self.base.add('extra')
+ self.lazy.add('extra')
+ self.assertEqual(self.lazy, self.base)
+
+ def test_copy(self):
+ self.assertEqual(self.lazy.copy(), self.base)
+
+ def test_method_ops(self):
+ ops = [
+ 'difference', 'intersection', 'isdisjoint',
+ 'issubset', 'issuperset', 'symmetric_difference', 'union',
+ 'difference_update', 'intersection_update',
+ 'symmetric_difference_update', 'update']
+ for op in ops:
+ if not hasattr(set, op):
+ continue # Not in this version of Python.
+ # Make a copy, as some of the ops are mutating.
+ lazy = LazySet(set(self.base))
+ base = set(self.base)
+ self.assertEqual(
+ getattr(self.lazy, op)(set([1])),
+ getattr(self.base, op)(set([1])), op)
+ self.assertEqual(self.lazy, self.base, op)
+
+ def test_discard(self):
+ self.base.discard(1)
+ self.assertNotEqual(self.lazy, self.base)
+ self.lazy.discard(1)
+ self.assertEqual(self.lazy, self.base)
+
+ def test_pop(self):
+ self.assertEqual(self.lazy.pop(), self.base.pop())
+ self.assertEqual(self.lazy, self.base)
+
+ def test_remove(self):
+ self.base.remove(2)
+ self.lazy.remove(2)
+ self.assertEqual(self.lazy, self.base)
+
+ def test_clear(self):
+ self.lazy.clear()
+ self.assertEqual(self.lazy, set())
+
+
+if __name__ == '__main__':
+ warnings.simplefilter("error") # Warnings should be fatal in tests.
+ unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/tests/test_tzinfo.py new/pytz-2014.2/pytz/tests/test_tzinfo.py
--- old/pytz-2013.7/pytz/tests/test_tzinfo.py 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/pytz/tests/test_tzinfo.py 2014-03-25 07:57:04.000000000 +0100
@@ -21,7 +21,8 @@
# I test for expected version to ensure the correct version of pytz is
# actually being tested.
-EXPECTED_VERSION='2013.7'
+EXPECTED_VERSION='2014.2'
+EXPECTED_OLSON_VERSION='2014b'
fmt = '%Y-%m-%d %H:%M:%S %Z%z'
@@ -64,8 +65,12 @@
self.assertEqual(EXPECTED_VERSION, pytz.__version__,
'Incorrect pytz version loaded. Import path is stuffed '
'or this test needs updating. (Wanted %s, got %s)'
- % (EXPECTED_VERSION, pytz.__version__)
- )
+ % (EXPECTED_VERSION, pytz.__version__))
+
+ self.assertEqual(EXPECTED_OLSON_VERSION, pytz.OLSON_VERSION,
+ 'Incorrect pytz version loaded. Import path is stuffed '
+ 'or this test needs updating. (Wanted %s, got %s)'
+ % (EXPECTED_OLSON_VERSION, pytz.OLSON_VERSION))
def testGMT(self):
now = datetime.now(tz=GMT)
@@ -563,8 +568,8 @@
def testHourBefore(self):
# Python's datetime library has a bug, where the hour before
- # a daylight savings transition is one hour out. For example,
- # at the end of US/Eastern daylight savings time, 01:00 EST
+ # a daylight saving transition is one hour out. For example,
+ # at the end of US/Eastern daylight saving time, 01:00 EST
# occurs twice (once at 05:00 UTC and once at 06:00 UTC),
# whereas the first should actually be 01:00 EDT.
# Note that this bug is by design - by accepting this ambiguity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/tzinfo.py new/pytz-2014.2/pytz/tzinfo.py
--- old/pytz-2013.7/pytz/tzinfo.py 2013-10-02 06:26:07.000000000 +0200
+++ new/pytz-2014.2/pytz/tzinfo.py 2014-03-25 07:57:03.000000000 +0100
@@ -149,7 +149,7 @@
class DstTzInfo(BaseTzInfo):
'''A timezone that has a variable offset from UTC
- The offset might change if daylight savings time comes into effect,
+ The offset might change if daylight saving time comes into effect,
or at a point in history when the region decides to change their
timezone definition.
'''
@@ -248,7 +248,7 @@
than passing a tzinfo argument to a datetime constructor.
is_dst is used to determine the correct timezone in the ambigous
- period at the end of daylight savings time.
+ period at the end of daylight saving time.
>>> from pytz import timezone
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
@@ -264,7 +264,7 @@
'1:00:00'
Use is_dst=None to raise an AmbiguousTimeError for ambiguous
- times at the end of daylight savings
+ times at the end of daylight saving time
>>> try:
... loc_dt1 = amdam.localize(dt, is_dst=None)
@@ -278,7 +278,7 @@
True
is_dst is also used to determine the correct timezone in the
- wallclock times jumped over at the start of daylight savings time.
+ wallclock times jumped over at the start of daylight saving time.
>>> pacific = timezone('US/Pacific')
>>> dt = datetime(2008, 3, 9, 2, 0, 0)
Files old/pytz-2013.7/pytz/zoneinfo/Africa/Casablanca and new/pytz-2014.2/pytz/zoneinfo/Africa/Casablanca differ
Files old/pytz-2013.7/pytz/zoneinfo/Africa/El_Aaiun and new/pytz-2014.2/pytz/zoneinfo/Africa/El_Aaiun differ
Files old/pytz-2013.7/pytz/zoneinfo/Africa/Tripoli and new/pytz-2014.2/pytz/zoneinfo/Africa/Tripoli differ
Files old/pytz-2013.7/pytz/zoneinfo/America/Eirunepe and new/pytz-2014.2/pytz/zoneinfo/America/Eirunepe differ
Files old/pytz-2013.7/pytz/zoneinfo/America/Havana and new/pytz-2014.2/pytz/zoneinfo/America/Havana differ
Files old/pytz-2013.7/pytz/zoneinfo/America/Porto_Acre and new/pytz-2014.2/pytz/zoneinfo/America/Porto_Acre differ
Files old/pytz-2013.7/pytz/zoneinfo/America/Rio_Branco and new/pytz-2014.2/pytz/zoneinfo/America/Rio_Branco differ
Files old/pytz-2013.7/pytz/zoneinfo/Antarctica/Troll and new/pytz-2014.2/pytz/zoneinfo/Antarctica/Troll differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Amman and new/pytz-2014.2/pytz/zoneinfo/Asia/Amman differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Gaza and new/pytz-2014.2/pytz/zoneinfo/Asia/Gaza differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Hebron and new/pytz-2014.2/pytz/zoneinfo/Asia/Hebron differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Istanbul and new/pytz-2014.2/pytz/zoneinfo/Asia/Istanbul differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Jerusalem and new/pytz-2014.2/pytz/zoneinfo/Asia/Jerusalem differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Riyadh87 and new/pytz-2014.2/pytz/zoneinfo/Asia/Riyadh87 differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Riyadh88 and new/pytz-2014.2/pytz/zoneinfo/Asia/Riyadh88 differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Riyadh89 and new/pytz-2014.2/pytz/zoneinfo/Asia/Riyadh89 differ
Files old/pytz-2013.7/pytz/zoneinfo/Asia/Tel_Aviv and new/pytz-2014.2/pytz/zoneinfo/Asia/Tel_Aviv differ
Files old/pytz-2013.7/pytz/zoneinfo/Brazil/Acre and new/pytz-2014.2/pytz/zoneinfo/Brazil/Acre differ
Files old/pytz-2013.7/pytz/zoneinfo/Cuba and new/pytz-2014.2/pytz/zoneinfo/Cuba differ
Files old/pytz-2013.7/pytz/zoneinfo/Europe/Istanbul and new/pytz-2014.2/pytz/zoneinfo/Europe/Istanbul differ
Files old/pytz-2013.7/pytz/zoneinfo/Europe/Kiev and new/pytz-2014.2/pytz/zoneinfo/Europe/Kiev differ
Files old/pytz-2013.7/pytz/zoneinfo/Europe/Simferopol and new/pytz-2014.2/pytz/zoneinfo/Europe/Simferopol differ
Files old/pytz-2013.7/pytz/zoneinfo/Israel and new/pytz-2014.2/pytz/zoneinfo/Israel differ
Files old/pytz-2013.7/pytz/zoneinfo/Libya and new/pytz-2014.2/pytz/zoneinfo/Libya differ
Files old/pytz-2013.7/pytz/zoneinfo/Mideast/Riyadh87 and new/pytz-2014.2/pytz/zoneinfo/Mideast/Riyadh87 differ
Files old/pytz-2013.7/pytz/zoneinfo/Mideast/Riyadh88 and new/pytz-2014.2/pytz/zoneinfo/Mideast/Riyadh88 differ
Files old/pytz-2013.7/pytz/zoneinfo/Mideast/Riyadh89 and new/pytz-2014.2/pytz/zoneinfo/Mideast/Riyadh89 differ
Files old/pytz-2013.7/pytz/zoneinfo/Pacific/Fiji and new/pytz-2014.2/pytz/zoneinfo/Pacific/Fiji differ
Files old/pytz-2013.7/pytz/zoneinfo/Turkey and new/pytz-2014.2/pytz/zoneinfo/Turkey differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz/zoneinfo/zone.tab new/pytz-2014.2/pytz/zoneinfo/zone.tab
--- old/pytz-2013.7/pytz/zoneinfo/zone.tab 2013-10-02 06:26:06.000000000 +0200
+++ new/pytz-2014.2/pytz/zoneinfo/zone.tab 2014-03-25 07:57:03.000000000 +0100
@@ -51,6 +51,7 @@
AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
+AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF)
AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN)
@@ -343,6 +344,7 @@
RU +5545+03735 Europe/Moscow Moscow+00 - west Russia
RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea
RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia
+RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea
RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
@@ -398,7 +400,6 @@
UA +5026+03031 Europe/Kiev most locations
UA +4837+02218 Europe/Uzhgorod Ruthenia
UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
-UA +4457+03406 Europe/Simferopol central Crimea
UG +0019+03225 Africa/Kampala
UM +1645-16931 Pacific/Johnston Johnston Atoll
UM +2813-17722 Pacific/Midway Midway Islands
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz.egg-info/PKG-INFO new/pytz-2014.2/pytz.egg-info/PKG-INFO
--- old/pytz-2013.7/pytz.egg-info/PKG-INFO 2013-10-02 06:28:12.000000000 +0200
+++ new/pytz-2014.2/pytz.egg-info/PKG-INFO 2014-03-25 07:57:08.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytz
-Version: 2013.7
+Version: 2014.2
Summary: World timezone definitions, modern and historical
Home-page: http://pythonhosted.org/pytz
Author: Stuart Bishop
@@ -18,7 +18,7 @@
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.4
or higher. It also solves the issue of ambiguous times at the end
- of daylight savings, which you can read more about in the Python
+ of daylight saving time, which you can read more about in the Python
Library Reference (``datetime.tzinfo``).
Almost all of the Olson timezones are supported.
@@ -99,7 +99,7 @@
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt)
'2002-10-27 12:00:00 AMT+0020'
- It is safe for timezones without daylight savings trasitions though, such
+ It is safe for timezones without daylight saving transitions though, such
as UTC:
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt)
@@ -116,9 +116,9 @@
This library also allows you to do date arithmetic using local
times, although it is more complicated than working in UTC as you
- need to use the ``normalize()`` method to handle daylight savings time
+ need to use the ``normalize()`` method to handle daylight saving time
and other timezone transitions. In this example, ``loc_dt`` is set
- to the instant when daylight savings time ends in the US/Eastern
+ to the instant when daylight saving time ends in the US/Eastern
timezone.
>>> before = loc_dt - timedelta(minutes=10)
@@ -159,7 +159,7 @@
You can take shortcuts when dealing with the UTC side of timezone
conversions. ``normalize()`` and ``localize()`` are not really
- necessary when there are no daylight savings time transitions to
+ necessary when there are no daylight saving time transitions to
deal with.
>>> utc_dt = datetime.utcfromtimestamp(1143408899).replace(tzinfo=utc)
@@ -260,7 +260,7 @@
In fact, every instant between 01:00 and 02:00 occurs twice. This means
that if you try and create a time in the 'US/Eastern' timezone using
the standard datetime syntax, there is no way to specify if you meant
- before of after the end-of-daylight-savings-time transition.
+ before of after the end-of-daylight-saving-time transition.
>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00, tzinfo=eastern)
>>> loc_dt.strftime(fmt)
@@ -297,12 +297,16 @@
>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')
True
- Note that this instance is not the same instance (or implementation) as
- other timezones with the same meaning (GMT, Greenwich, Universal, etc.).
+ Note that some other timezones are commonly thought of as the same (GMT,
+ Greenwich, Universal, etc.). The definition of UTC is distinct from these
+ other timezones, and they are not equivalent. For this reason, they will
+ not compare the same in Python.
- >>> utc is pytz.timezone('GMT')
+ >>> utc == pytz.timezone('GMT')
False
+ See the section `What is UTC`_, below.
+
If you insist on working with local times, this library provides a
facility for constructing them unambiguously:
@@ -317,7 +321,7 @@
times.
For example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern
- timezone when the clocks where put back at the end of Daylight Savings
+ timezone when the clocks where put back at the end of Daylight Saving
Time:
>>> dt = datetime(2002, 10, 27, 1, 30, 00)
@@ -348,13 +352,13 @@
Although ``localize()`` handles many cases, it is still not possible
to handle all. In cases where countries change their timezone definitions,
- cases like the end-of-daylight-savings-time occur with no way of resolving
+ cases like the end-of-daylight-saving-time occur with no way of resolving
the ambiguity. For example, in 1915 Warsaw switched from Warsaw time to
Central European time. So at the stroke of midnight on August 5th 1915
the clocks were wound back 24 minutes creating an ambiguous time period
that cannot be specified without referring to the timezone abbreviation
or the actual UTC offset. In this case midnight happened twice, neither
- time during a daylight savings time period:
+ time during a daylight saving time period:
>>> warsaw = pytz.timezone('Europe/Warsaw')
>>> loc_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)
@@ -368,7 +372,7 @@
The only way of creating a time during the missing 24 minutes is
converting from another timezone - because neither of the timezones
- involved where in daylight savings mode the API simply provides no way
+ involved where in daylight saving mode the API simply provides no way
to express it:
>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)
@@ -424,13 +428,19 @@
What is UTC
~~~~~~~~~~~
- 'UTC' is Universal Time, also known as Greenwich Mean Time or GMT
- in the United Kingdom. All other timezones are given as offsets from
- UTC. No daylight savings time occurs in UTC, making it a useful timezone
- to perform date arithmetic without worrying about the confusion and
- ambiguities caused by daylight savings time transitions, your country
- changing its timezone, or mobile computers that move roam through
- multiple timezones.
+ 'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct
+ from, Greenwich Mean Time (GMT) and the various definitions of Universal
+ Time. UTC is now the worldwide standard for regulating clocks and time
+ measurement.
+
+ All other timezones are defined relative to UTC, and include offsets like
+ UTC+0800 - hours to add or subtract from UTC to derive the local time. No
+ daylight saving time occurs in UTC, making it a useful timezone to perform
+ date arithmetic without worrying about the confusion and ambiguities caused
+ by daylight saving time transitions, your country changing its timezone, or
+ mobile computers that roam through multiple timezones.
+
+ .. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
Helpers
@@ -526,6 +536,11 @@
bzr branch lp:pytz
+ Announcements of new releases are made on
+ `Launchpad <https://launchpad.net/pytz>`_, and the
+ `Atom feed <http://feeds.launchpad.net/pytz/announcements.atom>`_
+ hosted there.
+
Bugs, Feature Requests & Patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2013.7/pytz.egg-info/SOURCES.txt new/pytz-2014.2/pytz.egg-info/SOURCES.txt
--- old/pytz-2013.7/pytz.egg-info/SOURCES.txt 2013-10-02 06:28:12.000000000 +0200
+++ new/pytz-2014.2/pytz.egg-info/SOURCES.txt 2014-03-25 07:57:08.000000000 +0100
@@ -15,6 +15,7 @@
pytz.egg-info/top_level.txt
pytz.egg-info/zip-safe
pytz/tests/test_docs.py
+pytz/tests/test_lazy.py
pytz/tests/test_tzinfo.py
pytz/zoneinfo/CET
pytz/zoneinfo/CST6CDT
@@ -293,6 +294,7 @@
pytz/zoneinfo/Antarctica/Rothera
pytz/zoneinfo/Antarctica/South_Pole
pytz/zoneinfo/Antarctica/Syowa
+pytz/zoneinfo/Antarctica/Troll
pytz/zoneinfo/Antarctica/Vostok
pytz/zoneinfo/Arctic/Longyearbyen
pytz/zoneinfo/Asia/Aden
@@ -362,9 +364,6 @@
pytz/zoneinfo/Asia/Qyzylorda
pytz/zoneinfo/Asia/Rangoon
pytz/zoneinfo/Asia/Riyadh
-pytz/zoneinfo/Asia/Riyadh87
-pytz/zoneinfo/Asia/Riyadh88
-pytz/zoneinfo/Asia/Riyadh89
pytz/zoneinfo/Asia/Saigon
pytz/zoneinfo/Asia/Sakhalin
pytz/zoneinfo/Asia/Samarkand
@@ -547,9 +546,6 @@
pytz/zoneinfo/Mexico/BajaNorte
pytz/zoneinfo/Mexico/BajaSur
pytz/zoneinfo/Mexico/General
-pytz/zoneinfo/Mideast/Riyadh87
-pytz/zoneinfo/Mideast/Riyadh88
-pytz/zoneinfo/Mideast/Riyadh89
pytz/zoneinfo/Pacific/Apia
pytz/zoneinfo/Pacific/Auckland
pytz/zoneinfo/Pacific/Chatham
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-Pygments for openSUSE:Factory checked in at 2014-05-09 06:58:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-Pygments (Old)
and /work/SRC/openSUSE:Factory/.python3-Pygments.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-Pygments"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-Pygments/python3-Pygments.changes 2013-06-21 19:01:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-Pygments.new/python3-Pygments.changes 2014-05-09 06:58:40.000000000 +0200
@@ -1,0 +2,6 @@
+Thu May 8 13:49:58 UTC 2014 - toddrme2178(a)gmail.com
+
+- add LICENSE to doc section
+- Require python-setuptools instead of distribute (upstreams merged)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-Pygments.spec ++++++
--- /var/tmp/diff_new_pack.nb7q3L/_old 2014-05-09 06:58:40.000000000 +0200
+++ /var/tmp/diff_new_pack.nb7q3L/_new 2014-05-09 06:58:40.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-Pygments
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,8 +28,9 @@
BuildRequires: python3
BuildRequires: python3-2to3
BuildRequires: python3-devel
-BuildRequires: python3-distribute
+BuildRequires: python3-setuptools
BuildRequires: python3-nose
+Requires: python3-setuptools
BuildArch: noarch
%description
@@ -63,7 +64,7 @@
%files
%defattr(-,root,root,-)
-%doc AUTHORS CHANGES TODO docs/build
+%doc LICENSE AUTHORS CHANGES TODO docs/build
%{_bindir}/pygmentize-%{py3_ver}
%{_mandir}/man1/pygmentize-%{py3_ver}.1.gz
%{python3_sitelib}/pygments/
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-MarkupSafe for openSUSE:Factory checked in at 2014-05-09 06:58:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-MarkupSafe (Old)
and /work/SRC/openSUSE:Factory/.python3-MarkupSafe.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-MarkupSafe"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-MarkupSafe/python3-MarkupSafe.changes 2013-06-21 19:01:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-MarkupSafe.new/python3-MarkupSafe.changes 2014-05-09 06:58:31.000000000 +0200
@@ -1,0 +2,12 @@
+Thu May 8 13:51:56 UTC 2014 - toddrme2178(a)gmail.com
+
+- Update to 0.21
+ + No upstream changelog
+- update to 0.19:
+ + Various Python 3.x fixes
+- update to 0.18:
+ + Fixed interpolation on tuples
+ + Varios Python 3.x fixes
+- Require python-setuptools instead of distribute (upstreams merged)
+
+-------------------------------------------------------------------
Old:
----
MarkupSafe-0.15.tar.gz
New:
----
MarkupSafe-0.21.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-MarkupSafe.spec ++++++
--- /var/tmp/diff_new_pack.MVeHUU/_old 2014-05-09 06:58:31.000000000 +0200
+++ /var/tmp/diff_new_pack.MVeHUU/_new 2014-05-09 06:58:31.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-MarkupSafe
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 20124 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,9 @@
#
-
Name: python3-MarkupSafe
-Version: 0.15
-Release: 1
+Version: 0.21
+Release: 0
Url: http://dev.pocoo.org/
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
License: BSD-3-Clause
@@ -28,15 +27,9 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3
BuildRequires: python3-devel
-BuildRequires: python3-distribute
+BuildRequires: python3-setuptools
BuildRequires: python3-2to3
-%if 0%{?suse_version} <= 1140
-%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)")}
-%endif
-Requires: python(abi) = %{py3_ver}
-
%description
Implements a unicode subclass that supports HTML strings. This can be used to
safely encode strings for dynamically generated web pages.
@@ -57,6 +50,6 @@
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.rst
%{python3_sitearch}/markupsafe
-%{python3_sitearch}/MarkupSafe-%{version}-py%{py3_ver}.egg-info
+%{python3_sitearch}/MarkupSafe-%{version}-py*.egg-info
%changelog
++++++ MarkupSafe-0.15.tar.gz -> MarkupSafe-0.21.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/MarkupSafe.egg-info/PKG-INFO new/MarkupSafe-0.21/MarkupSafe.egg-info/PKG-INFO
--- old/MarkupSafe-0.15/MarkupSafe.egg-info/PKG-INFO 2011-07-20 10:58:11.000000000 +0200
+++ new/MarkupSafe-0.21/MarkupSafe.egg-info/PKG-INFO 2014-04-17 11:50:53.000000000 +0200
@@ -1,8 +1,8 @@
Metadata-Version: 1.0
Name: MarkupSafe
-Version: 0.15
+Version: 0.21
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
-Home-page: http://dev.pocoo.org/
+Home-page: http://github.com/mitsuhiko/markupsafe
Author: Armin Ronacher
Author-email: armin.ronacher(a)active-4.com
License: BSD
@@ -20,7 +20,8 @@
If you want to make an object unicode that is not yet unicode
but don't want to lose the taint information, you can use the
- `soft_unicode` function:
+ `soft_unicode` function. (On Python 3 you can also use `soft_str` which
+ is a different name for the same function).
>>> from markupsafe import soft_unicode
>>> soft_unicode(42)
@@ -28,6 +29,9 @@
>>> soft_unicode(Markup('foo'))
Markup(u'foo')
+ HTML Representations
+ --------------------
+
Objects can customize their HTML markup equivalent by overriding
the `__html__` function:
@@ -40,6 +44,9 @@
>>> Markup(Foo())
Markup(u'<strong>Nice</strong>')
+ Silent Escapes
+ --------------
+
Since MarkupSafe 0.10 there is now also a separate escape function
called `escape_silent` that returns an empty string for `None` for
consistency with other systems that return empty strings for `None`
@@ -57,6 +64,48 @@
def escape(cls, s):
return cls(escape(s))
+ New-Style String Formatting
+ ---------------------------
+
+ Starting with MarkupSafe 0.21 new style string formats from Python 2.6 and
+ 3.x are now fully supported. Previously the escape behavior of those
+ functions was spotty at best. The new implementations operates under the
+ following algorithm:
+
+ 1. if an object has an ``__html_format__`` method it is called as
+ replacement for ``__format__`` with the format specifier. It either
+ has to return a string or markup object.
+ 2. if an object has an ``__html__`` method it is called.
+ 3. otherwise the default format system of Python kicks in and the result
+ is HTML escaped.
+
+ Here is how you can implement your own formatting:
+
+ class User(object):
+
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('<a href="/user/{0}">{1}</a>').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+
+ def __html__(self):
+ return Markup('<span class=user>{0}</span>').format(self.username)
+
+ And to format that user:
+
+ >>> user = User(1, 'foo')
+ >>> Markup('<p>User: {0:link}').format(user)
+ Markup(u'<p>User: <a href="/user/1"><span class=user>foo</span></a>')
+
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/MarkupSafe.egg-info/SOURCES.txt new/MarkupSafe-0.21/MarkupSafe.egg-info/SOURCES.txt
--- old/MarkupSafe-0.15/MarkupSafe.egg-info/SOURCES.txt 2011-07-20 10:58:12.000000000 +0200
+++ new/MarkupSafe-0.21/MarkupSafe.egg-info/SOURCES.txt 2014-04-17 11:50:53.000000000 +0200
@@ -9,6 +9,7 @@
MarkupSafe.egg-info/not-zip-safe
MarkupSafe.egg-info/top_level.txt
markupsafe/__init__.py
+markupsafe/_compat.py
markupsafe/_constants.py
markupsafe/_native.py
markupsafe/_speedups.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/PKG-INFO new/MarkupSafe-0.21/PKG-INFO
--- old/MarkupSafe-0.15/PKG-INFO 2011-07-20 10:58:12.000000000 +0200
+++ new/MarkupSafe-0.21/PKG-INFO 2014-04-17 11:50:53.000000000 +0200
@@ -1,8 +1,8 @@
Metadata-Version: 1.0
Name: MarkupSafe
-Version: 0.15
+Version: 0.21
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
-Home-page: http://dev.pocoo.org/
+Home-page: http://github.com/mitsuhiko/markupsafe
Author: Armin Ronacher
Author-email: armin.ronacher(a)active-4.com
License: BSD
@@ -20,7 +20,8 @@
If you want to make an object unicode that is not yet unicode
but don't want to lose the taint information, you can use the
- `soft_unicode` function:
+ `soft_unicode` function. (On Python 3 you can also use `soft_str` which
+ is a different name for the same function).
>>> from markupsafe import soft_unicode
>>> soft_unicode(42)
@@ -28,6 +29,9 @@
>>> soft_unicode(Markup('foo'))
Markup(u'foo')
+ HTML Representations
+ --------------------
+
Objects can customize their HTML markup equivalent by overriding
the `__html__` function:
@@ -40,6 +44,9 @@
>>> Markup(Foo())
Markup(u'<strong>Nice</strong>')
+ Silent Escapes
+ --------------
+
Since MarkupSafe 0.10 there is now also a separate escape function
called `escape_silent` that returns an empty string for `None` for
consistency with other systems that return empty strings for `None`
@@ -57,6 +64,48 @@
def escape(cls, s):
return cls(escape(s))
+ New-Style String Formatting
+ ---------------------------
+
+ Starting with MarkupSafe 0.21 new style string formats from Python 2.6 and
+ 3.x are now fully supported. Previously the escape behavior of those
+ functions was spotty at best. The new implementations operates under the
+ following algorithm:
+
+ 1. if an object has an ``__html_format__`` method it is called as
+ replacement for ``__format__`` with the format specifier. It either
+ has to return a string or markup object.
+ 2. if an object has an ``__html__`` method it is called.
+ 3. otherwise the default format system of Python kicks in and the result
+ is HTML escaped.
+
+ Here is how you can implement your own formatting:
+
+ class User(object):
+
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('<a href="/user/{0}">{1}</a>').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+
+ def __html__(self):
+ return Markup('<span class=user>{0}</span>').format(self.username)
+
+ And to format that user:
+
+ >>> user = User(1, 'foo')
+ >>> Markup('<p>User: {0:link}').format(user)
+ Markup(u'<p>User: <a href="/user/1"><span class=user>foo</span></a>')
+
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/README.rst new/MarkupSafe-0.21/README.rst
--- old/MarkupSafe-0.15/README.rst 2010-09-07 17:43:12.000000000 +0200
+++ new/MarkupSafe-0.21/README.rst 2014-04-17 11:49:09.000000000 +0200
@@ -12,7 +12,8 @@
If you want to make an object unicode that is not yet unicode
but don't want to lose the taint information, you can use the
-`soft_unicode` function:
+`soft_unicode` function. (On Python 3 you can also use `soft_str` which
+is a different name for the same function).
>>> from markupsafe import soft_unicode
>>> soft_unicode(42)
@@ -20,6 +21,9 @@
>>> soft_unicode(Markup('foo'))
Markup(u'foo')
+HTML Representations
+--------------------
+
Objects can customize their HTML markup equivalent by overriding
the `__html__` function:
@@ -32,6 +36,9 @@
>>> Markup(Foo())
Markup(u'<strong>Nice</strong>')
+Silent Escapes
+--------------
+
Since MarkupSafe 0.10 there is now also a separate escape function
called `escape_silent` that returns an empty string for `None` for
consistency with other systems that return empty strings for `None`
@@ -48,3 +55,45 @@
@classmethod
def escape(cls, s):
return cls(escape(s))
+
+New-Style String Formatting
+---------------------------
+
+Starting with MarkupSafe 0.21 new style string formats from Python 2.6 and
+3.x are now fully supported. Previously the escape behavior of those
+functions was spotty at best. The new implementations operates under the
+following algorithm:
+
+1. if an object has an ``__html_format__`` method it is called as
+ replacement for ``__format__`` with the format specifier. It either
+ has to return a string or markup object.
+2. if an object has an ``__html__`` method it is called.
+3. otherwise the default format system of Python kicks in and the result
+ is HTML escaped.
+
+Here is how you can implement your own formatting:
+
+ class User(object):
+
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('<a href="/user/{0}">{1}</a>').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+
+ def __html__(self):
+ return Markup('<span class=user>{0}</span>').format(self.username)
+
+And to format that user:
+
+>>> user = User(1, 'foo')
+>>> Markup('<p>User: {0:link}').format(user)
+Markup(u'<p>User: <a href="/user/1"><span class=user>foo</span></a>')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/markupsafe/__init__.py new/MarkupSafe-0.21/markupsafe/__init__.py
--- old/MarkupSafe-0.15/markupsafe/__init__.py 2010-09-07 17:45:38.000000000 +0200
+++ new/MarkupSafe-0.21/markupsafe/__init__.py 2014-04-17 11:43:10.000000000 +0200
@@ -9,7 +9,9 @@
:license: BSD, see LICENSE for more details.
"""
import re
-from itertools import imap
+import string
+from markupsafe._compat import text_type, string_types, int_types, \
+ unichr, iteritems, PY2
__all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent']
@@ -19,7 +21,7 @@
_entity_re = re.compile(r'&([^;]+);')
-class Markup(unicode):
+class Markup(text_type):
r"""Marks a string as being safe for inclusion in HTML/XML output without
needing to be escaped. This implements the `__html__` interface a couple
of frameworks and web applications use. :class:`Markup` is a direct
@@ -68,59 +70,59 @@
if hasattr(base, '__html__'):
base = base.__html__()
if encoding is None:
- return unicode.__new__(cls, base)
- return unicode.__new__(cls, base, encoding, errors)
+ return text_type.__new__(cls, base)
+ return text_type.__new__(cls, base, encoding, errors)
def __html__(self):
return self
def __add__(self, other):
- if hasattr(other, '__html__') or isinstance(other, basestring):
- return self.__class__(unicode(self) + unicode(escape(other)))
+ if isinstance(other, string_types) or hasattr(other, '__html__'):
+ return self.__class__(super(Markup, self).__add__(self.escape(other)))
return NotImplemented
def __radd__(self, other):
- if hasattr(other, '__html__') or isinstance(other, basestring):
- return self.__class__(unicode(escape(other)) + unicode(self))
+ if hasattr(other, '__html__') or isinstance(other, string_types):
+ return self.escape(other).__add__(self)
return NotImplemented
def __mul__(self, num):
- if isinstance(num, (int, long)):
- return self.__class__(unicode.__mul__(self, num))
+ if isinstance(num, int_types):
+ return self.__class__(text_type.__mul__(self, num))
return NotImplemented
__rmul__ = __mul__
def __mod__(self, arg):
if isinstance(arg, tuple):
- arg = tuple(imap(_MarkupEscapeHelper, arg))
+ arg = tuple(_MarkupEscapeHelper(x, self.escape) for x in arg)
else:
- arg = _MarkupEscapeHelper(arg)
- return self.__class__(unicode.__mod__(self, arg))
+ arg = _MarkupEscapeHelper(arg, self.escape)
+ return self.__class__(text_type.__mod__(self, arg))
def __repr__(self):
return '%s(%s)' % (
self.__class__.__name__,
- unicode.__repr__(self)
+ text_type.__repr__(self)
)
def join(self, seq):
- return self.__class__(unicode.join(self, imap(escape, seq)))
- join.__doc__ = unicode.join.__doc__
+ return self.__class__(text_type.join(self, map(self.escape, seq)))
+ join.__doc__ = text_type.join.__doc__
def split(self, *args, **kwargs):
- return map(self.__class__, unicode.split(self, *args, **kwargs))
- split.__doc__ = unicode.split.__doc__
+ return list(map(self.__class__, text_type.split(self, *args, **kwargs)))
+ split.__doc__ = text_type.split.__doc__
def rsplit(self, *args, **kwargs):
- return map(self.__class__, unicode.rsplit(self, *args, **kwargs))
- rsplit.__doc__ = unicode.rsplit.__doc__
+ return list(map(self.__class__, text_type.rsplit(self, *args, **kwargs)))
+ rsplit.__doc__ = text_type.rsplit.__doc__
def splitlines(self, *args, **kwargs):
- return map(self.__class__, unicode.splitlines(self, *args, **kwargs))
- splitlines.__doc__ = unicode.splitlines.__doc__
+ return list(map(self.__class__, text_type.splitlines(self, *args, **kwargs)))
+ splitlines.__doc__ = text_type.splitlines.__doc__
def unescape(self):
- r"""Unescape markup again into an unicode string. This also resolves
+ r"""Unescape markup again into an text_type string. This also resolves
known HTML4 and XHTML entities:
>>> Markup("Main » <em>About</em>").unescape()
@@ -139,10 +141,10 @@
except ValueError:
pass
return u''
- return _entity_re.sub(handle_match, unicode(self))
+ return _entity_re.sub(handle_match, text_type(self))
def striptags(self):
- r"""Unescape markup into an unicode string and strip all tags. This
+ r"""Unescape markup into an text_type string and strip all tags. This
also resolves known HTML4 and XHTML entities. Whitespace is
normalized to one:
@@ -163,11 +165,11 @@
return cls(rv)
return rv
- def make_wrapper(name):
- orig = getattr(unicode, name)
+ def make_simple_escaping_wrapper(name):
+ orig = getattr(text_type, name)
def func(self, *args, **kwargs):
- args = _escape_argspec(list(args), enumerate(args))
- _escape_argspec(kwargs, kwargs.iteritems())
+ args = _escape_argspec(list(args), enumerate(args), self.escape)
+ _escape_argspec(kwargs, iteritems(kwargs), self.escape)
return self.__class__(orig(self, *args, **kwargs))
func.__name__ = orig.__name__
func.__doc__ = orig.__doc__
@@ -177,32 +179,61 @@
'title', 'lower', 'upper', 'replace', 'ljust', \
'rjust', 'lstrip', 'rstrip', 'center', 'strip', \
'translate', 'expandtabs', 'swapcase', 'zfill':
- locals()[method] = make_wrapper(method)
+ locals()[method] = make_simple_escaping_wrapper(method)
# new in python 2.5
- if hasattr(unicode, 'partition'):
+ if hasattr(text_type, 'partition'):
def partition(self, sep):
return tuple(map(self.__class__,
- unicode.partition(self, escape(sep))))
+ text_type.partition(self, self.escape(sep))))
def rpartition(self, sep):
return tuple(map(self.__class__,
- unicode.rpartition(self, escape(sep))))
+ text_type.rpartition(self, self.escape(sep))))
# new in python 2.6
- if hasattr(unicode, 'format'):
- format = make_wrapper('format')
+ if hasattr(text_type, 'format'):
+ def format(*args, **kwargs):
+ self, args = args[0], args[1:]
+ formatter = EscapeFormatter(self.escape)
+ return self.__class__(formatter.format(self, *args, **kwargs))
+
+ def __html_format__(self, format_spec):
+ if format_spec:
+ raise ValueError('Unsupported format specification '
+ 'for Markup.')
+ return self
# not in python 3
- if hasattr(unicode, '__getslice__'):
- __getslice__ = make_wrapper('__getslice__')
+ if hasattr(text_type, '__getslice__'):
+ __getslice__ = make_simple_escaping_wrapper('__getslice__')
- del method, make_wrapper
+ del method, make_simple_escaping_wrapper
-def _escape_argspec(obj, iterable):
+if hasattr(text_type, 'format'):
+ class EscapeFormatter(string.Formatter):
+
+ def __init__(self, escape):
+ self.escape = escape
+
+ def format_field(self, value, format_spec):
+ if hasattr(value, '__html_format__'):
+ rv = value.__html_format__(format_spec)
+ elif hasattr(value, '__html__'):
+ if format_spec:
+ raise ValueError('No format specification allowed '
+ 'when formatting an object with '
+ 'its __html__ method.')
+ rv = value.__html__()
+ else:
+ rv = string.Formatter.format_field(self, value, format_spec)
+ return text_type(self.escape(rv))
+
+
+def _escape_argspec(obj, iterable, escape):
"""Helper for various string-wrapped functions."""
for key, value in iterable:
- if hasattr(value, '__html__') or isinstance(value, basestring):
+ if hasattr(value, '__html__') or isinstance(value, string_types):
obj[key] = escape(value)
return obj
@@ -210,13 +241,13 @@
class _MarkupEscapeHelper(object):
"""Helper for Markup.__mod__"""
- def __init__(self, obj):
+ def __init__(self, obj, escape):
self.obj = obj
+ self.escape = escape
- __getitem__ = lambda s, x: _MarkupEscapeHelper(s.obj[x])
- __str__ = lambda s: str(escape(s.obj))
- __unicode__ = lambda s: unicode(escape(s.obj))
- __repr__ = lambda s: str(escape(repr(s.obj)))
+ __getitem__ = lambda s, x: _MarkupEscapeHelper(s.obj[x], s.escape)
+ __unicode__ = __str__ = lambda s: text_type(s.escape(s.obj))
+ __repr__ = lambda s: str(s.escape(repr(s.obj)))
__int__ = lambda s: int(s.obj)
__float__ = lambda s: float(s.obj)
@@ -227,3 +258,7 @@
from markupsafe._speedups import escape, escape_silent, soft_unicode
except ImportError:
from markupsafe._native import escape, escape_silent, soft_unicode
+
+if not PY2:
+ soft_str = soft_unicode
+ __all__.append('soft_str')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/markupsafe/_compat.py new/MarkupSafe-0.21/markupsafe/_compat.py
--- old/MarkupSafe-0.15/markupsafe/_compat.py 1970-01-01 01:00:00.000000000 +0100
+++ new/MarkupSafe-0.21/markupsafe/_compat.py 2014-04-17 11:01:00.000000000 +0200
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+"""
+ markupsafe._compat
+ ~~~~~~~~~~~~~~~~~~
+
+ Compatibility module for different Python versions.
+
+ :copyright: (c) 2013 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import sys
+
+PY2 = sys.version_info[0] == 2
+
+if not PY2:
+ text_type = str
+ string_types = (str,)
+ unichr = chr
+ int_types = (int,)
+ iteritems = lambda x: iter(x.items())
+else:
+ text_type = unicode
+ string_types = (str, unicode)
+ unichr = unichr
+ int_types = (int, long)
+ iteritems = lambda x: x.iteritems()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/markupsafe/_native.py new/MarkupSafe-0.21/markupsafe/_native.py
--- old/MarkupSafe-0.15/markupsafe/_native.py 2010-09-07 17:43:12.000000000 +0200
+++ new/MarkupSafe-0.21/markupsafe/_native.py 2013-05-20 19:45:22.000000000 +0200
@@ -9,6 +9,7 @@
:license: BSD, see LICENSE for more details.
"""
from markupsafe import Markup
+from markupsafe._compat import text_type
def escape(s):
@@ -18,7 +19,7 @@
"""
if hasattr(s, '__html__'):
return s.__html__()
- return Markup(unicode(s)
+ return Markup(text_type(s)
.replace('&', '&')
.replace('>', '>')
.replace('<', '<')
@@ -40,6 +41,6 @@
"""Make a string unicode if it isn't already. That way a markup
string is not converted back to unicode.
"""
- if not isinstance(s, unicode):
- s = unicode(s)
+ if not isinstance(s, text_type):
+ s = text_type(s)
return s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/markupsafe/tests.py new/MarkupSafe-0.21/markupsafe/tests.py
--- old/MarkupSafe-0.15/markupsafe/tests.py 2010-09-07 17:43:12.000000000 +0200
+++ new/MarkupSafe-0.21/markupsafe/tests.py 2014-04-17 11:48:41.000000000 +0200
@@ -1,16 +1,19 @@
+# -*- coding: utf-8 -*-
import gc
import unittest
from markupsafe import Markup, escape, escape_silent
+from markupsafe._compat import text_type
class MarkupTestCase(unittest.TestCase):
- def test_markup_operations(self):
+ def test_adding(self):
# adding two strings should escape the unsafe one
unsafe = '<script type="application/x-some-script">alert("foo");</script>'
safe = Markup('<em>username</em>')
- assert unsafe + safe == unicode(escape(unsafe)) + unicode(safe)
+ assert unsafe + safe == text_type(escape(unsafe)) + text_type(safe)
+ def test_string_interpolation(self):
# string interpolations are safe to use too
assert Markup('<em>%s</em>') % '<bad user>' == \
'<em><bad user></em>'
@@ -18,6 +21,10 @@
'username': '<bad user>'
} == '<em><bad user></em>'
+ assert Markup('%i') % 3.14 == '3'
+ assert Markup('%.2f') % 3.14 == '3.14'
+
+ def test_type_behavior(self):
# an escaped object is markup too
assert type(Markup('foo') + 'bar') is Markup
@@ -25,21 +32,87 @@
x = Markup("foo")
assert x.__html__() is x
+ def test_html_interop(self):
# it also knows how to treat __html__ objects
class Foo(object):
def __html__(self):
return '<em>awesome</em>'
def __unicode__(self):
return 'awesome'
+ __str__ = __unicode__
assert Markup(Foo()) == '<em>awesome</em>'
assert Markup('<strong>%s</strong>') % Foo() == \
'<strong><em>awesome</em></strong>'
+ def test_tuple_interpol(self):
+ self.assertEqual(Markup('<em>%s:%s</em>') % (
+ '<foo>',
+ '<bar>',
+ ), Markup(u'<em><foo>:<bar></em>'))
+
+ def test_dict_interpol(self):
+ self.assertEqual(Markup('<em>%(foo)s</em>') % {
+ 'foo': '<foo>',
+ }, Markup(u'<em><foo></em>'))
+ self.assertEqual(Markup('<em>%(foo)s:%(bar)s</em>') % {
+ 'foo': '<foo>',
+ 'bar': '<bar>',
+ }, Markup(u'<em><foo>:<bar></em>'))
+
+ def test_escaping(self):
# escaping and unescaping
assert escape('"<>&\'') == '"<>&''
assert Markup("<em>Foo & Bar</em>").striptags() == "Foo & Bar"
assert Markup("<test>").unescape() == "<test>"
+ def test_formatting(self):
+ for actual, expected in (
+ (Markup('%i') % 3.14, '3'),
+ (Markup('%.2f') % 3.14159, '3.14'),
+ (Markup('%s %s %s') % ('<', 123, '>'), '< 123 >'),
+ (Markup('<em>{awesome}</em>').format(awesome='<awesome>'),
+ '<em><awesome></em>'),
+ (Markup('{0[1][bar]}').format([0, {'bar': '<bar/>'}]),
+ '<bar/>'),
+ (Markup('{0[1][bar]}').format([0, {'bar': Markup('<bar/>')}]),
+ '<bar/>')):
+ assert actual == expected, "%r should be %r!" % (actual, expected)
+
+ def test_custom_formatting(self):
+ class HasHTMLOnly(object):
+ def __html__(self):
+ return Markup('<foo>')
+
+ class HasHTMLAndFormat(object):
+ def __html__(self):
+ return Markup('<foo>')
+ def __html_format__(self, spec):
+ return Markup('<FORMAT>')
+
+ assert Markup('{0}').format(HasHTMLOnly()) == Markup('<foo>')
+ assert Markup('{0}').format(HasHTMLAndFormat()) == Markup('<FORMAT>')
+
+ def test_complex_custom_formatting(self):
+ class User(object):
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('<a href="/user/{0}">{1}</a>').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+ def __html__(self):
+ return Markup('<span class=user>{0}</span>').format(self.username)
+
+ user = User(1, 'foo')
+ assert Markup('<p>User: {0:link}').format(user) == \
+ Markup('<p>User: <a href="/user/1"><span class=user>foo</span></a>')
+
def test_all_set(self):
import markupsafe as markup
for item in markup.__all__:
@@ -50,13 +123,30 @@
assert escape(None) == Markup(None)
assert escape_silent('<foo>') == Markup(u'<foo>')
+ def test_splitting(self):
+ self.assertEqual(Markup('a b').split(), [
+ Markup('a'),
+ Markup('b')
+ ])
+ self.assertEqual(Markup('a b').rsplit(), [
+ Markup('a'),
+ Markup('b')
+ ])
+ self.assertEqual(Markup('a\nb').splitlines(), [
+ Markup('a'),
+ Markup('b')
+ ])
+
+ def test_mul(self):
+ self.assertEqual(Markup('a') * 3, Markup('aaa'))
+
class MarkupLeakTestCase(unittest.TestCase):
def test_markup_leaks(self):
counts = set()
- for count in xrange(20):
- for item in xrange(1000):
+ for count in range(20):
+ for item in range(1000):
escape("foo")
escape("<foo>")
escape(u"foo")
@@ -78,3 +168,5 @@
if __name__ == '__main__':
unittest.main(defaultTest='suite')
+
+# vim:sts=4:sw=4:et:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MarkupSafe-0.15/setup.py new/MarkupSafe-0.21/setup.py
--- old/MarkupSafe-0.15/setup.py 2011-07-20 10:57:59.000000000 +0200
+++ new/MarkupSafe-0.21/setup.py 2014-04-17 11:50:25.000000000 +0200
@@ -1,9 +1,9 @@
import os
import sys
-from setuptools import setup, Extension, Feature
+from setuptools import setup, Extension
from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError, DistutilsExecError, \
- DistutilsPlatformError
+ DistutilsPlatformError
# fail safe compilation shamelessly stolen from the simplejson
@@ -13,24 +13,20 @@
is_pypy = hasattr(sys, 'pypy_version_info')
-speedups = Feature(
- 'optional C speed-enhancement module',
- standard=True,
- ext_modules = [
- Extension('markupsafe._speedups', ['markupsafe/_speedups.c']),
- ],
-)
+# Remove old arguments that were once supported. Thanks setuptools
+# 3.0 for just randomly removing functionality.
+for arg in '--with-speedups', '--without-speedups':
+ try:
+ sys.argv.remove(arg)
+ except ValueError:
+ pass
+
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError)
if sys.platform == 'win32' and sys.version_info > (2, 6):
- # 2.6's distutils.msvc9compiler can raise an IOError when failing to
- # find the compiler
- ext_errors += (IOError,)
-
-
-extra = {}
-if sys.version_info >= (3, 0):
- extra['use_2to3'] = True
+ # 2.6's distutils.msvc9compiler can raise an IOError when failing to
+ # find the compiler
+ ext_errors += (IOError,)
class BuildFailed(Exception):
@@ -66,13 +62,12 @@
def run_setup(with_binary):
- features = {}
- if with_binary:
- features['speedups'] = speedups
+ ext = Extension('markupsafe._speedups', ['markupsafe/_speedups.c'])
+ ext_modules = [ext] if with_binary else []
setup(
name='MarkupSafe',
- version='0.15',
- url='http://dev.pocoo.org/',
+ version='0.21',
+ url='http://github.com/mitsuhiko/markupsafe',
license='BSD',
author='Armin Ronacher',
author_email='armin.ronacher(a)active-4.com',
@@ -95,8 +90,7 @@
test_suite='markupsafe.tests.suite',
include_package_data=True,
cmdclass={'build_ext': ve_build_ext},
- features=features,
- **extra
+ ext_modules=ext_modules,
)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-Jinja2 for openSUSE:Factory checked in at 2014-05-09 06:58:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-Jinja2 (Old)
and /work/SRC/openSUSE:Factory/.python3-Jinja2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-Jinja2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-Jinja2/python3-Jinja2.changes 2014-01-10 21:21:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-Jinja2.new/python3-Jinja2.changes 2014-05-09 06:58:27.000000000 +0200
@@ -1,0 +2,11 @@
+Thu May 8 11:31:19 UTC 2014 - toddrme2178(a)gmail.com
+
+- update to 2.7.2:
+ - Prefix loader was not forwarding the locals properly to
+ inner loaders. This is now fixed.
+ - Security issue: Changed the default folder for the filesystem cache to be
+ user specific and read and write protected on UNIX systems. See `Debian bug
+ 734747`_ for more information.
+- avoid rebuildcycle with vim
+
+-------------------------------------------------------------------
Old:
----
Jinja2-2.7.1.tar.gz
New:
----
Jinja2-2.7.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-Jinja2.spec ++++++
--- /var/tmp/diff_new_pack.wyDApf/_old 2014-05-09 06:58:27.000000000 +0200
+++ /var/tmp/diff_new_pack.wyDApf/_new 2014-05-09 06:58:27.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-Jinja2
-Version: 2.7.1
+Version: 2.7.2
Release: 0
Summary: A fast and easy to use template engine written in pure Python
License: BSD-3-Clause
@@ -29,7 +29,6 @@
BuildRequires: python3-2to3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
-BuildRequires: vim
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: python3-MarkupSafe
@@ -85,10 +84,14 @@
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE artwork examples
-%{python3_sitelib}/*
+%{python3_sitelib}/jinja2/
+%{python3_sitelib}/Jinja2-%{version}-py*.egg-info
%files vim
%defattr(-,root,root,-)
+%dir %{_datadir}/vim
+%dir %{_datadir}/vim/site
+%dir %{_datadir}/vim/site/syntax
%{_datadir}/vim/site/syntax/jinja-python%{py3_ver}.vim
%files emacs
++++++ Jinja2-2.7.1.tar.gz -> Jinja2-2.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/CHANGES new/Jinja2-2.7.2/CHANGES
--- old/Jinja2-2.7.1/CHANGES 2013-08-07 14:05:58.000000000 +0200
+++ new/Jinja2-2.7.2/CHANGES 2014-01-10 11:41:21.000000000 +0100
@@ -1,6 +1,18 @@
Jinja2 Changelog
================
+Version 2.7.2
+-------------
+(bugfix release, released on January 10th 2014)
+
+- Prefix loader was not forwarding the locals properly to
+ inner loaders. This is now fixed.
+- Security issue: Changed the default folder for the filesystem cache to be
+ user specific and read and write protected on UNIX systems. See `Debian bug
+ 734747`_ for more information.
+
+.. _Debian bug 734747: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734747
+
Version 2.7.1
-------------
(bugfix release, released on August 7th 2013)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/Jinja2.egg-info/PKG-INFO new/Jinja2-2.7.2/Jinja2.egg-info/PKG-INFO
--- old/Jinja2-2.7.1/Jinja2.egg-info/PKG-INFO 2013-08-07 15:27:32.000000000 +0200
+++ new/Jinja2-2.7.2/Jinja2.egg-info/PKG-INFO 2014-01-10 11:42:33.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: Jinja2
-Version: 2.7.1
+Version: 2.7.2
Summary: A small but fast and easy to use stand-alone template engine written in pure python.
Home-page: http://jinja.pocoo.org/
Author: Armin Ronacher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/PKG-INFO new/Jinja2-2.7.2/PKG-INFO
--- old/Jinja2-2.7.1/PKG-INFO 2013-08-07 15:27:32.000000000 +0200
+++ new/Jinja2-2.7.2/PKG-INFO 2014-01-10 11:42:36.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: Jinja2
-Version: 2.7.1
+Version: 2.7.2
Summary: A small but fast and easy to use stand-alone template engine written in pure python.
Home-page: http://jinja.pocoo.org/
Author: Armin Ronacher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/jinja2/__init__.py new/Jinja2-2.7.2/jinja2/__init__.py
--- old/Jinja2-2.7.1/jinja2/__init__.py 2013-08-07 15:27:31.000000000 +0200
+++ new/Jinja2-2.7.2/jinja2/__init__.py 2014-01-10 11:42:33.000000000 +0100
@@ -27,7 +27,7 @@
:license: BSD, see LICENSE for more details.
"""
__docformat__ = 'restructuredtext en'
-__version__ = '2.7.1'
+__version__ = '2.7.2'
# high level interface
from jinja2.environment import Environment, Template
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/jinja2/bccache.py new/Jinja2-2.7.2/jinja2/bccache.py
--- old/Jinja2-2.7.1/jinja2/bccache.py 2013-08-07 13:31:17.000000000 +0200
+++ new/Jinja2-2.7.2/jinja2/bccache.py 2014-01-10 11:42:03.000000000 +0100
@@ -15,7 +15,9 @@
:license: BSD.
"""
from os import path, listdir
+import os
import sys
+import errno
import marshal
import tempfile
import fnmatch
@@ -189,7 +191,9 @@
two arguments: The directory where the cache items are stored and a
pattern string that is used to build the filename.
- If no directory is specified the system temporary items folder is used.
+ If no directory is specified a default cache directory is selected. On
+ Windows the user's temp directory is used, on UNIX systems a directory
+ is created for the user in the system temp directory.
The pattern can be used to have multiple separate caches operate on the
same directory. The default pattern is ``'__jinja2_%s.cache'``. ``%s``
@@ -202,10 +206,32 @@
def __init__(self, directory=None, pattern='__jinja2_%s.cache'):
if directory is None:
- directory = tempfile.gettempdir()
+ directory = self._get_default_cache_dir()
self.directory = directory
self.pattern = pattern
+ def _get_default_cache_dir(self):
+ tmpdir = tempfile.gettempdir()
+
+ # On windows the temporary directory is used specific unless
+ # explicitly forced otherwise. We can just use that.
+ if os.name == 'n':
+ return tmpdir
+ if not hasattr(os, 'getuid'):
+ raise RuntimeError('Cannot determine safe temp directory. You '
+ 'need to explicitly provide one.')
+
+ dirname = '_jinja2-cache-%d' % os.getuid()
+ actual_dir = os.path.join(tmpdir, dirname)
+ try:
+ # 448 == 0700
+ os.mkdir(actual_dir, 448)
+ except OSError as e:
+ if e.errno != errno.EEXIST:
+ raise
+
+ return actual_dir
+
def _get_cache_filename(self, bucket):
return path.join(self.directory, self.pattern % bucket.key)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/jinja2/loaders.py new/Jinja2-2.7.2/jinja2/loaders.py
--- old/Jinja2-2.7.1/jinja2/loaders.py 2013-07-26 18:00:44.000000000 +0200
+++ new/Jinja2-2.7.2/jinja2/loaders.py 2014-01-10 11:14:43.000000000 +0100
@@ -349,7 +349,7 @@
def load(self, environment, name, globals=None):
loader, local_name = self.get_loader(name)
try:
- return loader.load(environment, local_name)
+ return loader.load(environment, local_name, globals)
except TemplateNotFound:
# re-raise the exception with the correct fileame here.
# (the one that includes the prefix)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Jinja2-2.7.1/setup.py new/Jinja2-2.7.2/setup.py
--- old/Jinja2-2.7.1/setup.py 2013-08-07 15:27:31.000000000 +0200
+++ new/Jinja2-2.7.2/setup.py 2014-01-10 11:42:33.000000000 +0100
@@ -57,7 +57,7 @@
setup(
name='Jinja2',
- version='2.7.1',
+ version='2.7.2',
url='http://jinja.pocoo.org/',
license='BSD',
author='Armin Ronacher',
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-Cython for openSUSE:Factory checked in at 2014-05-09 06:58:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-Cython (Old)
and /work/SRC/openSUSE:Factory/.python3-Cython.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-Cython"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-Cython/python3-Cython.changes 2014-02-05 16:33:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-Cython.new/python3-Cython.changes 2014-05-09 06:58:21.000000000 +0200
@@ -1,0 +2,20 @@
+Thu May 8 11:40:51 UTC 2014 - toddrme2178(a)gmail.com
+
+- Update to version 0.20.1
+ * List/Tuple literals multiplied by more than one factor were only multiplied
+ by the last factor instead of all.
+ * Lookups of special methods (specifically for context managers) could fail
+ in Python <= 2.6/3.1.
+ * Local variables were erroneously appended to the signature introspection
+ of Cython implemented functions with keyword-only arguments under Python 3.
+ * In-place assignments to variables with inferred Python builtin/extension
+ types could fail with type errors if the result value type was incompatible
+ with the type of the previous value.
+ * The C code generation order of cdef classes, closures, helper code,
+ etc. was not deterministic, thus leading to high code churn.
+ * Type inference could fail to deduce C enum types.
+ * Type inference could deduce unsafe or inefficient types from integer
+ assignments within a mix of inferred Python variables and integer
+ variables.
+
+-------------------------------------------------------------------
Old:
----
Cython-0.20.tar.gz
New:
----
Cython-0.20.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-Cython.spec ++++++
--- /var/tmp/diff_new_pack.NmXdQn/_old 2014-05-09 06:58:22.000000000 +0200
+++ /var/tmp/diff_new_pack.NmXdQn/_new 2014-05-09 06:58:22.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-Cython
-Version: 0.20
+Version: 0.20.1
Release: 0
Url: http://www.cython.org
Summary: The Cython compiler for writing C extensions for the Python language
++++++ Cython-0.20.tar.gz -> Cython-0.20.1.tar.gz ++++++
++++ 80943 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-coverage for openSUSE:Factory checked in at 2014-05-09 06:58:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-coverage (Old)
and /work/SRC/openSUSE:Factory/.python3-coverage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-coverage"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-coverage/python3-coverage.changes 2013-06-21 19:01:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-coverage.new/python3-coverage.changes 2014-05-09 06:58:16.000000000 +0200
@@ -1,0 +2,16 @@
+Thu May 8 11:37:39 UTC 2014 - toddrme2178(a)gmail.com
+
+- update to 3.7.1:
+ - Improved the speed of HTML report generation by about 20%.
+ - Fixed the mechanism for finding OS-installed static files for the HTML report
+ so that it will actually find OS-installed static files.
+- update to 3.7:
+ * Added the ``--debug`` switch to ``coverage run``. It accepts a list of
+ options indicating the type of internal activity to log to stderr.
+ * Running code with ``coverage run -m`` now behaves more like Python does,
+ setting sys.path properly, which fixes `issue 207`_ and `issue 242`_.
+ * Coverage can now run .pyc files directly, closing `issue 264`_.
+ * Over 15 other bugfixes, see included CHANGELOG
+- Require python-setuptools instead of distribute (upstreams merged)
+
+-------------------------------------------------------------------
Old:
----
coverage-3.6.tar.gz
New:
----
coverage-3.7.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-coverage.spec ++++++
--- /var/tmp/diff_new_pack.xb3UK1/_old 2014-05-09 06:58:16.000000000 +0200
+++ /var/tmp/diff_new_pack.xb3UK1/_new 2014-05-09 06:58:16.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-coverage
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python3-coverage
-Version: 3.6
+Version: 3.7.1
Release: 0
Url: http://nedbatchelder.com/code/coverage/%{version}
Summary: Code coverage measurement for Python
@@ -27,8 +27,12 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3
BuildRequires: python3-devel
-BuildRequires: python3-distribute
-Requires: python3-distribute
+BuildRequires: python3-setuptools
+Requires: python3-setuptools
+%if 0%{?suse_version} && 0%{?suse_version} <= 1310
+BuildRequires: python3-xml
+Requires: python3-xml
+%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
++++++ coverage-3.6.tar.gz -> coverage-3.7.1.tar.gz ++++++
++++ 36757 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-construct for openSUSE:Factory checked in at 2014-05-09 06:58:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-construct (Old)
and /work/SRC/openSUSE:Factory/.python3-construct.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-construct"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-construct/python3-construct.changes 2014-02-26 06:55:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-construct.new/python3-construct.changes 2014-05-09 06:58:11.000000000 +0200
@@ -1,0 +2,6 @@
+Sat May 3 12:45:47 UTC 2014 - matwey.kornilov(a)gmail.com
+
+- Version 2.5.2:
+ - Misc minor fixes in docs
+
+-------------------------------------------------------------------
Old:
----
construct-2.5.1.tar.gz
New:
----
construct-2.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-construct.spec ++++++
--- /var/tmp/diff_new_pack.yovrRp/_old 2014-05-09 06:58:11.000000000 +0200
+++ /var/tmp/diff_new_pack.yovrRp/_new 2014-05-09 06:58:11.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-construct
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -13,15 +13,16 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
Name: python3-construct
-Version: 2.5.1
+Version: 2.5.2
Release: 0
-License: MIT
Summary: A powerful declarative parser/builder for binary data
-Url: http://construct.readthedocs.org
+License: MIT
Group: Development/Languages/Python
+Url: http://construct.readthedocs.org
Source: http://pypi.python.org/packages/source/c/construct/construct-%{version}.tar…
# PATCH-FEATURE-OPENSUSE split_debug.patch matwey.kornilov(a)gmail.com -- make debug.py non-loadable
Patch0: split_debug.patch
@@ -54,3 +55,4 @@
%doc LICENSE README.rst
%{python3_sitelib}/*
+%changelog
++++++ construct-2.5.1.tar.gz -> construct-2.5.2.tar.gz ++++++
++++ 1604 lines of diff (skipped)
++++++ split_debug.patch ++++++
--- /var/tmp/diff_new_pack.yovrRp/_old 2014-05-09 06:58:12.000000000 +0200
+++ /var/tmp/diff_new_pack.yovrRp/_new 2014-05-09 06:58:12.000000000 +0200
@@ -1,7 +1,7 @@
-Index: construct-2.5.1/construct/__init__.py
+Index: construct-2.5.2/construct/__init__.py
===================================================================
---- construct-2.5.1.orig/construct/__init__.py
-+++ construct-2.5.1/construct/__init__.py
+--- construct-2.5.2.orig/construct/__init__.py
++++ construct-2.5.2/construct/__init__.py
@@ -35,7 +35,6 @@ from construct.macros import (Alias, Ali
SNInt8, SeqOfOne, String, SymmetricMapping, UBInt16, UBInt32, UBInt64, UBInt8, ULInt16, ULInt32, ULInt64,
ULInt8, UNInt16, UNInt32, UNInt64, UNInt8)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package pcsc-cyberjack for openSUSE:Factory checked in at 2014-05-09 06:58:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pcsc-cyberjack (Old)
and /work/SRC/openSUSE:Factory/.pcsc-cyberjack.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pcsc-cyberjack"
Changes:
--------
--- /work/SRC/openSUSE:Factory/pcsc-cyberjack/pcsc-cyberjack.changes 2014-04-26 06:06:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.pcsc-cyberjack.new/pcsc-cyberjack.changes 2014-05-09 06:58:06.000000000 +0200
@@ -1,0 +2,11 @@
+Sun May 4 22:20:57 UTC 2014 - wr(a)rosenauer.org
+
+- fix for changed data structure in PCSC's reader.h
+ (data-structure.patch)
+
+-------------------------------------------------------------------
+Tue Apr 29 18:14:56 UTC 2014 - wr(a)rosenauer.org
+
+- fixed typo in udev rule
+
+-------------------------------------------------------------------
New:
----
data-structure.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pcsc-cyberjack.spec ++++++
--- /var/tmp/diff_new_pack.DfjsnA/_old 2014-05-09 06:58:07.000000000 +0200
+++ /var/tmp/diff_new_pack.DfjsnA/_new 2014-05-09 06:58:07.000000000 +0200
@@ -50,6 +50,7 @@
Patch1: ctapi-cyberjack-configure.patch
Patch2: ctapi-cyberjack-check.patch
Patch3: pcsc-cyberjack-fprintf.patch
+Patch4: data-structure.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define ifddir %(pkg-config --variable=usbdropdir libpcsclite)
Supplements: modalias(usb:v0C4Bp0100d*dc*dsc*dp*ic*isc*ip*)
@@ -74,6 +75,7 @@
%patch1
%patch2
%patch3 -p1
+%patch4 -p1
%build
ACLOCAL="aclocal -I m4" autoreconf -f -i
++++++ 40-cyberjack.rules ++++++
--- /var/tmp/diff_new_pack.DfjsnA/_old 2014-05-09 06:58:07.000000000 +0200
+++ /var/tmp/diff_new_pack.DfjsnA/_new 2014-05-09 06:58:07.000000000 +0200
@@ -1,6 +1,6 @@
SUBSYSTEM!="usb", GOTO="cyberjack_rules_end"
ENV{DEVTYPE}!="usb_device", GOTO="cyberjack_rules_end"
-ACTION!="add", GOTO=cyberjack_rules_end"
+ACTION!="add", GOTO="cyberjack_rules_end"
ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
++++++ data-structure.patch ++++++
diff --git a/cjeca32/CCIDReader.cpp b/cjeca32/CCIDReader.cpp
index 1ab4135..91489bc 100644
--- a/cjeca32/CCIDReader.cpp
+++ b/cjeca32/CCIDReader.cpp
@@ -3115,15 +3115,15 @@ RSCT_IFD_RESULT CCCIDReader::IfdVendor(uint32_t IoCtrlCode,uint8_t *Input,uint32
case CJPCSC_VEN_IOCTRL_VERIFY_PIN_DIRECT:
if(InputLength<sizeof(PIN_VERIFY_STRUCTURE))
return STATUS_INVALID_BUFFER_SIZE;
- if(InputLength!=sizeof(PIN_VERIFY_STRUCTURE)-sizeof(uint8_t)+((PIN_VERIFY_STRUCTURE *)Input)->ulDataLength)
+ if(InputLength!=sizeof(PIN_VERIFY_STRUCTURE)-sizeof(PIN_VERIFY_STRUCTURE::abData)+((PIN_VERIFY_STRUCTURE *)Input)->ulDataLength)
return STATUS_INVALID_BUFFER_SIZE;
return IfdVerifyPinDirect((PIN_VERIFY_STRUCTURE *)Input,Output,OutputLength);
case CJPCSC_VEN_IOCTRL_MODIFY_PIN_DIRECT:
if(InputLength<sizeof(PIN_MODIFY_STRUCTURE))
return STATUS_INVALID_BUFFER_SIZE;
- if(InputLength!=sizeof(PIN_MODIFY_STRUCTURE)-sizeof(uint8_t)+((PIN_MODIFY_STRUCTURE *)Input)->ulDataLength)
- return STATUS_INVALID_BUFFER_SIZE;
+ if(InputLength!=sizeof(PIN_MODIFY_STRUCTURE)-sizeof(PIN_MODIFY_STRUCTURE::abData)+((PIN_MODIFY_STRUCTURE *)Input)->ulDataLength)
+ return STATUS_INVALID_BUFFER_SIZE;
return IfdModifyPinDirect((PIN_MODIFY_STRUCTURE *)Input,Output,OutputLength);
case CJPCSC_VEN_IOCTRL_SET_NORM:
if(InputLength<1)
diff --git a/cjeca32/stdafx.h b/cjeca32/stdafx.h
index 7149946..87c78f8 100644
--- a/cjeca32/stdafx.h
+++ b/cjeca32/stdafx.h
@@ -57,6 +57,12 @@
#include "cjeca32.h"
#include "PCSC10.h"
+#ifdef OS_LINUX
+#include <PCSC/reader.h>
+#else
+#include "PCSC10.h"
+#endif
+
#include "Debug.h"
#include "RSCTCriticalSection.h"
#include "BaseCommunication.h"
diff --git a/doc/verifypin_ascii.c b/doc/verifypin_ascii.c
index c41d97b..c27caba 100644
--- a/doc/verifypin_ascii.c
+++ b/doc/verifypin_ascii.c
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
pin_verify -> abData[offset++] = 0x20; /* '\0' */
pin_verify -> ulDataLength = htonl(offset); /* APDU size */
- length = sizeof(PIN_VERIFY_STRUCTURE) + offset -1; /* -1 because PIN_VERIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_VERIFY_STRUCTURE) + offset - sizeof(PIN_VERIFY_STRUCTURE::abData); /* because PIN_VERIFY_STRUCTURE may contain the first byte of abData[] */
printf(" command:");
for (i=0; i<length; i++)
@@ -463,7 +463,7 @@ int main(int argc, char *argv[])
pin_modify -> abData[offset++] = 0x30; /* '0' */
pin_modify -> ulDataLength = HOST_TO_CCID_32(offset); /* APDU size */
- length = sizeof(PIN_MODIFY_STRUCTURE) + offset -1; /* -1 because PIN_MODIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_MODIFY_STRUCTURE) + offset -sizeof(PIN_MODIFY_STRUCTURE::abData); /* because PIN_MODIFY_STRUCTURE may contain the first byte of abData[] */;
printf(" command:");
for (i=0; i<length; i++)
diff --git a/doc/verifypin_fpin2.c b/doc/verifypin_fpin2.c
index 4ee4362..c4bc9c1 100644
--- a/doc/verifypin_fpin2.c
+++ b/doc/verifypin_fpin2.c
@@ -331,7 +331,7 @@ int main(int argc, char *argv[])
pin_verify -> abData[offset++] = 0xff; /* '\0' */
pin_verify -> ulDataLength = htonl(offset); /* APDU size */
- length = sizeof(PIN_VERIFY_STRUCTURE) + offset -1; /* -1 because PIN_VERIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_VERIFY_STRUCTURE) + offset - sizeof(PIN_VERIFY_STRUCTURE::abData); /* because PIN_VERIFY_STRUCTURE may contain the first byte of abData[] */
printf(" command:");
for (i=0; i<length; i++)
@@ -464,7 +464,7 @@ int main(int argc, char *argv[])
pin_modify -> abData[offset++] = 0x30; /* '0' */
pin_modify -> ulDataLength = HOST_TO_CCID_32(offset); /* APDU size */
- length = sizeof(PIN_MODIFY_STRUCTURE) + offset -1; /* -1 because PIN_MODIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_MODIFY_STRUCTURE) + offset -sizeof(PIN_MODIFY_STRUCTURE::abData); /* because PIN_MODIFY_STRUCTURE may contain the first byte of abData[] */
printf(" command:");
for (i=0; i<length; i++)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0