Skip to content

Commit

Permalink
Python 3 support
Browse files Browse the repository at this point in the history
* Make sure to close file properly
* Add official support
  • Loading branch information
regebro committed Feb 5, 2018
1 parent 08cb4d1 commit 0b3f94f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
@@ -1,6 +1,8 @@
language: python
python:
- 2.7
- 3.5
- 3.6
install:
- python bootstrap.py
- bin/buildout
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,8 @@ CHANGES
0.8.1 (unreleased)
------------------

- Nothing changed yet.
- Make sure to close open files
- Official Python 3 support


0.8.0 (2015-10-28)
Expand Down
3 changes: 1 addition & 2 deletions buildout.cfg
Expand Up @@ -5,7 +5,6 @@ versions = versions

[test]
recipe = zc.recipe.testrunner
eggs = refline.srccheck [test]
eggs = refline.srccheck[test]

[versions]
zope.testing = 4.1.1
7 changes: 7 additions & 0 deletions setup.py
Expand Up @@ -33,6 +33,7 @@ def read(*rnames):
extras_require=dict(
test=(
'zope.testing',
'zope.testrunner',
),
),
packages=find_packages('src'),
Expand All @@ -56,9 +57,15 @@ def read(*rnames):
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3'],
zip_safe=False,
entry_points={'distutils.commands': 'ftest = zope.testrunner.eggsupport:ftest'}
)
3 changes: 2 additions & 1 deletion src/refline/srccheck/checker.py
Expand Up @@ -375,7 +375,8 @@ def run(self):

if ext in self.extensions:
#read file once, pass the content to checkers
content = open(fullname).read()
with open(fullname) as f:
content = f.read()

if 'checker_ignore_this_file' in content:
continue
Expand Down

0 comments on commit 0b3f94f

Please sign in to comment.