r2156 - in zope.deprecation/trunk (13 files)
takaki at users.alioth.debian.org
takaki at users.alioth.debian.org
Fri Feb 11 02:48:20 UTC 2011
Date: Friday, February 11, 2011 @ 02:48:19
Author: takaki
Revision: 2156
[svn-inject] Applying Debian modifications (3.4.0-1) to trunk
Added:
zope.deprecation/trunk/debian/
zope.deprecation/trunk/debian/changelog
zope.deprecation/trunk/debian/compat
zope.deprecation/trunk/debian/control
zope.deprecation/trunk/debian/copyright
zope.deprecation/trunk/debian/docs
zope.deprecation/trunk/debian/patches/
zope.deprecation/trunk/debian/patches/debian-changes-3.4.0-1
zope.deprecation/trunk/debian/patches/series
zope.deprecation/trunk/debian/rules
zope.deprecation/trunk/debian/source/
zope.deprecation/trunk/debian/source/format
zope.deprecation/trunk/debian/watch
Property changes on: zope.deprecation/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
+ 1
Added: zope.deprecation/trunk/debian/changelog
===================================================================
--- zope.deprecation/trunk/debian/changelog (rev 0)
+++ zope.deprecation/trunk/debian/changelog 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,5 @@
+zope.deprecation (3.4.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #604999)
+
+ -- TANIGUCHI Takaki <takaki at debian.org> Fri, 26 Nov 2010 10:40:54 +0900
Added: zope.deprecation/trunk/debian/compat
===================================================================
--- zope.deprecation/trunk/debian/compat (rev 0)
+++ zope.deprecation/trunk/debian/compat 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1 @@
+7
Added: zope.deprecation/trunk/debian/control
===================================================================
--- zope.deprecation/trunk/debian/control (rev 0)
+++ zope.deprecation/trunk/debian/control 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,17 @@
+Source: zope.deprecation
+Section: python
+Priority: extra
+Maintainer: TANIGUCHI Takaki <takaki at debian.org>
+Build-Depends: debhelper (>= 7.0.50~), python-support, python-setuptools
+Standards-Version: 3.9.1
+Homepage: http://pypi.python.org/pypi/zope.deprecation
+#Vcs-Git: git://git.debian.org/collab-maint/zope.deprecation.git
+#Vcs-Browser: http://git.debian.org/?p=collab-maint/zope.deprecation.git;a=summary
+
+Package: python-zope.deprecation
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Provides: ${python:Provides}
+Description: Zope 3 Deprecation Infrastructure
+ This package marks 'deprecated' Zope objects which are module, classes,
+ functiona, methods and properties.
Added: zope.deprecation/trunk/debian/copyright
===================================================================
--- zope.deprecation/trunk/debian/copyright (rev 0)
+++ zope.deprecation/trunk/debian/copyright 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,79 @@
+This work was packaged for Debian by:
+
+ TANIGUCHI Takaki <takaki at debian.org> on Fri, 26 Nov 2010 10:40:54 +0900
+
+It was downloaded from:
+
+ http://pypi.python.org/pypi/zope.deprecation
+
+Upstream Author:
+
+ Zope Corporation and Contributors <zope3-dev at zope.org>
+
+Copyright:
+
+ Copyright (c) 2006 Zope Corporation and Contributors.
+
+License:
+
+Zope Public License (ZPL) Version 2.1
+-------------------------------------
+
+A copyright notice accompanies this license document that
+identifies the copyright holders.
+
+This license has been certified as open source. It has also
+been designated as GPL compatible by the Free Software
+Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions in source code must retain the
+ accompanying copyright notice, this list of conditions,
+ and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to
+ endorse or promote products derived from this software
+ without prior written permission from the copyright
+ holders.
+
+4. The right to distribute this software or to use it for
+ any purpose does not give you the right to use
+ Servicemarks (sm) or Trademarks (tm) of the copyright
+ holders. Use of them is covered by separate agreement
+ with the copyright holders.
+
+5. If any files are modified, you must cause the modified
+ files to carry prominent notices stating that you changed
+ the files and the date of any change.
+
+Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+ AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ NO EVENT SHALL THE COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+
+The Debian packaging is:
+
+ Copyright (C) 2010 TANIGUCHI Takaki <takaki at debian.org>
+
+and is licensed under the GPL version 3,
+see "/usr/share/common-licenses/GPL-3".
Added: zope.deprecation/trunk/debian/docs
===================================================================
--- zope.deprecation/trunk/debian/docs (rev 0)
+++ zope.deprecation/trunk/debian/docs 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,2 @@
+README.txt
+README.txt
Added: zope.deprecation/trunk/debian/patches/debian-changes-3.4.0-1
===================================================================
--- zope.deprecation/trunk/debian/patches/debian-changes-3.4.0-1 (rev 0)
+++ zope.deprecation/trunk/debian/patches/debian-changes-3.4.0-1 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,611 @@
+Description: Upstream changes introduced in version 3.4.0-1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ zope.deprecation (3.4.0-1) unstable; urgency=low
+ .
+ * Initial release (Closes: #604999)
+ .
+ The person named in the Author field signed this changelog entry.
+Author: TANIGUCHI Takaki <takaki at debian.org>
+Bug-Debian: http://bugs.debian.org/604999
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- zope.deprecation-3.4.0.orig/src/zope.deprecation.egg-info/PKG-INFO
++++ zope.deprecation-3.4.0/src/zope.deprecation.egg-info/PKG-INFO
+@@ -75,15 +75,15 @@ Description: ****************
+ demonstrate the functionality, I have placed the following code inside the
+ `tests.py` file of this package:
+
+- from zope.deprecation import deprecated
+- demo1 = 1
+- deprecated('demo1', 'demo1 is no more.')
++ from zope.deprecation import deprecated
++ demo1 = 1
++ deprecated('demo1', 'demo1 is no more.')
+
+- demo2 = 2
+- deprecated('demo2', 'demo2 is no more.')
++ demo2 = 2
++ deprecated('demo2', 'demo2 is no more.')
+
+- demo3 = 3
+- deprecated('demo3', 'demo3 is no more.')
++ demo3 = 3
++ deprecated('demo3', 'demo3 is no more.')
+
+ The first argument to the `deprecated()` function is a list of names that
+ should be declared deprecated. If the first argument is a string, it is
+@@ -93,43 +93,43 @@ Description: ****************
+
+ Let's now see how the deprecation warnings are displayed.
+
+- >>> from zope.deprecation import tests
+- >>> tests.demo1
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: demo1: demo1 is no more.
+- ...
+- 1
+-
+- >>> import zope.deprecation.tests
+- >>> zope.deprecation.tests.demo2
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: demo2: demo2 is no more.
+- ...
+- 2
++ >>> from zope.deprecation import tests
++ >>> tests.demo1
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: demo1: demo1 is no more.
++ ...
++ 1
++
++ >>> import zope.deprecation.tests
++ >>> zope.deprecation.tests.demo2
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: demo2: demo2 is no more.
++ ...
++ 2
+
+ You can see that merely importing the affected module or one of its parents
+ does not cause a deprecation warning. Only when we try to access the name in
+ the module, we get a deprecation warning. On the other hand, if we import the
+ name directly, the deprecation warning will be raised immediately.
+
+- >>> from zope.deprecation.tests import demo3
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: demo3: demo3 is no more.
+- ...
++ >>> from zope.deprecation.tests import demo3
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: demo3: demo3 is no more.
++ ...
+
+ Deprecation can also happen inside a function. When we first access
+ ``demo4``, it can be accessed without problems, then we call a
+ function that sets the deprecation message and we get the message upon
+ the next access:
+
+- >>> tests.demo4
+- 4
+- >>> tests.deprecatedemo4()
+- >>> tests.demo4
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: demo4: demo4 is no more.
+- ...
+- 4
++ >>> tests.demo4
++ 4
++ >>> tests.deprecatedemo4()
++ >>> tests.demo4
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: demo4: demo4 is no more.
++ ...
++ 4
+
+ Deprecating methods and properties
+ ----------------------------------
+@@ -140,46 +140,46 @@ Description: ****************
+ returns a wrapper that sends out a deprecation warning when the attribute or
+ method is accessed.
+
+- >>> from zope.deprecation import deprecation
+- >>> class MyComponent(object):
+- ... foo = property(lambda self: 1)
+- ... foo = deprecation.deprecated(foo, 'foo is no more.')
+- ...
+- ... bar = 2
+- ...
+- ... def blah(self):
+- ... return 3
+- ... blah = deprecation.deprecated(blah, 'blah() is no more.')
+- ...
+- ... def splat(self):
+- ... return 4
+- ...
+- ... @deprecation.deprecate("clap() is no more.")
+- ... def clap(self):
+- ... return 5
++ >>> from zope.deprecation import deprecation
++ >>> class MyComponent(object):
++ ... foo = property(lambda self: 1)
++ ... foo = deprecation.deprecated(foo, 'foo is no more.')
++ ...
++ ... bar = 2
++ ...
++ ... def blah(self):
++ ... return 3
++ ... blah = deprecation.deprecated(blah, 'blah() is no more.')
++ ...
++ ... def splat(self):
++ ... return 4
++ ...
++ ... @deprecation.deprecate("clap() is no more.")
++ ... def clap(self):
++ ... return 5
+
+ And here is the result:
+
+- >>> my = MyComponent()
+- >>> my.foo
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: foo is no more.
+- ...
+- 1
+- >>> my.bar
+- 2
+- >>> my.blah()
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: blah() is no more.
+- ...
+- 3
+- >>> my.splat()
+- 4
+- >>> my.clap()
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: clap() is no more.
+- ...
+- 5
++ >>> my = MyComponent()
++ >>> my.foo
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: foo is no more.
++ ...
++ 1
++ >>> my.bar
++ 2
++ >>> my.blah()
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: blah() is no more.
++ ...
++ 3
++ >>> my.splat()
++ 4
++ >>> my.clap()
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: clap() is no more.
++ ...
++ 5
+
+ Deprecating modules
+ -------------------
+@@ -189,23 +189,23 @@ Description: ****************
+ the ``zope.deprecation`` module used to be called ``zope.wanda`` and
+ we'd like to retain backward compatibility:
+
+- >>> import zope.deprecation
+- >>> import sys
+- >>> sys.modules['zope.wanda'] = deprecation.deprecated(
+- ... zope.deprecation, 'A module called Wanda is now zope.deprecation.')
++ >>> import zope.deprecation
++ >>> import sys
++ >>> sys.modules['zope.wanda'] = deprecation.deprecated(
++ ... zope.deprecation, 'A module called Wanda is now zope.deprecation.')
+
+ Now we can import ``wanda``, but when accessing things from it, we get
+ our deprecation message as expected:
+
+- >>> from zope.wanda import deprecated
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: A module called Wanda is now zope.deprecation.
+- ...
++ >>> from zope.wanda import deprecated
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: A module called Wanda is now zope.deprecation.
++ ...
+
+ Before we move on, we should clean up:
+
+- >>> del deprecated
+- >>> del sys.modules['zope.wanda']
++ >>> del deprecated
++ >>> del sys.modules['zope.wanda']
+
+ Moving modules
+ --------------
+@@ -220,131 +220,131 @@ Description: ****************
+ in the "old" location that used the moved function to indicate the a
+ module on the new location should be used:
+
+- >>> create_module(old_location=
+- ... '''
+- ... import zope.deprecation
+- ... zope.deprecation.moved('zope.deprecation.new_location', 'version 2')
+- ... ''')
+-
++ >>> create_module(old_location=
++ ... '''
++ ... import zope.deprecation
++ ... zope.deprecation.moved('zope.deprecation.new_location', 'version 2')
++ ... ''')
++
+ and we define the module in the new location:
+
+- >>> create_module(new_location=
+- ... '''\
+- ... print "new module imported"
+- ... x = 42
+- ... ''')
++ >>> create_module(new_location=
++ ... '''\
++ ... print "new module imported"
++ ... x = 42
++ ... ''')
+
+ Now, if we import the old location, we'll see the output of importing
+ the old location:
+
+- >>> import zope.deprecation.old_location
+- ... # doctest: +NORMALIZE_WHITESPACE
+- From tests.py's showwarning():
+- ...zope/deprecation/README.txt:1:
+- DeprecationWarning: zope.deprecation.old_location has moved to
+- zope.deprecation.new_location.
+- Import of zope.deprecation.old_location will become unsupported
+- in version 2
+- ===============
+- new module imported
++ >>> import zope.deprecation.old_location
++ ... # doctest: +NORMALIZE_WHITESPACE
++ From tests.py's showwarning():
++ ...zope/deprecation/README.txt:1:
++ DeprecationWarning: zope.deprecation.old_location has moved to
++ zope.deprecation.new_location.
++ Import of zope.deprecation.old_location will become unsupported
++ in version 2
++ ===============
++ new module imported
+
+- >>> zope.deprecation.old_location.x
+- 42
++ >>> zope.deprecation.old_location.x
++ 42
+
+ Moving packages
+ ---------------
+
+- When moving packages, you need to leave placeholders for each
++ When moving packages, you need to leave placeholders for each
+ module. Let's look at an example:
+
+- >>> create_module({
+- ... 'new_package.__init__': '''\
+- ... print __name__, 'imported'
+- ... x=0
+- ... ''',
+- ... 'new_package.m1': '''\
+- ... print __name__, 'imported'
+- ... x=1
+- ... ''',
+- ... 'new_package.m2': '''\
+- ... print __name__, 'imported'
+- ... def x():
+- ... pass
+- ... ''',
+- ... 'new_package.m3': '''\
+- ... print __name__, 'imported'
+- ... x=3
+- ... ''',
+- ... 'old_package.__init__': '''\
+- ... import zope.deprecation
+- ... zope.deprecation.moved('zope.deprecation.new_package', 'version 2')
+- ... ''',
+- ... 'old_package.m1': '''\
+- ... import zope.deprecation
+- ... zope.deprecation.moved('zope.deprecation.new_package.m1', 'version 2')
+- ... ''',
+- ... 'old_package.m2': '''\
+- ... import zope.deprecation
+- ... zope.deprecation.moved('zope.deprecation.new_package.m2', 'version 2')
+- ... ''',
+- ... })
++ >>> create_module({
++ ... 'new_package.__init__': '''\
++ ... print __name__, 'imported'
++ ... x=0
++ ... ''',
++ ... 'new_package.m1': '''\
++ ... print __name__, 'imported'
++ ... x=1
++ ... ''',
++ ... 'new_package.m2': '''\
++ ... print __name__, 'imported'
++ ... def x():
++ ... pass
++ ... ''',
++ ... 'new_package.m3': '''\
++ ... print __name__, 'imported'
++ ... x=3
++ ... ''',
++ ... 'old_package.__init__': '''\
++ ... import zope.deprecation
++ ... zope.deprecation.moved('zope.deprecation.new_package', 'version 2')
++ ... ''',
++ ... 'old_package.m1': '''\
++ ... import zope.deprecation
++ ... zope.deprecation.moved('zope.deprecation.new_package.m1', 'version 2')
++ ... ''',
++ ... 'old_package.m2': '''\
++ ... import zope.deprecation
++ ... zope.deprecation.moved('zope.deprecation.new_package.m2', 'version 2')
++ ... ''',
++ ... })
+
+
+
+ Now, if we import the old modules, we'll get warnings:
+
+- >>> import zope.deprecation.old_package
+- ... # doctest: +NORMALIZE_WHITESPACE
+- From tests.py's showwarning():
+- ...zope/deprecation/README.txt:1: DeprecationWarning:
+- zope.deprecation.old_package has moved to zope.deprecation.new_package.
+- Import of zope.deprecation.old_package will become unsupported in version 2
+- ===============
+- zope.deprecation.new_package imported
+-
+- >>> zope.deprecation.old_package.x
+- 0
+-
+- >>> import zope.deprecation.old_package.m1
+- ... # doctest: +NORMALIZE_WHITESPACE
+- From tests.py's showwarning():
+- ...zope/deprecation/README.txt:1: DeprecationWarning:
+- zope.deprecation.old_package.m1 has moved to zope.deprecation.new_package.m1.
+- Import of zope.deprecation.old_package.m1 will become unsupported in
+- version 2
+- ===============
+- zope.deprecation.new_package.m1 imported
+-
+- >>> zope.deprecation.old_package.m1.x
+- 1
+-
+- >>> import zope.deprecation.old_package.m2
+- ... # doctest: +NORMALIZE_WHITESPACE
+- From tests.py's showwarning():
+- ...zope/deprecation/README.txt:1: DeprecationWarning:
+- zope.deprecation.old_package.m2 has moved to zope.deprecation.new_package.m2.
+- Import of zope.deprecation.old_package.m2 will become unsupported in
+- version 2
+- ===============
+- zope.deprecation.new_package.m2 imported
+-
+- >>> zope.deprecation.old_package.m2.x is zope.deprecation.new_package.m2.x
+- True
+-
+- >>> (zope.deprecation.old_package.m2.x.func_globals
+- ... is zope.deprecation.new_package.m2.__dict__)
+- True
++ >>> import zope.deprecation.old_package
++ ... # doctest: +NORMALIZE_WHITESPACE
++ From tests.py's showwarning():
++ ...zope/deprecation/README.txt:1: DeprecationWarning:
++ zope.deprecation.old_package has moved to zope.deprecation.new_package.
++ Import of zope.deprecation.old_package will become unsupported in version 2
++ ===============
++ zope.deprecation.new_package imported
++
++ >>> zope.deprecation.old_package.x
++ 0
++
++ >>> import zope.deprecation.old_package.m1
++ ... # doctest: +NORMALIZE_WHITESPACE
++ From tests.py's showwarning():
++ ...zope/deprecation/README.txt:1: DeprecationWarning:
++ zope.deprecation.old_package.m1 has moved to zope.deprecation.new_package.m1.
++ Import of zope.deprecation.old_package.m1 will become unsupported in
++ version 2
++ ===============
++ zope.deprecation.new_package.m1 imported
++
++ >>> zope.deprecation.old_package.m1.x
++ 1
++
++ >>> import zope.deprecation.old_package.m2
++ ... # doctest: +NORMALIZE_WHITESPACE
++ From tests.py's showwarning():
++ ...zope/deprecation/README.txt:1: DeprecationWarning:
++ zope.deprecation.old_package.m2 has moved to zope.deprecation.new_package.m2.
++ Import of zope.deprecation.old_package.m2 will become unsupported in
++ version 2
++ ===============
++ zope.deprecation.new_package.m2 imported
++
++ >>> zope.deprecation.old_package.m2.x is zope.deprecation.new_package.m2.x
++ True
++
++ >>> (zope.deprecation.old_package.m2.x.func_globals
++ ... is zope.deprecation.new_package.m2.__dict__)
++ True
+
+- >>> zope.deprecation.old_package.m2.x.__module__
+- 'zope.deprecation.new_package.m2'
++ >>> zope.deprecation.old_package.m2.x.__module__
++ 'zope.deprecation.new_package.m2'
+
+ We'll get an error if we try to import m3, because we didn't create a
+ placeholder for it:
+
+- >>> import zope.deprecation.old_package.m3
+- Traceback (most recent call last):
+- ...
+- ImportError: No module named m3
++ >>> import zope.deprecation.old_package.m3
++ Traceback (most recent call last):
++ ...
++ ImportError: No module named m3
+
+
+
+@@ -355,71 +355,71 @@ Description: ****************
+ short time. To support such a feature, the `zope.deprecation` package provides
+ an attribute called `__show__`. One can ask for its status by calling it:
+
+- >>> from zope.deprecation import __show__
+- >>> __show__()
+- True
+-
+- >>> class Foo(object):
+- ... bar = property(lambda self: 1)
+- ... bar = deprecation.deprecated(bar, 'bar is no more.')
+- ... blah = property(lambda self: 1)
+- ... blah = deprecation.deprecated(blah, 'blah is no more.')
+- >>> foo = Foo()
+-
+- >>> foo.bar
+- From tests.py's showwarning():
+- ...README.txt:1: DeprecationWarning: bar is no more.
+- ...
+- 1
++ >>> from zope.deprecation import __show__
++ >>> __show__()
++ True
++
++ >>> class Foo(object):
++ ... bar = property(lambda self: 1)
++ ... bar = deprecation.deprecated(bar, 'bar is no more.')
++ ... blah = property(lambda self: 1)
++ ... blah = deprecation.deprecated(blah, 'blah is no more.')
++ >>> foo = Foo()
++
++ >>> foo.bar
++ From tests.py's showwarning():
++ ...README.txt:1: DeprecationWarning: bar is no more.
++ ...
++ 1
+
+ You can turn off the depraction warnings using
+
+- >>> __show__.off()
+- >>> __show__()
+- False
++ >>> __show__.off()
++ >>> __show__()
++ False
+
+- >>> foo.blah
+- 1
++ >>> foo.blah
++ 1
+
+ Now, you can also nest several turn-offs, so that calling `off()` multiple
+ times is meaningful:
+
+- >>> __show__.stack
+- [False]
++ >>> __show__.stack
++ [False]
+
+- >>> __show__.off()
+- >>> __show__.stack
+- [False, False]
+-
+- >>> __show__.on()
+- >>> __show__.stack
+- [False]
+- >>> __show__()
+- False
+-
+- >>> __show__.on()
+- >>> __show__.stack
+- []
+- >>> __show__()
+- True
++ >>> __show__.off()
++ >>> __show__.stack
++ [False, False]
++
++ >>> __show__.on()
++ >>> __show__.stack
++ [False]
++ >>> __show__()
++ False
++
++ >>> __show__.on()
++ >>> __show__.stack
++ []
++ >>> __show__()
++ True
+
+ You can also reset `__show__` to `True`:
+
+- >>> __show__.off()
+- >>> __show__.off()
+- >>> __show__()
+- False
+-
+- >>> __show__.reset()
+- >>> __show__()
+- True
++ >>> __show__.off()
++ >>> __show__.off()
++ >>> __show__()
++ False
++
++ >>> __show__.reset()
++ >>> __show__()
++ True
+
+ Finally, you cannot call `on()` without having called `off()` before:
+
+- >>> __show__.on()
+- Traceback (most recent call last):
+- ...
+- IndexError: pop from empty list
++ >>> __show__.on()
++ Traceback (most recent call last):
++ ...
++ IndexError: pop from empty list
+
+ Download
+ **********************
+--- zope.deprecation-3.4.0.orig/src/zope.deprecation.egg-info/SOURCES.txt
++++ zope.deprecation-3.4.0/src/zope.deprecation.egg-info/SOURCES.txt
+@@ -1,6 +1,7 @@
+ README.txt
+ bootstrap.py
+ buildout.cfg
++setup.cfg
+ setup.py
+ src/zope/__init__.py
+ src/zope.deprecation.egg-info/PKG-INFO
+@@ -14,4 +15,4 @@ src/zope/deprecation/DEPENDENCIES.cfg
+ src/zope/deprecation/README.txt
+ src/zope/deprecation/__init__.py
+ src/zope/deprecation/deprecation.py
+-src/zope/deprecation/tests.py
++src/zope/deprecation/tests.py
+\ No newline at end of file
Added: zope.deprecation/trunk/debian/patches/series
===================================================================
--- zope.deprecation/trunk/debian/patches/series (rev 0)
+++ zope.deprecation/trunk/debian/patches/series 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1 @@
+debian-changes-3.4.0-1
Added: zope.deprecation/trunk/debian/rules
===================================================================
--- zope.deprecation/trunk/debian/rules (rev 0)
+++ zope.deprecation/trunk/debian/rules 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@
Property changes on: zope.deprecation/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: zope.deprecation/trunk/debian/source/format
===================================================================
--- zope.deprecation/trunk/debian/source/format (rev 0)
+++ zope.deprecation/trunk/debian/source/format 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1 @@
+3.0 (quilt)
Added: zope.deprecation/trunk/debian/watch
===================================================================
--- zope.deprecation/trunk/debian/watch (rev 0)
+++ zope.deprecation/trunk/debian/watch 2011-02-11 02:48:19 UTC (rev 2156)
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/z/zope.deprecation/zope.deprecation-(.*)\.tar\.gz
More information about the pkg-zope-developers
mailing list