Closed gbastien closed 1 year ago
@gbastien thanks for creating this Pull Request and helping to improve Plone!
TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
@jenkins-plone-org please run jobs
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.
Happy hacking!
@jenkins-plone-org please run jobs
Hi @davisagli @mauritsvanrees
I take advantage of the PloneConf sprint to work on this issue.
I removed Title monkeypatch as the absolute_url method is there and uses acquisition.
Now the test_special_getattr_from_object is broken, the assumption of the test is wrong.
What should we do?
Thank you for follow up.
Gauthier
@jenkins-plone-org please run jobs
@jenkins-plone-org please run jobs
Hi @jensens @davisagli @mauritsvanrees
as you can see, the test_special_getattr_from_object
is broken "as expected". It was correct before because acquisition was not there and absolute_url needs acquisition.
Thank you for review ;-)
Gauthier
@gbastien Sorry, I see that you asked what to do with the test and no one answered. Please update the test to match the changed behavior.
@gbastien Sorry, I see that you asked what to do with the test and no one answered. Please update the test to match the changed behavior.
Right thank you I will do that!
I can't really say how critical is this fix, but 6.0 is getting closer ™️ and if only a few iterations on the code are needed, maybe is a good time to try to finish it? 👍🏾
@jenkins-plone-org please run jobs
Hi @mauritsvanrees @baekholt
See #47
I adapted code so
__getattr__
on acontentlisting object
checks attribute existence on the object without acquisition but returns it with acquisition so when it is a method, calling it will have acquisition.This change breaks
test_special_getattr_from_object
, but actually I think the test is wrong. It does not defer to the brain, but actually callsabsolute_url
(OFS/Traversable.py(75)absolute_url()) and fails because object does not have acquisition. You canpdb
intest_special_getattr_from_object
without my change to see that. So I would adapt this test that will now return theabsolute_url
, but this changes the current behavior, so?Thank you for review and feedback.
Gauthier