Skip to content

Commit

Permalink
Merge pull request #8 from plone/python3
Browse files Browse the repository at this point in the history
Python3
  • Loading branch information
David Glick authored Oct 13, 2018
2 parents 7ae5447 + 0b4d1af commit b7d2f5b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ sudo: false
python:
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
Expand Down
5 changes: 3 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ Changelog

Breaking changes:

- *add item here*
- Dropped support for Python 3.3.

New features:

- *add item here*

Bug fixes:

- *add item here*
- Return str from transform in Python 3.
[davisagli]


2.2.1 (2018-01-17)
Expand Down
2 changes: 1 addition & 1 deletion plone/intelligenttext/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Indentation should be preserved::
... URL: http://foo.com"""
>>> bprint(convertWebIntelligentPlainTextToHtml(orig))
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>
>>> convertWebIntelligentPlainTextToHtml(orig).count(b'&nbsp;')
>>> convertWebIntelligentPlainTextToHtml(orig).count('&nbsp;')
12

HTML entities should be escaped::
Expand Down
3 changes: 2 additions & 1 deletion plone/intelligenttext/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def __call__(self):
# Finally, make \n's into br's
text = text.replace('\n', '<br />')

text = text.encode('utf-8')
if not PY3:
text = text.encode('utf-8')

return text

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.4",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py26,py27,py33,py34,py35,py36,pypy,pypy3
py26,py27,py34,py35,py36,pypy,pypy3

[testenv]
commands =
Expand Down

1 comment on commit b7d2f5b

@jenkins-plone-org
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davisagli Jenkins CI reporting about code analysis
See the full report here: https://jenkins.plone.org/job/package-plone.intelligenttext/27/violations

plone/intelligenttext/tests.py:4:1: I003 isort expected 1 blank line in imports, found 0
plone/intelligenttext/tests.py:11:5: T003 print function found.
plone/intelligenttext/tests.py:21:10: C812 missing trailing comma
plone/intelligenttext/transforms.py:4:1: I003 isort expected 1 blank line in imports, found 0
plone/intelligenttext/transforms.py:22:9: P103 other string does contain unindexed parameters
plone/intelligenttext/transforms.py:22:80: E501 line too long (278 > 79 characters)
plone/intelligenttext/transforms.py:23:27: C812 missing trailing comma
plone/intelligenttext/transforms.py:27:27: C812 missing trailing comma
plone/intelligenttext/transforms.py:64:45: Q000 Remove bad quotes.
plone/intelligenttext/transforms.py:69:20: Q000 Remove bad quotes.
plone/intelligenttext/transforms.py:70:32: Q000 Remove bad quotes.
plone/intelligenttext/transforms.py:74:26: Q000 Remove bad quotes.
plone/intelligenttext/transforms.py:80:37: Q000 Remove bad quotes.
plone/intelligenttext/transforms.py:80:54: Q000 Remove bad quotes.
plone/intelligenttext/transforms.py:91:11: T000 Todo note found.
plone/intelligenttext/transforms.py:102:16: S001 found module formatter
plone/intelligenttext/transforms.py:112:16: S001 found module formatter
plone/intelligenttext/transforms.py:155:18: S001 found module formatter
plone/intelligenttext/transforms.py:181:44: C812 missing trailing comma
plone/intelligenttext/transforms.py:184:7: T000 Todo note found.

Follow these instructions to reproduce it locally.

Please sign in to comment.