Skip to content

Commit

Permalink
Merge pull request #32 from stevepiercy/bump-python-versions-fix-30
Browse files Browse the repository at this point in the history
Bump python versions fix 30
  • Loading branch information
digitalresistor committed Apr 13, 2020
2 parents b109911 + a8d61d1 commit 728f0b3
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 82 deletions.
17 changes: 17 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[run]
source =
pyramid_zcml
omit = pyramid_zcml/pyramid_zcml_tests_viewdecoratorapp_views_templates_foo_mak

[paths]
source =
pyramid_zcml
*/site-packages/pyramid_zcml

[xml]
output = coverage-py3.xml

[report]
show_missing = true
precision = 2
fail_under = 100
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ sudo: false

matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: pypy
env: TOXENV=pypy
- python: pypy3
env: TOXENV=pypy3
- python: 3.6
env: TOXENV=py2-cover,py3-cover,coverage
env: TOXENV=py3-coverage
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
dist: xenial
sudo: true
- python: 3.8
env: TOXENV=py38
dist: xenial

install:
- travis_retry pip install tox
Expand Down
7 changes: 5 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
1.2.1 (unreleased)
2.0.0 (unreleased)
------------------

- TBD
- Add support for Python 3.8.

- Drop support for Python 2.7 and 3.4.


1.2.0 (2018-01-09)
------------------
Expand Down
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@
# bottom, using the given strftime format.
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 = False
# Do not use smart quotes.
smartquotes = False

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
Expand Down
21 changes: 7 additions & 14 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Glossary
:sorted:

Pyramid
A `web framework <http://pylonshq.com/pyramid>`_.
A `web framework <https://trypyramid.com>`_.

View handler
A view handler ties together
Expand All @@ -17,7 +17,7 @@ Glossary
using :term:`url dispatch`. See also :ref:`views_chapter`.

Pylons
`A lightweight Python web framework <http://pylonshq.com>`_.
`A lightweight Python web framework <https://pylonsproject.org/about-pylons-framework.html>`_.

URL dispatch
An alternative to :term:`traversal` as a mechanism for locating a a
Expand All @@ -27,7 +27,7 @@ Glossary

ZCML
`Zope Configuration Markup Language
<http://www.muthukadan.net/docs/zca.html#zcml>`_, an XML dialect
<https://muthukadan.net/docs/zca.html#zcml>`_, an XML dialect
used by Zope and Pyramid for configuration tasks. ZCML
is capable of performing different types of :term:`configuration
declaration`, but its primary purpose in Pyramid is to
Expand Down Expand Up @@ -121,13 +121,6 @@ Glossary
Any file contained within a Python :term:`package` which is *not*
a Python source code file.

asset specification
A colon-delimited identifier for an :term:`asset`. The colon separates
a Python :term:`package` name from a package subpath. For example, the
asset specification ``my.package:static/baz.css`` identifies the file
named ``baz.css`` in the ``static`` subdirectory of the ``my.package``
Python :term:`package`. See :ref:`asset_specifications` for more info.

package
A directory on disk which contains an ``__init__.py`` file, making
it recognizable to Python as a location which can be ``import`` -ed.
Expand Down Expand Up @@ -174,7 +167,7 @@ Glossary
or class as its first argument and which returns an arbitrary object.
Pyramid provides several decorators, used for configuration and return
value modification purposes. See also `PEP 318
<http://www.python.org/dev/peps/pep-0318/>`_.
<https://www.python.org/dev/peps/pep-0318/>`_.

router
The :term:`WSGI` application created when you start a
Expand All @@ -184,8 +177,8 @@ Glossary
Pyramid application.

WSGI
`Web Server Gateway Interface <http://wsgi.org/>`_. This is a
Python standard for connecting web applications to web servers,
`Web Server Gateway Interface <https://wsgi.readthedocs.io/en/latest/>`_.
This is a Python standard for connecting web applications to web servers,
similar to the concept of Java Servlets. Pyramid requires
that your application be served as a WSGI application.

Expand Down Expand Up @@ -218,7 +211,7 @@ Glossary

Zope Component Architecture
The `Zope Component Architecture
<http://www.muthukadan.net/docs/zca.html>`_ (aka ZCA) is a system
<https://muthukadan.net/docs/zca.html>`_ (aka ZCA) is a system
which allows for application pluggability and complex dispatching
based on objects which implement an :term:`interface`.
Pyramid uses the ZCA "under the hood" to perform view
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Directives and API
Reporting Bugs / Development Versions
-------------------------------------

Visit http://github.com/Pylons/pyramid_zcml to download development or
Visit https://github.com/Pylons/pyramid_zcml to download development or
tagged versions.

Visit http://github.com/Pylons/pyramid_zcml/issues to report bugs.
Visit https://github.com/Pylons/pyramid_zcml/issues to report bugs.

Indices and tables
------------------
Expand Down
10 changes: 7 additions & 3 deletions docs/narr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,13 @@ See :ref:`changing_the_request_factory` for more information.
Changing the Renderer Globals Factory via ZCML
----------------------------------------------

A renderer globals factory can be registered via ZCML as a through the use of
.. warning::

The (internal) ``pyramid.interfaces.IRendererGlobals`` interface was removed in Pyramid 1.5a2.
These arguments, methods and interfaces had been deprecated since 1.1.
Use a ``BeforeRender`` event subscriber as documented in :ref:`beforerender_event` in the "Hooks" chapter of the Pyramid narrative documentation instead of providing renderer globals values to the configurator.

A renderer globals factory can be registered via ZCML through the use of
the ZCML ``utility`` directive. In the below, we assume a
``renderers_globals_factory`` function lives in a package named
``mypackage.mymodule``.
Expand All @@ -1443,8 +1449,6 @@ the ZCML ``utility`` directive. In the below, we assume a
provides="pyramid.interfaces.IRendererGlobalsFactory"
/>
See :ref:`adding_renderer_globals` for more information.

.. index::
single: Zope ZCML directives
single: getGlobalSiteManager
Expand Down
6 changes: 3 additions & 3 deletions docs/zcml/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ are all completely equivalent:
<include package="pyramid.includes" />
<view xmlns="http://pylonshq.com/pyramid"
<view xmlns="https://trypyramid.com"
view="helloworld.hello_world"
/>
</configure>
For more information about XML namespaces, see `this older, but simple
XML.com article <http://www.xml.com/pub/a/1999/01/namespaces.html>`_.
XML.com article <https://www.xml.com/pub/a/1999/01/namespaces.html>`_.

The conventions in this document assume that the default XML namespace
is ``http://pylonshq.com/pyramid``.
is ``https://trypyramid.com``.

Alternatives
~~~~~~~~~~~~
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
tests_require = install_requires + ['pyramid_mako', 'WebTest']

testing_extras = [
'coverage',
'WebTest',
'nose',
'nosexcover',
'pyramid_mako']

docs_extras = [
Expand All @@ -43,19 +45,17 @@
]

setup(name='pyramid_zcml',
version='1.2.1.dev0',
version='2.0.0.dev0',
description='Zope Config Markup Language support for Pyramid',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Intended Audience :: Developers",
"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 :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: Pylons",
Expand All @@ -66,7 +66,7 @@
keywords='web wsgi pylons pyramid',
author="Chris McDonough, Agendaless Consulting",
author_email="pylons-discuss@googlegroups.com",
url="http://docs.pylonsproject.org/projects/pyramid_zcml/en/latest/",
url="https://docs.pylonsproject.org/projects/pyramid_zcml/en/latest/",
license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
packages=find_packages(),
include_package_data=True,
Expand All @@ -78,6 +78,7 @@
'testing': testing_extras,
'docs': docs_extras,
},
python_requires='>=3.5',
entry_points = """
[paste.paster_create_template]
pyramid_starter_zcml=pyramid_zcml.scaffolds:StarterZCMLProjectTemplate
Expand Down
50 changes: 8 additions & 42 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
[tox]
envlist =
{py27,pypy,py34,py35,py36,py37,pypy3}{,-pyramid15,-pyramid16,-pyramid17,-pyramid18,-pyramid19},
{py2,py3}-cover,coverage
{py35,py36,py37,py38,pypy3}{,-pyramid15,-pyramid16,-pyramid17,-pyramid18,-pyramid19,-pyramid110},
py3-coverage

ignore_basepython_conflict = true

[testenv]
# Most of these are defaults but if you specify any you can't fall back
# to defaults for others.
basepython =
py27: python2.7
py33: python3.3
py34: python3.4
py35: python3.5
py36: python3.6
py37: python3.7
pypy: pypy
py38: python3.8
pypy3: pypy3
py2: python2.7
py3: python3.7

commands =
Expand All @@ -32,44 +28,14 @@ deps =
pyramid17: pyramid>=1.7,<1.8dev
pyramid18: pyramid>=1.8,<1.9dev
pyramid19: pyramid>=1.9,<1.10dev
pyramid110: pyramid>=1.10,<1.11dev

# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
# coverage==3.4 is required by nosexcover.

[testenv:py2-cover]
[testenv:py3-coverage]
commands =
nosetests --with-xunit --with-xcoverage --xcoverage-file=coverage-py2.xml
coverage run {envbindir}/nosetests
coverage xml
coverage report
extras =
testing
deps =
nose
coverage
nosexcover
setenv =
COVERAGE_FILE=.coverage.py2

[testenv:py3-cover]
commands =
nosetests --with-xunit --with-xcoverage --xcoverage-file=coverage-py3.xml
extras =
testing
deps =
nose
coverage
nosexcover
setenv =
COVERAGE_FILE=.coverage.py3

[testenv:coverage]
basepython = python3.6
commands =
coverage erase
coverage combine
coverage report --show-missing --fail-under=100
deps =
coverage
setenv =
COVERAGE_FILE=.coverage

0 comments on commit 728f0b3

Please sign in to comment.