Skip to content

Commit 682ded4

Browse files
committed
-
1 parent 19c961a commit 682ded4

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

python_toolbox/context_management/delegating_context_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import abc
1111

12-
from python_toolbox import proxy_property
12+
from python_toolbox import misc_tools
1313

1414
from .context_manager import ContextManager
1515

@@ -34,9 +34,9 @@ class DelegatingContextManager(ContextManager):
3434
You may implement this as either an instance attribute or a property.
3535
'''
3636

37-
__enter__ = proxy_property.ProxyProperty(
37+
__enter__ = misc_tools.ProxyProperty(
3838
'.delegatee_context_manager.__enter__'
3939
)
40-
__exit__ = proxy_property.ProxyProperty(
40+
__exit__ = misc_tools.ProxyProperty(
4141
'.delegatee_context_manager.__exit__'
4242
)

python_toolbox/context_management/reentrant_context_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import abc
1111

1212
from python_toolbox import caching
13-
from python_toolbox.proxy_property import ProxyProperty
13+
from python_toolbox.misc_tools import ProxyProperty
1414

1515
from .context_manager import ContextManager
1616

python_toolbox/freezing/freezer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import abc
1111

1212
from python_toolbox import context_management
13-
from python_toolbox import proxy_property
13+
from python_toolbox import misc_tools
1414
from python_toolbox import caching
1515

1616
from .delegatee_context_manager import DelegateeContextManager
@@ -41,7 +41,7 @@ class Freezer(context_management.DelegatingContextManager):
4141
'''The context manager which implements our `__enter__` and `__exit__`.'''
4242

4343

44-
frozen = proxy_property.ProxyProperty('.delegatee_context_manager.depth')
44+
frozen = misc_tools.ProxyProperty('.delegatee_context_manager.depth')
4545
'''
4646
An integer specifying the freezer's level of frozenness.
4747

python_toolbox/identities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
See its documentation for more information.
88
'''
99

10-
from python_toolbox import proxy_property
10+
from python_toolbox import misc_tools
1111
from python_toolbox.persistent import CrossProcessPersistent
1212

1313

@@ -44,7 +44,7 @@ def has_same_identity_as(self, other):
4444
__and__ = has_same_identity_as
4545

4646

47-
personality = proxy_property.ProxyProperty(
47+
personality = misc_tools.ProxyProperty(
4848
'._HasIdentity__identity.personality',
4949
doc='''Personality containing a human name and two colors.'''
5050
)

python_toolbox/misc_tools/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
do_nothing, OwnNameDiscoveringDescriptor, find_clear_place_on_circle,
1111
general_sum, general_product, is_legal_email_address, is_type
1212
)
13-
from . import name_mangling
13+
from . import name_mangling
14+
from .proxy_property import ProxyProperty

python_toolbox/proxy_property.py renamed to python_toolbox/misc_tools/proxy_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
See its documentation for more information.
88
'''
99

10-
from python_toolbox import address_tools
11-
1210

1311
class ProxyProperty(object):
1412
'''
@@ -68,6 +66,7 @@ def __get__(self, obj, our_type=None):
6866
return self
6967
else:
7068
if '.' in self.attribute_name:
69+
from python_toolbox import address_tools
7170
return address_tools.resolve('obj.%s' % self.attribute_name,
7271
namespace={'obj': obj})
7372
else:
@@ -79,6 +78,7 @@ def __set__(self, obj, value):
7978
# `__delete__`?
8079

8180
if '.' in self.attribute_name:
81+
from python_toolbox import address_tools
8282
left_segment, right_segment = self.attribute_name.rsplit('.', 1)
8383
deepest_object = address_tools.resolve('obj.%s' % left_segment,
8484
namespace={'obj': obj})

python_toolbox/wx_tools/widgets/cute_tree_ctrl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import wx
1111

12-
from python_toolbox.proxy_property import ProxyProperty
12+
from python_toolbox.misc_tools import ProxyProperty
1313

1414
from python_toolbox import sequence_tools
1515
from python_toolbox.wx_tools.widgets.cute_control import CuteControl

test_python_toolbox/test_proxy_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Copyright 2009-2013 Ram Rachum.
22
# This program is distributed under the MIT license.
33

4-
'''Testing modules for `python_toolbox.proxy_property.ProxyProperty`.'''
4+
'''Testing modules for `python_toolbox.misc_tools.ProxyProperty`.'''
55

66
from __future__ import with_statement
77

88
import uuid
99

1010
from python_toolbox import cute_testing
1111

12-
from python_toolbox.proxy_property import ProxyProperty
12+
from python_toolbox.misc_tools import ProxyProperty
1313

1414

1515
class Object(object):

0 commit comments

Comments
 (0)