Skip to content

Commit

Permalink
[fc] Repository: plone.intelligenttext
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-10-05T10:26:06+02:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: plone/plone.intelligenttext@f8630f8

Return str in Python 3

Files changed:
M CHANGES.rst
M plone/intelligenttext/README.rst
M plone/intelligenttext/transforms.py
Repository: plone.intelligenttext

Branch: refs/heads/master
Date: 2018-10-05T10:26:06+02:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: plone/plone.intelligenttext@0b4d1af

Drop support for Python 3.3 which is not present on travis

Files changed:
M .travis.yml
M CHANGES.rst
M setup.py
M tox.ini
Repository: plone.intelligenttext

Branch: refs/heads/master
Date: 2018-10-13T15:18:28-04:00
Author: David Glick (davisagli) <dglick@salesforce.com>
Commit: plone/plone.intelligenttext@b7d2f5b

Merge pull request #8 from plone/python3

Python3

Files changed:
M .travis.yml
M CHANGES.rst
M plone/intelligenttext/README.rst
M plone/intelligenttext/transforms.py
M setup.py
M tox.ini
  • Loading branch information
davisagli committed Oct 13, 2018
1 parent 49d9ce8 commit 9d019c2
Showing 1 changed file with 27 additions and 36 deletions.
63 changes: 27 additions & 36 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,57 @@
Repository: plone.app.robotframework
Repository: plone.intelligenttext


Branch: refs/heads/master
Date: 2018-10-10T21:27:56-04:00
Date: 2018-10-05T10:26:06+02:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/plone.app.robotframework/commit/23eddad307dc706c0da757a65c352efa5a81a844
Commit: https://github.com/plone/plone.intelligenttext/commit/f8630f8d43fe4135f9ecf7c690c734eeb8562213

Set remote library on PloneSite class instead of in zodb
Return str in Python 3

Files changed:
M src/plone/app/robotframework/remote.py
M src/plone/app/robotframework/testing.py

b'diff --git a/src/plone/app/robotframework/remote.py b/src/plone/app/robotframework/remote.py\nindex 08bf1db..50b87eb 100644\n--- a/src/plone/app/robotframework/remote.py\n+++ b/src/plone/app/robotframework/remote.py\n@@ -5,6 +5,7 @@\n ploneSite\n )\n from plone.testing import Layer\n+from Products.CMFPlone.Portal import PloneSite\n \n \n class RemoteLibrary(SimpleItem):\n@@ -68,13 +69,10 @@ def __init__(self, *args, **kwargs):\n def setUp(self):\n id_ = self.__name__.split(\':\')[-1]\n assert id_ not in globals(), "Conflicting remote library id: %s" % id_\n- globals()[id_] = type(id_, self.libraryBases, {})\n- with ploneSite() as portal:\n- portal._setObject(id_, globals()[id_]())\n+ globals()[id_] = Remote = type(id_, self.libraryBases, {})\n+ setattr(PloneSite, id_, Remote())\n \n def tearDown(self):\n id_ = self.__name__.split(\':\')[-1]\n- with ploneSite() as portal:\n- if id_ in portal.objectIds():\n- portal._delObject(id_)\n+ delattr(PloneSite, id_)\n del globals()[id_]\ndiff --git a/src/plone/app/robotframework/testing.py b/src/plone/app/robotframework/testing.py\nindex 180842f..74705e4 100644\n--- a/src/plone/app/robotframework/testing.py\n+++ b/src/plone/app/robotframework/testing.py\n@@ -190,7 +190,6 @@ class PloneRobotFixture(PloneSandboxLayer):\n defaultBases = (\n SIMPLE_PUBLICATION_FIXTURE,\n MOCK_MAILHOST_FIXTURE,\n- REMOTE_LIBRARY_BUNDLE_FIXTURE,\n )\n \n def _get_robot_variable(self, name):\n@@ -273,11 +272,18 @@ class Value:\n PLONE_ROBOT_FIXTURE = PloneRobotFixture()\n \n PLONE_ROBOT_INTEGRATION_TESTING = IntegrationTesting(\n- bases=(PLONE_ROBOT_FIXTURE,), name="PloneRobot:Integration"\n+ bases=(\n+ PLONE_ROBOT_FIXTURE,\n+ REMOTE_LIBRARY_BUNDLE_FIXTURE,\n+ ), name="PloneRobot:Integration"\n )\n \n PLONE_ROBOT_TESTING = FunctionalTesting(\n- bases=(PLONE_ROBOT_FIXTURE, z2.ZSERVER_FIXTURE), name="Plone:Robot"\n+ bases=(\n+ PLONE_ROBOT_FIXTURE,\n+ REMOTE_LIBRARY_BUNDLE_FIXTURE,\n+ z2.ZSERVER_FIXTURE,\n+ ), name="Plone:Robot"\n )\n \n \n'

Repository: plone.app.robotframework


Branch: refs/heads/master
Date: 2018-10-10T22:09:54-04:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/plone.app.robotframework/commit/b59a08f9c53ae7f3b7495d064fca473f3fe7f4dd

fix one more layer

Files changed:
M src/plone/app/robotframework/tests/test_robotfixture.py
M CHANGES.rst
M plone/intelligenttext/README.rst
M plone/intelligenttext/transforms.py

b'diff --git a/src/plone/app/robotframework/tests/test_robotfixture.py b/src/plone/app/robotframework/tests/test_robotfixture.py\nindex 20087d0..fa746b6 100644\n--- a/src/plone/app/robotframework/tests/test_robotfixture.py\n+++ b/src/plone/app/robotframework/tests/test_robotfixture.py\n@@ -8,6 +8,7 @@\n from plone.testing import layered\n \n from plone.app.robotframework.testing import PloneRobotFixture\n+from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE\n \n \n class CustomPloneRobotFixture(PloneRobotFixture):\n@@ -24,10 +25,15 @@ def tearDown(self):\n if \'APPLY_PROFILES\' in os.environ:\n del os.environ[\'APPLY_PROFILES\']\n \n+\n PLONE_ROBOT_FIXTURE = CustomPloneRobotFixture()\n \n PLONE_ROBOT_TESTING = FunctionalTesting(\n- bases=(PLONE_ROBOT_FIXTURE, z2.ZSERVER_FIXTURE),\n+ bases=(\n+ PLONE_ROBOT_FIXTURE,\n+ REMOTE_LIBRARY_BUNDLE_FIXTURE,\n+ z2.ZSERVER_FIXTURE,\n+ ),\n name="Plone:Robot"\n )\n \n'
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 2fa51bc..58b2a2f 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -15,7 +15,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Return str from transform in Python 3.\n+ [davisagli]\n \n \n 2.2.1 (2018-01-17)\ndiff --git a/plone/intelligenttext/README.rst b/plone/intelligenttext/README.rst\nindex 775dba0..faaed50 100644\n--- a/plone/intelligenttext/README.rst\n+++ b/plone/intelligenttext/README.rst\n@@ -73,7 +73,7 @@ Indentation should be preserved::\n ... URL: http://foo.com"""\n >>> bprint(convertWebIntelligentPlainTextToHtml(orig))\n A test<br />&nbsp;&nbsp;URL: <a href="http://test.com" rel="nofollow">http://test.com</a><br />&nbsp;&nbsp;&nbsp;&nbsp;Mail: <a href="&#0109;ailto&#0058;test&#0064;test.com">test&#0064;test.com</a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL: <a href="http://foo.com" rel="nofollow">http://foo.com</a>\n- >>> convertWebIntelligentPlainTextToHtml(orig).count(b\'&nbsp;\')\n+ >>> convertWebIntelligentPlainTextToHtml(orig).count(\'&nbsp;\')\n 12\n \n HTML entities should be escaped::\ndiff --git a/plone/intelligenttext/transforms.py b/plone/intelligenttext/transforms.py\nindex e87cd73..23c7768 100644\n--- a/plone/intelligenttext/transforms.py\n+++ b/plone/intelligenttext/transforms.py\n@@ -55,7 +55,8 @@ def __call__(self):\n # Finally, make \\n\'s into br\'s\n text = text.replace(\'\\n\', \'<br />\')\n \n- text = text.encode(\'utf-8\')\n+ if not PY3:\n+ text = text.encode(\'utf-8\')\n \n return text\n \n'

Repository: plone.app.robotframework
Repository: plone.intelligenttext


Branch: refs/heads/master
Date: 2018-10-12T21:48:20-04:00
Date: 2018-10-05T10:26:06+02:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/plone.app.robotframework/commit/2eeead6b7e571c4e6f1cd9065013f516f6844f27
Commit: https://github.com/plone/plone.intelligenttext/commit/0b4d1afaf4d57c3bfe7c814ee28c8629860d805b

changelog
Drop support for Python 3.3 which is not present on travis

Files changed:
M .travis.yml
M CHANGES.rst
M setup.py
M tox.ini

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 0e3d07e..bda81c7 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -17,6 +17,11 @@ Bug fixes:\n - Read files as binary in Python 3.\n [davisagli]\n \n+- Avoid test layer isolation problems by setting the remote library\n+ as an attribute of the PloneSite class instead of a particular\n+ portal instance.\n+ [davisagli]\n+\n \n 1.3.0 (2018-10-01)\n ------------------\n'
b'diff --git a/.travis.yml b/.travis.yml\nindex f0f1749..0c67c11 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -4,7 +4,6 @@ sudo: false\n python:\n - 2.6\n - 2.7\n- - 3.3\n - 3.4\n - 3.5\n - 3.6\ndiff --git a/CHANGES.rst b/CHANGES.rst\nindex 58b2a2f..617e6be 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -7,7 +7,7 @@ Changelog\n \n Breaking changes:\n \n-- *add item here*\n+- Dropped support for Python 3.3.\n \n New features:\n \ndiff --git a/setup.py b/setup.py\nindex f37a3d3..50db590 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -28,7 +28,6 @@\n "Programming Language :: Python",\n "Programming Language :: Python :: 2.6",\n "Programming Language :: Python :: 2.7",\n- "Programming Language :: Python :: 3.3",\n "Programming Language :: Python :: 3.4",\n "Programming Language :: Python :: 3.5",\n "Programming Language :: Python :: 3.4",\ndiff --git a/tox.ini b/tox.ini\nindex 1a84942..040678c 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -1,6 +1,6 @@\n [tox]\n envlist =\n- py26,py27,py33,py34,py35,py36,pypy,pypy3\n+ py26,py27,py34,py35,py36,pypy,pypy3\n \n [testenv]\n commands =\n'

Repository: plone.app.robotframework
Repository: plone.intelligenttext


Branch: refs/heads/master
Date: 2018-10-13T00:08:43-04:00
Date: 2018-10-13T15:18:28-04:00
Author: David Glick (davisagli) <dglick@salesforce.com>
Commit: https://github.com/plone/plone.app.robotframework/commit/f84d1a90851d69c09b362885ba7c18ed417c84ee
Commit: https://github.com/plone/plone.intelligenttext/commit/b7d2f5be9acc3ea4dd4646c1a884c638bf2da75e

Merge pull request #94 from plone/layer-workaround
Merge pull request #8 from plone/python3

Layer workaround
Python3

Files changed:
M .travis.yml
M CHANGES.rst
M src/plone/app/robotframework/remote.py
M src/plone/app/robotframework/testing.py
M src/plone/app/robotframework/tests/test_robotfixture.py
M plone/intelligenttext/README.rst
M plone/intelligenttext/transforms.py
M setup.py
M tox.ini

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 0e3d07e..bda81c7 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -17,6 +17,11 @@ Bug fixes:\n - Read files as binary in Python 3.\n [davisagli]\n \n+- Avoid test layer isolation problems by setting the remote library\n+ as an attribute of the PloneSite class instead of a particular\n+ portal instance.\n+ [davisagli]\n+\n \n 1.3.0 (2018-10-01)\n ------------------\ndiff --git a/src/plone/app/robotframework/remote.py b/src/plone/app/robotframework/remote.py\nindex 08bf1db..50b87eb 100644\n--- a/src/plone/app/robotframework/remote.py\n+++ b/src/plone/app/robotframework/remote.py\n@@ -5,6 +5,7 @@\n ploneSite\n )\n from plone.testing import Layer\n+from Products.CMFPlone.Portal import PloneSite\n \n \n class RemoteLibrary(SimpleItem):\n@@ -68,13 +69,10 @@ def __init__(self, *args, **kwargs):\n def setUp(self):\n id_ = self.__name__.split(\':\')[-1]\n assert id_ not in globals(), "Conflicting remote library id: %s" % id_\n- globals()[id_] = type(id_, self.libraryBases, {})\n- with ploneSite() as portal:\n- portal._setObject(id_, globals()[id_]())\n+ globals()[id_] = Remote = type(id_, self.libraryBases, {})\n+ setattr(PloneSite, id_, Remote())\n \n def tearDown(self):\n id_ = self.__name__.split(\':\')[-1]\n- with ploneSite() as portal:\n- if id_ in portal.objectIds():\n- portal._delObject(id_)\n+ delattr(PloneSite, id_)\n del globals()[id_]\ndiff --git a/src/plone/app/robotframework/testing.py b/src/plone/app/robotframework/testing.py\nindex 180842f..74705e4 100644\n--- a/src/plone/app/robotframework/testing.py\n+++ b/src/plone/app/robotframework/testing.py\n@@ -190,7 +190,6 @@ class PloneRobotFixture(PloneSandboxLayer):\n defaultBases = (\n SIMPLE_PUBLICATION_FIXTURE,\n MOCK_MAILHOST_FIXTURE,\n- REMOTE_LIBRARY_BUNDLE_FIXTURE,\n )\n \n def _get_robot_variable(self, name):\n@@ -273,11 +272,18 @@ class Value:\n PLONE_ROBOT_FIXTURE = PloneRobotFixture()\n \n PLONE_ROBOT_INTEGRATION_TESTING = IntegrationTesting(\n- bases=(PLONE_ROBOT_FIXTURE,), name="PloneRobot:Integration"\n+ bases=(\n+ PLONE_ROBOT_FIXTURE,\n+ REMOTE_LIBRARY_BUNDLE_FIXTURE,\n+ ), name="PloneRobot:Integration"\n )\n \n PLONE_ROBOT_TESTING = FunctionalTesting(\n- bases=(PLONE_ROBOT_FIXTURE, z2.ZSERVER_FIXTURE), name="Plone:Robot"\n+ bases=(\n+ PLONE_ROBOT_FIXTURE,\n+ REMOTE_LIBRARY_BUNDLE_FIXTURE,\n+ z2.ZSERVER_FIXTURE,\n+ ), name="Plone:Robot"\n )\n \n \ndiff --git a/src/plone/app/robotframework/tests/test_robotfixture.py b/src/plone/app/robotframework/tests/test_robotfixture.py\nindex 20087d0..fa746b6 100644\n--- a/src/plone/app/robotframework/tests/test_robotfixture.py\n+++ b/src/plone/app/robotframework/tests/test_robotfixture.py\n@@ -8,6 +8,7 @@\n from plone.testing import layered\n \n from plone.app.robotframework.testing import PloneRobotFixture\n+from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE\n \n \n class CustomPloneRobotFixture(PloneRobotFixture):\n@@ -24,10 +25,15 @@ def tearDown(self):\n if \'APPLY_PROFILES\' in os.environ:\n del os.environ[\'APPLY_PROFILES\']\n \n+\n PLONE_ROBOT_FIXTURE = CustomPloneRobotFixture()\n \n PLONE_ROBOT_TESTING = FunctionalTesting(\n- bases=(PLONE_ROBOT_FIXTURE, z2.ZSERVER_FIXTURE),\n+ bases=(\n+ PLONE_ROBOT_FIXTURE,\n+ REMOTE_LIBRARY_BUNDLE_FIXTURE,\n+ z2.ZSERVER_FIXTURE,\n+ ),\n name="Plone:Robot"\n )\n \n'
b'diff --git a/.travis.yml b/.travis.yml\nindex f0f1749..0c67c11 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -4,7 +4,6 @@ sudo: false\n python:\n - 2.6\n - 2.7\n- - 3.3\n - 3.4\n - 3.5\n - 3.6\ndiff --git a/CHANGES.rst b/CHANGES.rst\nindex 2fa51bc..617e6be 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -7,7 +7,7 @@ Changelog\n \n Breaking changes:\n \n-- *add item here*\n+- Dropped support for Python 3.3.\n \n New features:\n \n@@ -15,7 +15,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Return str from transform in Python 3.\n+ [davisagli]\n \n \n 2.2.1 (2018-01-17)\ndiff --git a/plone/intelligenttext/README.rst b/plone/intelligenttext/README.rst\nindex 775dba0..faaed50 100644\n--- a/plone/intelligenttext/README.rst\n+++ b/plone/intelligenttext/README.rst\n@@ -73,7 +73,7 @@ Indentation should be preserved::\n ... URL: http://foo.com"""\n >>> bprint(convertWebIntelligentPlainTextToHtml(orig))\n A test<br />&nbsp;&nbsp;URL: <a href="http://test.com" rel="nofollow">http://test.com</a><br />&nbsp;&nbsp;&nbsp;&nbsp;Mail: <a href="&#0109;ailto&#0058;test&#0064;test.com">test&#0064;test.com</a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL: <a href="http://foo.com" rel="nofollow">http://foo.com</a>\n- >>> convertWebIntelligentPlainTextToHtml(orig).count(b\'&nbsp;\')\n+ >>> convertWebIntelligentPlainTextToHtml(orig).count(\'&nbsp;\')\n 12\n \n HTML entities should be escaped::\ndiff --git a/plone/intelligenttext/transforms.py b/plone/intelligenttext/transforms.py\nindex e87cd73..23c7768 100644\n--- a/plone/intelligenttext/transforms.py\n+++ b/plone/intelligenttext/transforms.py\n@@ -55,7 +55,8 @@ def __call__(self):\n # Finally, make \\n\'s into br\'s\n text = text.replace(\'\\n\', \'<br />\')\n \n- text = text.encode(\'utf-8\')\n+ if not PY3:\n+ text = text.encode(\'utf-8\')\n \n return text\n \ndiff --git a/setup.py b/setup.py\nindex f37a3d3..50db590 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -28,7 +28,6 @@\n "Programming Language :: Python",\n "Programming Language :: Python :: 2.6",\n "Programming Language :: Python :: 2.7",\n- "Programming Language :: Python :: 3.3",\n "Programming Language :: Python :: 3.4",\n "Programming Language :: Python :: 3.5",\n "Programming Language :: Python :: 3.4",\ndiff --git a/tox.ini b/tox.ini\nindex 1a84942..040678c 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -1,6 +1,6 @@\n [tox]\n envlist =\n- py26,py27,py33,py34,py35,py36,pypy,pypy3\n+ py26,py27,py34,py35,py36,pypy,pypy3\n \n [testenv]\n commands =\n'

0 comments on commit 9d019c2

Please sign in to comment.