Merge branch 'release/1.10.7'

This commit is contained in:
Graham Dumpleton 2016-03-31 16:49:07 +11:00
commit fa8f730588
7 changed files with 23 additions and 15 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2013-2015, Graham Dumpleton
Copyright (c) 2013-2016, Graham Dumpleton
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,14 @@
Release Notes
=============
Version 1.10.7
--------------
**Bugs Fixed**
* The mod operator '%' was being incorrectly proxied in Python variant of
object proxy to the xor operator '^'.
Version 1.10.6
--------------

View File

@ -41,7 +41,7 @@ master_doc = 'index'
# General information about the project.
project = u'wrapt'
copyright = u'2013-2015, Graham Dumpleton'
copyright = u'2013-2016, Graham Dumpleton'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -50,7 +50,7 @@ copyright = u'2013-2015, Graham Dumpleton'
# The short X.Y version.
version = '1.10'
# The full version, including alpha/beta/rc tags.
release = '1.10.6'
release = '1.10.7'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -34,7 +34,7 @@ class optional_build_ext(build_ext):
setup_kwargs = dict(
name = 'wrapt',
version = '1.10.6',
version = '1.10.7',
description = 'Module for decorators, wrappers and monkey patching.',
long_description = open('README.rst').read(),
author = 'Graham Dumpleton',

View File

@ -1,4 +1,4 @@
__version_info__ = ('1', '10', '6')
__version_info__ = ('1', '10', '7')
__version__ = '.'.join(__version_info__)
from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper,

View File

@ -230,7 +230,7 @@ class ObjectProxy(with_metaclass(_ObjectProxyMetaType)):
return self.__wrapped__ // other
def __mod__(self, other):
return self.__wrapped__ ^ other
return self.__wrapped__ % other
def __divmod__(self, other):
return divmod(self.__wrapped__, other)

View File

@ -867,21 +867,21 @@ class TestAsNumberObjectProxy(unittest.TestCase):
self.assertEqual(2/three, 2/3)
self.assertEqual(two/3, 2/3)
def test_mod(self):
def test_floordiv(self):
two = wrapt.ObjectProxy(2)
three = wrapt.ObjectProxy(3)
four = wrapt.ObjectProxy(4)
self.assertEqual(three//two, 3//2)
self.assertEqual(3//two, 3//2)
self.assertEqual(three//2, 3//2)
self.assertEqual(four//two, 4//2)
self.assertEqual(4//two, 4//2)
self.assertEqual(four//2, 4//2)
def test_mod(self):
two = wrapt.ObjectProxy(2)
three = wrapt.ObjectProxy(3)
four = wrapt.ObjectProxy(4)
self.assertEqual(three%two, 3%2)
self.assertEqual(3%two, 3%2)
self.assertEqual(three%2, 3%2)
self.assertEqual(four%two, 4%2)
self.assertEqual(4%two, 4%2)
self.assertEqual(four%2, 4%2)
def test_divmod(self):
two = wrapt.ObjectProxy(2)