Skip to content

Commit

Permalink
[fc] Repository: plone.registry
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-09-20T22:12:48+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.registry@a25d8fe

fix test for changed object field in zope4

Files changed:
M plone/registry/registry.rst
M plone/registry/tests.py
Repository: plone.registry

Branch: refs/heads/master
Date: 2018-09-20T22:16:13+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.registry@37a93b5

add docstring and classifiers

Files changed:
M CHANGES.rst
M setup.py
Repository: plone.registry

Branch: refs/heads/master
Date: 2018-09-21T09:41:01+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.registry@462ddd1

Merge pull request #19 from plone/zope4

fix test for changed object field in zope4

Files changed:
M CHANGES.rst
M plone/registry/registry.rst
M plone/registry/tests.py
M setup.py
  • Loading branch information
pbauer committed Sep 21, 2018
1 parent bd76578 commit ec003d0
Showing 1 changed file with 44 additions and 8 deletions.
52 changes: 44 additions & 8 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
Repository: Products.PlonePAS
Repository: plone.registry


Branch: refs/heads/master
Date: 2018-09-21T08:59:01+02:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/Products.PlonePAS/commit/ddd02a8ad8db493fe8dc37ff39225facce693832
Date: 2018-09-20T22:12:48+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.registry/commit/a25d8fe05b88746f3e5815447fcc403b8dea8b82

Use list comprehensions instead of map (which returns an iterator in python 3)
fix test for changed object field in zope4

Files changed:
M src/Products/PlonePAS/plugins/group.py
M src/Products/PlonePAS/tools/groupdata.py
M plone/registry/registry.rst
M plone/registry/tests.py

b'diff --git a/src/Products/PlonePAS/plugins/group.py b/src/Products/PlonePAS/plugins/group.py\nindex bbbd21e..dd8ad77 100644\n--- a/src/Products/PlonePAS/plugins/group.py\n+++ b/src/Products/PlonePAS/plugins/group.py\n@@ -104,7 +104,7 @@ def getGroupById(self, group_id, default=None):\n return self._findGroup(plugins, group_id, title)\n \n def getGroups(self):\n- return map(self.getGroupById, self.getGroupIds())\n+ return [self.getGroupById(group_id) for group_id in self.getGroupIds()]\n \n def getGroupIds(self):\n return self.listGroupIds()\ndiff --git a/src/Products/PlonePAS/tools/groupdata.py b/src/Products/PlonePAS/tools/groupdata.py\nindex 4da00f8..b808d85 100644\n--- a/src/Products/PlonePAS/tools/groupdata.py\n+++ b/src/Products/PlonePAS/tools/groupdata.py\n@@ -149,14 +149,14 @@ def getGroupMemberIds(self):\n """\n Return a list of group member ids\n """\n- return map(lambda x: x.getMemberId(), self.getGroupMembers())\n+ return [member.getMemberId() for member in self.getGroupMembers()]\n \n @security.public\n def getAllGroupMemberIds(self):\n """\n Return a list of group member ids\n """\n- return map(lambda x: x.getMemberId(), self.getAllGroupMembers())\n+ return [member.getMemberId() for member in self.getAllGroupMembers()]\n \n @security.public\n def getGroupMembers(self):\n'
b"diff --git a/plone/registry/registry.rst b/plone/registry/registry.rst\nindex d6a1f39..5952d69 100644\n--- a/plone/registry/registry.rst\n+++ b/plone/registry/registry.rst\n@@ -142,7 +142,7 @@ Again, values are validated::\n Traceback (most recent call last):\n ...\n WrongType: ('Joomla', <type 'unicode'>...)\n- \n+\n >>> registry['plone.registry.tests.cms'] = b'Joomla' # doctest: +SKIP_PYTHON_2\n Traceback (most recent call last):\n ...\n@@ -215,7 +215,7 @@ If we have a field for which there is no ``IPersistentField`` adapter, we will g\n \n >>> from plone.registry.tests import IMailPreferences\n >>> IMailPreferences['settings']\n- <zope.schema._field.Object object at ...>\n+ <zope.schema._bootstrapfields.Object object at ...>\n \n >>> registry.registerInterface(IMailPreferences)\n Traceback (most recent call last):\ndiff --git a/plone/registry/tests.py b/plone/registry/tests.py\nindex 626e726..d89ab62 100644\n--- a/plone/registry/tests.py\n+++ b/plone/registry/tests.py\n@@ -21,6 +21,11 @@\n \n class PolyglotOutputChecker(doctest.OutputChecker):\n def check_output(self, want, got, optionflags):\n+ # fix changed objectfield class in zope4\n+ got = re.sub(\n+ 'zope.schema._field.Object',\n+ 'zope.schema._bootstrapfields.Object', got)\n+\n if optionflags & SKIP_PYTHON_3 and sys.version_info >= (3,):\n return True\n elif optionflags & SKIP_PYTHON_2:\n"

Repository: plone.registry


Branch: refs/heads/master
Date: 2018-09-20T22:16:13+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.registry/commit/37a93b508fe0fa6ac06da7eeebd2e78531ba8f29

add docstring and classifiers

Files changed:
M CHANGES.rst
M setup.py

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 421fb1a..b6027eb 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Adapt test to changed object field in zope4\n+ [pbauer]\n \n \n 1.1.3 (2018-06-22)\ndiff --git a/setup.py b/setup.py\nindex 24ec8da..ae05a88 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -32,11 +32,14 @@ def read(*rnames):\n classifiers=[\n "Framework :: Plone",\n "Framework :: Plone :: 5.1",\n+ "Framework :: Plone :: 5.2",\n "License :: OSI Approved :: GNU General Public License (GPL)",\n "Programming Language :: Python :: 2",\n "Programming Language :: Python :: 2.7",\n "Programming Language :: Python :: 3",\n "Programming Language :: Python :: 3.5",\n+ "Programming Language :: Python :: 3.6",\n+ "Programming Language :: Python :: 3.7",\n "Topic :: Software Development :: Libraries :: Python Modules",\n ],\n keywords=\'configuration registry\',\n'

Repository: plone.registry


Branch: refs/heads/master
Date: 2018-09-21T09:41:01+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.registry/commit/462ddd121d97a370d7e398538660615e246759a5

Merge pull request #19 from plone/zope4

fix test for changed object field in zope4

Files changed:
M CHANGES.rst
M plone/registry/registry.rst
M plone/registry/tests.py
M setup.py

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 421fb1a..b6027eb 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Adapt test to changed object field in zope4\n+ [pbauer]\n \n \n 1.1.3 (2018-06-22)\ndiff --git a/plone/registry/registry.rst b/plone/registry/registry.rst\nindex d6a1f39..5952d69 100644\n--- a/plone/registry/registry.rst\n+++ b/plone/registry/registry.rst\n@@ -142,7 +142,7 @@ Again, values are validated::\n Traceback (most recent call last):\n ...\n WrongType: (\'Joomla\', <type \'unicode\'>...)\n- \n+\n >>> registry[\'plone.registry.tests.cms\'] = b\'Joomla\' # doctest: +SKIP_PYTHON_2\n Traceback (most recent call last):\n ...\n@@ -215,7 +215,7 @@ If we have a field for which there is no ``IPersistentField`` adapter, we will g\n \n >>> from plone.registry.tests import IMailPreferences\n >>> IMailPreferences[\'settings\']\n- <zope.schema._field.Object object at ...>\n+ <zope.schema._bootstrapfields.Object object at ...>\n \n >>> registry.registerInterface(IMailPreferences)\n Traceback (most recent call last):\ndiff --git a/plone/registry/tests.py b/plone/registry/tests.py\nindex 626e726..d89ab62 100644\n--- a/plone/registry/tests.py\n+++ b/plone/registry/tests.py\n@@ -21,6 +21,11 @@\n \n class PolyglotOutputChecker(doctest.OutputChecker):\n def check_output(self, want, got, optionflags):\n+ # fix changed objectfield class in zope4\n+ got = re.sub(\n+ \'zope.schema._field.Object\',\n+ \'zope.schema._bootstrapfields.Object\', got)\n+\n if optionflags & SKIP_PYTHON_3 and sys.version_info >= (3,):\n return True\n elif optionflags & SKIP_PYTHON_2:\ndiff --git a/setup.py b/setup.py\nindex 24ec8da..ae05a88 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -32,11 +32,14 @@ def read(*rnames):\n classifiers=[\n "Framework :: Plone",\n "Framework :: Plone :: 5.1",\n+ "Framework :: Plone :: 5.2",\n "License :: OSI Approved :: GNU General Public License (GPL)",\n "Programming Language :: Python :: 2",\n "Programming Language :: Python :: 2.7",\n "Programming Language :: Python :: 3",\n "Programming Language :: Python :: 3.5",\n+ "Programming Language :: Python :: 3.6",\n+ "Programming Language :: Python :: 3.7",\n "Topic :: Software Development :: Libraries :: Python Modules",\n ],\n keywords=\'configuration registry\',\n'

0 comments on commit ec003d0

Please sign in to comment.