A Reference is a Zope object refering to another Zope object, called its Target. The target it identified by a path relative to the parent of the Reference. It is resolved into the target through restrictedTraverse.
The attribute Target as well as the method getTarget give the target object.
A Reference behaves almost like its target. It appears to have (most of) its attributes and methods. In this sense, it is very similar to Shane’s Symlink product. Unlike a Symlink, however, a Reference has its own id, title and management facilities and therefore can be distinguished from the refered to object. This is very difficult for a SymLink; therefore, I consider Reference safer.
On lookup, a Reference prefers its own attributes over those of the target. This means that it behaves as a reference and partially as its target.
Caveats
There are security weaknesses: the setDefaultAccess('allow') and the declareObjectProtected('Access contents information') of Reference spill over to the target when accessed through the reference. This is a side effect of Zope’s (strange) security policy.
In order to ensure manageability of the Reference, __before_publishing_traverse__ and __bobo_traverse__ are not relayed to the target.
It is very difficult (I think impossible) to emulate the special treatment of Python Methods by acquisition. The current implementation tries hard to emulate enough that Python Scripts (and similar objects) get correct bindings. However, the acquisition context is otherwise different from how it were when directly called.
Zope toolkit (aka Zope3) adapters (this includes views) may not work on references as you expect because the adapters see the interfaces implemented by the reference itself, not those of the refered to object.
Metadata
Release files for Products.References 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Products.References-1.0.tar.gz | 8.6 kB | Without provenance | Details for Products.References-1.0.tar.gz |
Release files / Products.References-1.0.tar.gz
| Download URL | Products.References-1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3103656889a6c561e5efa776ccdd8ab420d660de80ae1d3a9bfa25333e418fdf
|
|
BLAKE2b-256 checksum How to use checksums |
ad4f10495764b30e77b38b9f9cf904693b07f6f8ffea033d6833fd7e449f0b0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Products.References 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.