collective / collective/collective.alias
Utility of __class__ and PicklingError
- Dominant language
- Python
- Stars
- 3
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
What is the exact use of https://github.com/collective/collective.alias/blob/master/src/collective/alias/content.py#L259-L274 ? From what I understand, it allow the alias to have the methods/attributes of the aliased, but is it absolutely necessary with the `__getattr__` ?
I'm asking because I have the following error with the plone5 branch et on plone 5 rc2:
```
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
[...]
Module transaction._transaction, line 690, in __init__
Module ZODB.Connection, line 1123, in savepoint
Module ZODB.Connection, line 623, in _commit
Module ZODB.Connection, line 658, in _store_objects
Module ZODB.serialize, line 422, in serialize
Module ZODB.serialize, line 431, in _dump
PicklingError: Can't pickle : it's not the same object as collective.alias.content.Alias
```
Thanks for the help.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/collective/alias/content.py lines 259-274 and the __class__ and __getattr__ behavior described in the issue. Reproduce the PicklingError on the plone5 branch with Plone 5 RC2, then inspect the ZODB.serialize traceback; done means the alias can be persisted without that error or the necessity of the code is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100