Commit 2f841b67 authored by TANIGUCHI Takaki's avatar TANIGUCHI Takaki

Import Upstream version 3.5.0

parent a46ab496
......@@ -2,6 +2,14 @@
CHANGES
=======
3.5.0 (2011-09-05)
------------------
- Replaced doctesting with unit testing.
- Python 3 compatibility.
3.4.1 (2011-06-07)
------------------
......
Metadata-Version: 1.0
Name: zope.deprecation
Version: 3.4.1
Version: 3.5.0
Summary: Zope Deprecation Infrastructure
Home-page: http://pypi.python.org/pypi/zope.deprecation
Author: Zope Corporation and Contributors
......@@ -9,10 +9,8 @@ License: ZPL 2.1
Description: This package provides a simple function called ``deprecated(names, reason)`` to
mark deprecated modules, classes, functions, methods and properties.
.. contents::
===============
Deprecation API
===============
......@@ -376,6 +374,14 @@ Description: This package provides a simple function called ``deprecated(names,
CHANGES
=======
3.5.0 (2011-09-05)
------------------
- Replaced doctesting with unit testing.
- Python 3 compatibility.
3.4.1 (2011-06-07)
------------------
......@@ -401,3 +407,6 @@ Description: This package provides a simple function called ``deprecated(names,
part of the Zope 3.3.0 release.
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
This diff is collapsed.
......@@ -27,7 +27,7 @@ def read(*rnames):
setup(
name='zope.deprecation',
version='3.4.1',
version='3.5.0',
url='http://pypi.python.org/pypi/zope.deprecation',
license='ZPL 2.1',
description='Zope Deprecation Infrastructure',
......@@ -36,12 +36,13 @@ setup(
long_description=(
read('README.txt')
+ '\n\n' +
'.. contents::\n'
+ '\n\n' +
read('src', 'zope', 'deprecation', 'README.txt')
+ '\n\n' +
read('CHANGES.txt')
),
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
],
package_dir = {'': 'src'},
packages=find_packages('src'),
namespace_packages=['zope',],
......@@ -49,4 +50,5 @@ setup(
extras_require = dict(test=['zope.testing']),
include_package_data = True,
zip_safe = False,
test_suite='zope.deprecation',
)
Metadata-Version: 1.0
Name: zope.deprecation
Version: 3.4.1
Version: 3.5.0
Summary: Zope Deprecation Infrastructure
Home-page: http://pypi.python.org/pypi/zope.deprecation
Author: Zope Corporation and Contributors
......@@ -9,10 +9,8 @@ License: ZPL 2.1
Description: This package provides a simple function called ``deprecated(names, reason)`` to
mark deprecated modules, classes, functions, methods and properties.
.. contents::
===============
Deprecation API
===============
......@@ -376,6 +374,14 @@ Description: This package provides a simple function called ``deprecated(names,
CHANGES
=======
3.5.0 (2011-09-05)
------------------
- Replaced doctesting with unit testing.
- Python 3 compatibility.
3.4.1 (2011-06-07)
------------------
......@@ -401,3 +407,6 @@ Description: This package provides a simple function called ``deprecated(names,
part of the Zope 3.3.0 release.
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
......@@ -5,6 +5,7 @@ README.txt
bootstrap.py
buildout.cfg
setup.py
tox.ini
src/zope/__init__.py
src/zope.deprecation.egg-info/PKG-INFO
src/zope.deprecation.egg-info/SOURCES.txt
......@@ -13,7 +14,7 @@ src/zope.deprecation.egg-info/namespace_packages.txt
src/zope.deprecation.egg-info/not-zip-safe
src/zope.deprecation.egg-info/requires.txt
src/zope.deprecation.egg-info/top_level.txt
src/zope/deprecation/README.txt
src/zope/deprecation/__init__.py
src/zope/deprecation/deprecation.py
src/zope/deprecation/fixture.py
src/zope/deprecation/tests.py
\ No newline at end of file
This diff is collapsed.
......@@ -21,6 +21,13 @@ import sys
import types
import warnings
PY3 = sys.version_info[0] == 3
if PY3:
str_and_sequence_types = (str, list, tuple)
else:
str_and_sequence_types = (basestring, list, tuple)
class ShowSwitch(object):
"""Simple stack-based switch."""
......@@ -153,14 +160,13 @@ def DeprecatedMethod(method, message):
return deprecated_method
def deprecated(specifier, message):
"""Deprecate the given names."""
# A string specifier (or list of strings) means we're called
# top-level in a module and are to deprecate things inside this
# module
if isinstance(specifier, (str, unicode, list, tuple)):
if isinstance(specifier, str_and_sequence_types):
globals = sys._getframe(1).f_globals
modname = globals['__name__']
......@@ -208,7 +214,7 @@ def moved(to_location, unsupported_in=None):
tomod = sys.modules[old]
tomod.__doc__ = message
for name, v in fromdict.iteritems():
for name, v in fromdict.items():
if name not in tomod.__dict__:
setattr(tomod, name, v)
......
# used by tests
abc = 1
This diff is collapsed.
[tox]
envlist =
py25,py26,py27,py32,jython,pypy
[testenv]
commands =
python setup.py test -q
deps =
virtualenv
[jython]
commands =
jython setup.py test -q
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment