Rev 3736: Python-2.6 doesn't allow passing passing parameters to object methods __init__ in file:///v/home/vila/src/bzr/experimental/bzr-py26-compat/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Sep 25 17:02:35 BST 2008
At file:///v/home/vila/src/bzr/experimental/bzr-py26-compat/
------------------------------------------------------------
revno: 3736
revision-id: v.ladeuil+lp at free.fr-20080925160234-7o5qhh48re61njn6
parent: v.ladeuil+lp at free.fr-20080925151715-69kcjx7p2vcuuc5w
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: no-params-for-new-init
timestamp: Thu 2008-09-25 18:02:34 +0200
message:
Python-2.6 doesn't allow passing passing parameters to object methods __init__
and __new__.
* bzrlib/weave.py:
(Weave.__init__): Don't pass parameters to object.__init__.
* bzrlib/revisionspec.py:
(RevisionSpec.__new__): Don't pass parameters to object.__new__.
-------------- next part --------------
=== modified file 'bzrlib/revisionspec.py'
--- a/bzrlib/revisionspec.py 2008-09-24 06:52:03 +0000
+++ b/bzrlib/revisionspec.py 2008-09-25 16:02:34 +0000
@@ -139,7 +139,7 @@
def __new__(cls, spec, _internal=False):
if _internal:
- return object.__new__(cls, spec, _internal=_internal)
+ return object.__new__(cls)
symbol_versioning.warn('Creating a RevisionSpec directly has'
' been deprecated in version 0.11. Use'
=== modified file 'bzrlib/weave.py'
--- a/bzrlib/weave.py 2008-07-16 18:14:23 +0000
+++ b/bzrlib/weave.py 2008-09-25 16:02:34 +0000
@@ -215,7 +215,7 @@
__slots__ = ['_weave', '_parents', '_sha1s', '_names', '_name_map',
'_weave_name', '_matcher', '_allow_reserved']
-
+
def __init__(self, weave_name=None, access_mode='w', matcher=None,
get_scope=None, allow_reserved=False):
"""Create a weave.
@@ -224,7 +224,7 @@
for detecting when this weave goes out of scope (should stop
answering requests or allowing mutation).
"""
- super(Weave, self).__init__(access_mode)
+ super(Weave, self).__init__()
self._weave = []
self._parents = []
self._sha1s = []
More information about the bazaar-commits
mailing list