-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use own storage factory and drop Python 2.7 support #50
Conversation
On GHA on 5.2 Py 3.7 I get: ImportError: type object 'Distribution' has no attribute '_finalize_feature_opts'
zc.buildout 3 does not yet work with pip 22.
Mostly, this makes the view easier to customize. I want to use this in plone/plone.app.tiles#50. `plone.app.tiles` would no longer need to override the `publishTraverse` method then.
Branch: refs/heads/master Date: 2022-02-28T10:16:08+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.namedfile@9c4574f ImageScaling view: use guarded_orig_image to get field from a url. Mostly, this makes the view easier to customize. I want to use this in plone/plone.app.tiles#50. `plone.app.tiles` would no longer need to override the `publishTraverse` method then. Files changed: A news/104.bugfix M plone/namedfile/scaling.py Repository: plone.namedfile Branch: refs/heads/master Date: 2022-02-28T22:51:56+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.namedfile@02d18a6 Merge pull request #110 from plone/maurits-image-scaling-use-guarded-orig-image ImageScaling view: use guarded_orig_image to get field from a url. Files changed: A news/104.bugfix M plone/namedfile/scaling.py
Remove our publishTraverse copy, because it is not needed anymore in this case.
This fixes scaling images on tiles when the tile does not have the workaround of defining a property for the image field.
This is ready for review. Let me explain what is happening and why, because the changes here and in A few words on versions:
First: why does
These two reasons remain valid with this PR, but the hookup is different. Note that the code seems only active and registered for persistent tiles. I guess a transient image tile just works without any special code, but I have not checked how it works for those. Situation before this PR, using the standard
That was the situation until now. Problems:
In the New situation with this PR and latest alpha of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We get rid of some code then, using the upstream code from
plone.namedfile
andplone.scale
, including their improvements from the last few years.We require the latest alpha release of
plone.namedfile
. I have updated our own version to 4.0.0a1.A bit more work needed/possible though, so I keep it as draft PR for now.
We could refactor much more code after dropping python 2.7, but I wanted to keep the changes small.