Skip to content

Commit

Permalink
Merge pull request #16 from zopefoundation/py37
Browse files Browse the repository at this point in the history
Add support for Python 3.7.
  • Loading branch information
Michael Howitz committed Jan 5, 2019
2 parents aae9ea9 + 1fed1aa commit e4e0ac5
Show file tree
Hide file tree
Showing 16 changed files with 404 additions and 346 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Expand Up @@ -5,7 +5,7 @@ source = z3c.pt
precision = 2
exclude_lines =
pragma: no cover
if __name__ == '__main__':
if __name__ == "__main__":
raise NotImplementedError
self.fail
raise AssertionError
9 changes: 8 additions & 1 deletion .travis.yml
@@ -1,12 +1,19 @@
language: python
sudo: false
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
- pypy3
matrix:
include:
- python: 3.7
dist: xenial
- python: 3.6
name: "Flake8"
install: pip install -U flake8
script: flake8 --doctests src docs setup.py
install:
- pip install -U pip setuptools
- pip install -U coverage coveralls
Expand Down
4 changes: 3 additions & 1 deletion CHANGES.rst
Expand Up @@ -5,7 +5,9 @@
3.1.1 (unreleased)
==================

- Nothing changed yet.
- Add support for Python 3.7.

- Drop support for running the tests using `python setup.py test`.


3.1.0 (2017-10-17)
Expand Down
104 changes: 54 additions & 50 deletions docs/conf.py
Expand Up @@ -3,10 +3,12 @@
# z3c.pt documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 16 13:18:14 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its containing
# dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
# that aren't pickleable (module imports are okay, they're removed
# automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.
Expand All @@ -15,61 +17,62 @@
# General configuration
# ---------------------

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
templates_path = [".templates"]

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General substitutions.
project = 'z3c.pt'
copyright = '2007-2009 The Zope Community'
project = "z3c.pt"
copyright = "2007-2009 The Zope Community"

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
version = '1.0'
version = "1.0"
# The full version, including alpha/beta/rc tags.
release = '1.0b14'
release = "1.0b14"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
today_fmt = "%B %d, %Y"

# List of documents that shouldn't be included in the build.
#unused_docs = []
# unused_docs = []

# List of directories, relative to source directories, that shouldn't be searched
# for source files.
#exclude_dirs = []
# List of directories, relative to source directories, that shouldn't be
# searched for source files.
# exclude_dirs = []

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"


# Options for HTML output
Expand All @@ -78,96 +81,97 @@
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_style = 'default.css'
html_style = "default.css"

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (within the static path) to place at the top of
# the sidebar.
#html_logo = None
# html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['.static']
html_static_path = [".static"]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = "%b %d, %Y"

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_use_modindex = True
# html_use_modindex = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, the reST sources are included in the HTML build as _sources/<name>.
#html_copy_source = True
# html_copy_source = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''

# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# html_file_suffix = ''

# Output file base name for HTML help builder.
htmlhelp_basename = 'z3cptdoc'
htmlhelp_basename = "z3cptdoc"


# Options for LaTeX output
# ------------------------

# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# latex_paper_size = 'letter'

# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# latex_font_size = '10pt'

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
# (source start file, target name, title, author, document class
# [howto/manual]).
latex_documents = [
('index', 'z3cpt.tex', 'z3c.pt Documentation', 'Malthe Borch', 'manual'),
("index", "z3cpt.tex", "z3c.pt Documentation", "Malthe Borch", "manual")
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# latex_preamble = ''

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_use_modindex = True
# latex_use_modindex = True
115 changes: 47 additions & 68 deletions setup.py
Expand Up @@ -22,81 +22,60 @@ def read(*filenames):
return f.read()


def alltests():
import sys
import unittest
# use the zope.testrunner machinery to find all the
# test suites we've put under ourselves
import zope.testrunner.find
import zope.testrunner.options
here = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
args = sys.argv[:]
defaults = ["--test-path", here]
options = zope.testrunner.options.get_options(args, defaults)
suites = list(zope.testrunner.find.find_suites(options))
return unittest.TestSuite(suites)

TESTS_REQUIRE = [
'zope.pagetemplate',
'zope.testing',
'zope.testrunner',
]

setup(
name='z3c.pt',
version='3.1.1.dev0',
author='Malthe Borch and the Zope Community',
author_email='zope-dev@zope.org',
description='Fast ZPT engine.',
name="z3c.pt",
version="3.1.1.dev0",
author="Malthe Borch and the Zope Community",
author_email="zope-dev@zope.org",
description="Fast ZPT engine.",
long_description=(
read('README.rst')
+ '\n\n'
+ read('src', 'z3c', 'pt', 'README.rst')
+ '\n\n'
+ read('CHANGES.rst')
read("README.rst")
+ "\n\n"
+ read("src", "z3c", "pt", "README.rst")
+ "\n\n"
+ read("CHANGES.rst")
),
license='ZPL',
keywords='tal tales pagetemplate zope chameleon',
license="ZPL",
keywords="tal tales pagetemplate zope chameleon",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'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.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Text Processing :: Markup :: XML',
'Framework :: Zope :: 3',
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: XML",
"Framework :: Zope :: 3",
],
url='https://github.com/zopefoundation/z3c.pt',
namespace_packages=['z3c'],
packages=find_packages('src'),
package_dir={'': 'src'},
url="https://github.com/zopefoundation/z3c.pt",
namespace_packages=["z3c"],
packages=find_packages("src"),
package_dir={"": "src"},
install_requires=[
'setuptools',
'six',
'zope.interface',
'zope.component',
'zope.i18n >= 3.5',
'zope.traversing',
'zope.contentprovider',
'Chameleon >= 2.4',
"setuptools",
"six",
"zope.interface",
"zope.component",
"zope.i18n >= 3.5",
"zope.traversing",
"zope.contentprovider",
"Chameleon >= 2.4",
],
extras_require={
'test': TESTS_REQUIRE,
},
tests_require=TESTS_REQUIRE,
test_suite='__main__.alltests',
extras_require={"test": [
"zope.pagetemplate",
"zope.testing",
"zope.testrunner",
]},
include_package_data=True,
zip_safe=False,
)
2 changes: 1 addition & 1 deletion src/z3c/__init__.py
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
__import__("pkg_resources").declare_namespace(__name__) # pragma: no cover

0 comments on commit e4e0ac5

Please sign in to comment.