Skip to content

Commit

Permalink
remove outdated comments about metadata setting
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed May 12, 2024
1 parent 789fdee commit 482bcbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions docs/source/clientcode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ For normal usage, there's not a single line of Pyro specific code once you have
Accessing remote attributes
===========================
You can access exposed attributes of your remote objects directly via the proxy.
If you try to access an undefined or unexposed attribute, the proxy will raise an AttributeError stating the problem.
Note that direct remote attribute access only works if the metadata feature is enabled (``METADATA`` config item, enabled by default).
::
If you try to access an undefined or unexposed attribute, the proxy will raise an AttributeError stating the problem::

import Pyro5.api

Expand Down
4 changes: 2 additions & 2 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def testProxyMetadata(self):
assert p._pyroAttrs == set()
assert p._pyroMethods == set()
assert p._pyroOneway == set()
# connecting it should obtain metadata (as long as METADATA is true)
# connecting it should obtain metadata
p._pyroBind()
assert p._pyroAttrs == {'value', 'dictionary'}
assert p._pyroMethods == {'echo', 'getDict', 'divide', 'nonserializableException', 'ping', 'oneway_delay', 'delayAndId', 'delay', 'testargs',
Expand All @@ -299,7 +299,7 @@ def testProxyAttrsMetadataOn(self):
# read attributes
with Pyro5.client.Proxy(self.objectUri) as p:
# unconnected proxy still has empty metadata.
# but, as soon as an attribute is used, the metadata is obtained (as long as METADATA is true)
# but, as soon as an attribute is used, the metadata is obtained
a = p.value
assert a == 12345
a = p.multiply
Expand Down

0 comments on commit 482bcbc

Please sign in to comment.