Skip to content

Commit

Permalink
Merge pull request #72 from zopefoundation/py37
Browse files Browse the repository at this point in the history
* Add Python 3.7 support.
* Flake8.
* Fix deprecation warning.
  • Loading branch information
Michael Howitz committed Oct 17, 2018
2 parents ef45cac + ba41661 commit 5f9cdf9
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 25 deletions.
7 changes: 0 additions & 7 deletions .bzrignore

This file was deleted.

13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
sudo: false
language: python
cache:
directories:
- $TRAVIS_BUILD_DIR/eggs
python:
- "2.7"
- "3.5"
- "3.6"
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
install:
- pip install -U coverage coveralls
- pip install -U six==$(curl $(awk '$1 == "extends" {print $3}' buildout.cfg) 2>/dev/null | awk '$1 == "six" {print $3}')
- python bootstrap.py
- bin/buildout
- pip install zc.buildout
- buildout
script:
- coverage run bin/test -vvc
after_success:
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Changelog
2.0b2 (unreleased)
------------------

New features:

- Add Python 3.7 support.

- Support `zope.configuration >= 4.2`.

Bug fixes:

- Proper string/bytes handling for _createObjectByType.
Expand Down
2 changes: 1 addition & 1 deletion Products/GenericSetup/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from zope.component import getUtilitiesFor
from zope.component import queryMultiAdapter
from zope.component.interfaces import ComponentLookupError
from zope.component.interfaces import IComponentRegistry
from zope.interface.interfaces import IComponentRegistry
from zope.component.interfaces import IPossibleSite

from Products.GenericSetup.interfaces import IBody
Expand Down
9 changes: 5 additions & 4 deletions Products/GenericSetup/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,9 @@ def getDependenciesForProfile(self, profile_id, ignore_broken=False):

if not self.profileExists(dependency_id):

raise KeyError('Profile "%s" requires the \
dependency-profile "%s", which does not exist.'
raise KeyError(
'Profile "%s" requires the'
' dependency-profile "%s", which does not exist.'
% (profile_id, dependency_id))

return dependencies
Expand All @@ -958,8 +959,8 @@ def getDependenciesForProfile(self, profile_id, ignore_broken=False):
def getBrokenDependencies(self, profile_id):
"""Return referenced dependency-ids, which do not exist."""
broken_dependencies = []
dependency_ids = self.getDependenciesForProfile(profile_id,
ignore_broken=True)
dependency_ids = self.getDependenciesForProfile(
profile_id, ignore_broken=True)
for dependency_id in dependency_ids:
if not self.profileExists(dependency_id):
broken_dependencies.append(dependency_id)
Expand Down
9 changes: 4 additions & 5 deletions Products/GenericSetup/zcml.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from zope.configuration.fields import GlobalObject
from zope.configuration.fields import MessageID
from zope.configuration.fields import Path
from zope.configuration.fields import PythonIdentifier
from zope.configuration.fields import Tokens
from zope.interface import Interface
import zope.schema
Expand All @@ -39,7 +38,7 @@ class IRegisterProfileDirective(Interface):
"""Register profiles with the global registry.
"""

name = PythonIdentifier(
name = zope.schema.TextLine(
title=u'Name',
description=u"If not specified 'default' is used.",
default=u'default',
Expand Down Expand Up @@ -113,7 +112,7 @@ def registerProfile(_context, name=u'default', title=None, description=None,
# genericsetup:exportStep

class IExportStepDirective(Interface):
name = PythonIdentifier(
name = zope.schema.TextLine(
title=u'Name',
description=u'',
required=True)
Expand Down Expand Up @@ -150,7 +149,7 @@ class IImportStepDirective(Interface):
"""Register import steps with the global registry.
"""

name = PythonIdentifier(
name = zope.schema.TextLine(
title=u'Name',
description=u'',
required=True)
Expand All @@ -173,7 +172,7 @@ class IImportStepDirective(Interface):

class IImportStepDependsDirective(Interface):

name = PythonIdentifier(
name = zope.schema.TextLine(
title=u'Name',
description=u'Name of another import step that has to be run first',
required=True)
Expand Down
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[buildout]
extends = https://zopefoundation.github.io/Zope/releases/4.0b4/versions-prod.cfg
extends = https://zopefoundation.github.io/Zope/releases/4.0b6/versions-prod.cfg
develop = .
parts =
test
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[bdist_wheel]
universal = 1

[check-manifest]
ignore =
*.cfg
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def _package_doc(name):
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
"Topic :: System :: Archiving :: Packaging",
Expand All @@ -57,6 +58,7 @@ def _package_doc(name):
'setuptools',
'six',
'Zope >= 4.0b4',
'zope.interface >= 3.8',
'five.localsitemanager',
'Products.PythonScripts',
'Products.ZCatalog',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
py27,
py35,
py36,
py37,
flake8,
coverage,
docs,
Expand All @@ -16,7 +17,6 @@ commands =

skip_install = true
deps =
setuptools==33.1.1
zc.buildout
coverage

Expand Down

0 comments on commit 5f9cdf9

Please sign in to comment.