plone / Products.CMFPlacefulWorkflow

Plone product that allows you to define workflow policies that define content type to workflow mappings that can be applied in any sub-folder of your Plone site
1 stars 5 forks source link

Fix deprecation warning at startup for setDefaultRoles. #34

Closed mauritsvanrees closed 4 years ago

mauritsvanrees commented 4 years ago
DeprecationWarning: setDefaultRoles is deprecated. Please use addPermission from AccessControl.Permission.

In CMFCore it is deprecated by zope.deferredimport, so we can just swap it. master branch is only used in Plone 5.2, so it is safe to change.

mister-roboto commented 4 years ago

@mauritsvanrees thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

mauritsvanrees commented 4 years ago

@jenkins-plone-org please run jobs

mauritsvanrees commented 4 years ago

@jenkins-plone-org please run jobs

jensens commented 4 years ago

@mauritsvanrees moving the metdata to setup.cfg like so

[metadata]
long_description = file: README.rst, CHANGES.rst

Should work in any case w/o ugly code in setup.py.

mauritsvanrees commented 4 years ago

I wonder how well the setting in setup.cfg holds up to possible unicode errors. Hard to test, because it only fails on Python 3.6 on Jenkins, and maybe even only on one machine. Locally the original setup.py code works fine. I copied the code from other Plone packages where I had to add it a while ago.

But let's give setup.cfg a try. I'll push a commit.

mauritsvanrees commented 4 years ago

@jenkins-plone-org please run jobs